You are browsing as a guest. Sign up (or log in) to start making projects!

1h 17m 45s logged

started turning the simple movement demo into a real platformer by adding physics.

The first majour feature added was gravity. Instead of the player staying in the air after a jump or falling instantly at a fixed speed, I introduced a vertical velocity system. This allows the player to accelerate downwards over time, making movement feel more natural.

After implementing gravity, i added a jump system. When the player presses the space bar or up arrow key, an upward velocity is applied. Gravity then gradually pulls the player back down.

However, after adding jumping and gravity, the player was able to fall infinitely off the screen. To fix this, I implemented a basic floor collision system using the bottom of the screen as a temporary ground.

This ensured the player always lands correctly and resets vertical velocity when touching the ground.

0
1

Comments 0

No comments yet. Be the first!