📖01 ‣ 📼02 ‣ Player State Machine ‣ Metroidvania Forge Godot 4 Tutorial Series
Автор: Michael Games
Загружено: 2025-10-08
Просмотров: 4569
Описание:
Welcome to the Metroidvania Forge, a game dev tutorial series in Godot 4!
In this video we will laern about and build our own state machine! The state machine will make it so that we can easily add abilities to our player in the future with minimal need to update the player's main script.
Topics Covered: Player, state machine, finite state machine, unhandled input, process, physics process, GD Script, return, getter variable/function
New Assets Used:
state.svg (in ch_01_player_foundations.zip)
Itch.IO Series Page: https://michaelgames.itch.io/metroidv...
--------------------
Chapters
--------------------
00:00 Intro
00:31 Homework check-in
01:25 Video overview, what is a state machine & why
02:54 Example script without a state machine/problem
04:05 State machine solution & visual explanation
08:00 Create PlayerState class & script
09:06 Add icon to state PlayerState script
10:21 Set up properties/variables in PlayerState class
12:57 Define init() function
13:31 Define the enter()function
14:14 Define handle_input() function
16:44 Define process() & physics_process() functions
18:19 Begin implementing state machine behavior into our player script
18:39 Define state machine specific variables
23:50 Player _ready() & initialize_states() functions
30:54 Define change_state() function
35:56 Stub in some code to test our state machine
36:57 Fix enter initial state bug
37:40 Hook player _process() function into current_state.process
40:53 Hook _physics_process() into current state:
41:35 Hook up _unhandled_input() function
44:16 Clean up PlayerState script (remove test code)
44:45 Add update_direction() function
48:35 Simulate gravity
49:57 Set up basic idle & run states
52:20 Homework assignment!
53:12 Outro
53:43 Thank you Patreon supporters!!!
--------------------
Metroidvania Forge Tutorial Series Playlist:
• Metroidvania Forge Tutorial Series
Series Outline: https://docs.google.com/document/d/1A...
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...
Michael Games Trello Board: https://trello.com/b/9PlGOAZv/aarpg-t...
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: