Gerben Prins, Game Programmer
State Machine Platformer
This project is a 2D platformer where I've learned a lot about improving movement and game structure.
It all started with me wanting to create a proper state machine. I also wanted to improve my skills in
movement and animation. This game is intended to become a precision platformer with many possibilities
for momentum and speed.
State Machine
13/01/2025
This is where all the state machine magic happens! The image above shows a visual sheet of all the states
and their transitions. The icons on the left indicate the conditions required to switch from one state
to another. The player starts in the idle state, which is called from "Start" in the Player class/script.
Movement
12/12/2024
Most people tend to underestimate how complex movement in platformer games can be. They don't realize
that making a proper platformer involves much more than a simple jump and walk script. For smooth gameplay,
many additional mechanics need to be added. One of these is called a "Coyote Jump," which allows the player
to jump for a short moment after walking off a platform, this makes the game feel more forgiving.
Another useful feature is the "Jump Buffer," which gives players a short window to press the jump button
before landing. This results in the player jumping immediately upon landing, making the controls feel more
responsive which reduces frustration from missed inputs.
Pixel Snapping
21/11/2024
My game uses pixel art, and one issue I wanted to avoid from the beginning was the player standing
“between pixels” while moving. I solved this by setting the game window resolution to match the desired
pixels per unit (48). Now, the player snaps to the pixel grid (as shown on the right), even though in the
editor, their position might not align exactly (as shown on the left).
Tile Rules
18/11/2024
I decided to create a tile rule system because I expect to place a lot of tiles while building levels
for this platformer. Setting up the system took quite a bit of time, but I believe it will be worth it
once I start designing levels. Hopefully, it will save me time in the long run—but we’ll see!
Animations!
14/11/2024
I created some animations for the main character to make the movement feel more fluid!