🔴 8 Direction movement + state machine [Game Maker Studio 2 | Basics]

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:

Nguồn: https://vestingpoint.com/

Xem thêm bài viết khác: https://vestingpoint.com/game/

5 thoughts on “🔴 8 Direction movement + state machine [Game Maker Studio 2 | Basics]”

  1. it works but the code allows for movement in both directions at the same time. This causes the character's sprite to change to diagonal animation at the same time moving up or down. How can I implement restrictions for this?

  2. Hey 1up I'm a portuguese game developer, and would love if you tried my latest game, love your tutorials btw.


Leave a Comment