Command Pattern /// Game Programming Patterns in Godot 4

preview_player
Показать описание
In this tutorial discuss the command pattern, it's basic uses, and implement a simple example in Godot using nodes and GD Script!

Topics Covered: programming patterns, command pattern, recursion, command, undo

Become a Patreon member to get exclusive access to Michael, and more:

Join our discord community!

--------------------
Chapters
--------------------
00:00 Intro
00:21 Command Pattern Explanation
05:39 Command class
08:32 CommandUnit class (target & command manager)
09:47 Project settings - Input map (in case you want to see)
11:06 Command Scene & UI Overview
12:16 Create "spin" command
16:02 Invoke a spin command
17:24 add_command() function
18:41 execute_next_command() function
26:47 Add undo functionality to spin command and command unit
30:49 Create "move" command
37:46 Final work & Outro
39:10 Thank you to my Patreon supporters!
Рекомендации по теме
Комментарии
Автор

Thank you so much! I really enjoy this type of content. Keep up the great work!

simspam
Автор

LOVE THIS! I tried to read through this from the book, but when I hit "Encapsulate a request as an object, thereby letting users parameterize clients with different requests, queue or log requests, and support undoable operations." I just checked out. This was a GREAT example of showing the concept in an easy to understand manner. :-)

Folkor
Автор

As a neophyte programmer, it is good to see tutorials tackling programming patterns especially for the GDScript of Godot Game Engine. Aside form the Observer and the State Patterns which I have been incorporating with my knowledge using the Godot, this tutorial would be my first encounter with the Command Pattern. Hope to see more about this pattern and other patterns that I have yet to encounter or even heard off. Thank you.

desireelustre
Автор

As always, thanks. I like these non ARPG videos too!

iggymoeplays
Автор

Thank you for a great tutorial. I have one question though. I'm trying to use the command pattern for my game, but I used resources instead of node. Which way would be better?

nekouenko
visit shbcf.ru