Movement


This weeks update is to detail and outline the movement of Just Another Platformer!

The movement implemented is relatively simple, with the player being able to move left, right and jump. The jump has been coded to give a more 'physics-y' feel. When the player jumps, the character reaches the top of its ark, hangs there for a split second before quickly falling back down. Holding space also allows for a 'longer' jump with the player jumping slightly higher and further. The 'physics-y' jump is made by adding a fall multiplier to the code, and making that activate once the player is falling (put simply, it speeds up the fall. Below is an attached GIF showing the game movement so far: 


All of the players movement so far is contained within one script with a bunch of methods for individual parts of the movement that all get called on update. The different methods are:

- Move(); controls the simple left and right movement.

-Jump(); controls the jumping movement.

-CheckIfGrounded(); fixes a bug where sometimes the player would get stuck on a platform and not be able to move as the code thought the player was still in the air. This is fixed by making sure the player is grounded by checking if the players collider is colliding with anything.

-BetterJump(); controls the 'physics-y' type of jump.


In terms of improvements, I think that the movement would benefit by scaling the game a bit more and changing around the speeds of different things. I would also like to implement a 'double jump' feature (possibly as a power up). Also, I think adding a some sort of wall jump or friction on the walls would be beneficial.

Leave a comment

Log in with itch.io to leave a comment.