Player State Machine // Platformer Movement 04/08 /// 2D Platformer Basics in Godot 4

Опубликовано: 06 Июнь 2026
на канале: Michael Games
2,731
162

In this tutorial we will create a state machine that will control our player, and all his abilities, while keeping our code clean and organized!

Topics Covered: GD Script, scripts, state machine, move_and_slide, _physics_process, _process, process_mode

Asset Download Page:
https://michaelgames.itch.io/godot-pl...

--------------------
Chapters
--------------------
00:00 Intro
00:25 Overview
01:24 Create our "player" script
06:55 _physics_process function
13:22 Why a state machine?
14:29 Create player state machine nodes & script
19:24 Create player state script
26:55 Player state machine variables
29:35 Setup Player state machine functions
32:44 init()
39:25 change_state()
43:21 _process, _physics_process & _unhandled_input
46:14 Create base scripts for each state
49:58 Add state references to player state script
50:49 Quick test & Handle defect with initializing first state
54:29 Basic idle state
55:28 Transition from idle to basic fall state
57:33 Outro
58:20 Thank you Patreon supporters!!!
--------------------

Join our discord community!
Discord:   / discord  

Become a Patreon member to get exclusive access to Michael, and more: https://www.patreon.com/c/user?u=2630...

Check out my massive 2D Action & RPG Tutorial Series!
   • Make a 2D Action & Adventure RPG in Godot ...