Search found 85 matches
- Sat Jun 10, 2023 5:28 pm
- Forum: General
- Topic: while statement freezes the game
- Replies: 2
- Views: 1660
Re: while statement freezes the game
I think you should try adding a love.timer.sleep(0.1) in the loop as the loop can run very fast (thanks to modern computers) and freeze the game so it should help i think while true do love.timer.sleep(0.1) -- do stuff end It still doesn't work. According to print(self.y, self.collider:collides(flo...
- Sat Jun 10, 2023 5:01 pm
- Forum: General
- Topic: while statement freezes the game
- Replies: 2
- Views: 1660
while statement freezes the game
How do I fix that? I'm trying to separate the player and the floor when they collide. function Player:updatePhysics(dt) if self.collider:collides(floor) then while self.collider:collides(floor) do self.y = self.y - 1 * dt print(self.y, self.collider:collides(floor)) end self.velY = 0 self.onFloor = ...
- Fri Jun 09, 2023 3:45 pm
- Forum: Libraries and Tools
- Topic: A love2D collision library
- Replies: 0
- Views: 8487
A love2D collision library
I've created a collision library called lCollision, it's still in development though and it only has rectangle colliders right now.
Here's an example: It also has a github repo: https://github.com/notcl4y14/lCollision
Here's an example: It also has a github repo: https://github.com/notcl4y14/lCollision
- Thu Jun 08, 2023 5:13 pm
- Forum: General
- Topic: How to run love2D project on localhost?
- Replies: 10
- Views: 6481
Re: How to run love2D project on localhost?
ZeroBrane has interesting feature "live coding" http://notebook.kulchenko.com/zerobrane/live-coding-with-love where with it, you can update variables when game is run, which partially covers need for fine tuning variables (physics, gameplay, etc). You can even edit them with mouse. Wow, I...
- Sun Jun 04, 2023 2:11 pm
- Forum: General
- Topic: How to run love2D project on localhost?
- Replies: 10
- Views: 6481
- Sun Jun 04, 2023 6:08 am
- Forum: General
- Topic: How to run love2D project on localhost?
- Replies: 10
- Views: 6481
How to run love2D project on localhost?
Like so you won't have to close the game and open it again when you've made changes. Instead it will update itself after every change you've made and keep some variables
- Thu Jun 01, 2023 9:31 am
- Forum: General
- Topic: How to make the physics pixelated?
- Replies: 2
- Views: 1695
Re: How to make the physics pixelated?
Assuming I'm understanding what you want, setMeter should be exactly what you want. Box2D works with metric units, but it needs to know how many pixels a meter is, which is what setMeter will do - it decides how many pixels a meter is. It essentially just zooms in or out depending on what value you...
- Thu Jun 01, 2023 8:25 am
- Forum: General
- Topic: How to make the physics pixelated?
- Replies: 2
- Views: 1695
How to make the physics pixelated?
Like, by default player moving pixel by pixel with physics is very slow, but by 1000 pixels it will be faster. Without physics 1000 pixels will be very fast. How to set the physics pixelated so it would be the same speed as without the physics? I've found love.physics.setMeter , but I don't know doe...
- Sun May 14, 2023 9:25 am
- Forum: General
- Topic: Is there a way to add a toolbar to the window?
- Replies: 2
- Views: 1187
- Sun May 14, 2023 6:44 am
- Forum: General
- Topic: Is there a way to add a toolbar to the window?
- Replies: 2
- Views: 1187
Is there a way to add a toolbar to the window?
Is there a way to add a toolbar to the window? Or should I make it myself via graphics?