This basic tutorial shows you how to make 8-directional movement with a state machine in gamemaker studio.
What the hell is a state machine? Glad you asked, even if you didn’t 😀
A state machine is simply a standard way in programming to keep seperate units of behavior in so called states.
Image it like this: You have an idle state when the player or npc doesn’t do anything. Then you have hurt state when the player is getting hit. Or you have a movement state where the player is moving around. You get the idea. The same can be applied to 8 directinal movement with regards to what image to use in what situation. The player moves right so he should have an moving animation that turns to the right and so on.
This basic video tutorial will guide you through all necessary steps to do simple imputs to move the player around and cross over to other states like being hurt or even the death animation. Additionally, you will see a collision system to make this thing round.
▶ Gamemaker Studio:
▶ Trial limitations:
♥ My free game Clunky souls:
♥ My assets:
Get some assets at itch.io
♥ Support me and get fresh game art and game maker projects every month:
Follow me on: