Posted June 11, 2023 by MrSicario
I updated the code of the player from a single GD script file to a massive, 6 files and counting, finite state machine.
Going forward this will allow me to tweak or add to the movement and actions of the player without the need to rewrite everything or break something.
For next week, the goal is to add proper attacks, health bar and its relevant UI and a Goomba to the test level. Perhaps a working pause and start menu if I can properly manage my time.
With the new code base, I updated the controls somewhat. You still move with the arrow keys, but now to pogo you must be pressing the down arrow and be some distance away from the floor, no more instant pogo.
To wall slide, now you must be on the air and “press into” the wall with the proper arrow key, no more attacking into walls to be attached.
Finally, I’m testing out a “knockback” jump where smacking a wall with “C” on the air will send the player flying on the opposite direction. This move is really bare bones and is mostly to experiment with an alternative lateral air movement control instead of just keeping the arrow keys pressed.