-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Hello,
This is a recurring issue, as already discussed within fifty-bird: games50/fifty-bird#2
As I explained there, the physics of the gravity calculation is wrong, and causes the gravity to be "too strong" for machines that run with FPS higher than 60
In this repo the mistake happens here
mario/mario/src/states/entity/PlayerFallingState.lua
Lines 25 to 26 in c1733f3
| self.player.dy = self.player.dy + self.gravity | |
| self.player.y = self.player.y + (self.player.dy * dt) |
when adding the gravity to the player's dy it is not multiplied by dt, and the dy is decreased by gravity every frame, when the frame rate is higher, the gravity is stronger and at my machine (144 fps) the player simply can't jump over columns
as with fifty-bird, I prefer to suggest a solution and not just complain, see my Pull Request: #4
Metadata
Metadata
Assignees
Labels
No labels