The Command Pattern: Coding Undo/Redo | Game Engine Concepts #3

Опубликовано: 16 Сентябрь 2020
на канале: GamesWithGabe
6,421
149

Join the Discord:   / discord  

In this episode I explain what the Command Pattern is and how you can use it. Before I explain what the Command Pattern is I explain what a design pattern is and reference the Gang of Four's original book, Design Patterns. After that, I explain that the Command Pattern is simply a wrapper around executing commands. I then illustrate how this can be used in conjunction with a Command History object to create an undo/redo system, record gameplay sessions, and create instant replays. I describe in detail how you might code this, then I show an actual example that I use in my code to implement undo/redo system.

The Command Pattern: https://gameprogrammingpatterns.com/c...
Gang of Four Book: https://www.amazon.com/Design-Pattern...
Command Code Example: https://github.com/ambrosiogabe/Cocoa...
Command History Code Example: https://github.com/ambrosiogabe/Cocoa...

0:00 Intro
0:31 What is a Programming Pattern?
1:39 What is the Command Pattern?
13:39 What does the Code Look Like?

---------------------------------------------------------------------
Website: https://ambrosiogabe.github.io/
Github: https://github.com/ambrosiogabe

Here are some books I recommend if you want to learn about game engine development more thoroughly. I do not profit off any of these sales, these are just some books that have helped me out :)

My Recommended Game Engine Books:
Game Engine Architecture: https://www.gameenginebook.com/
Game Physics Cookbook (Read this before the next physics book): https://www.amazon.com/Game-Physics-C...
Game Physics (Ian Millington): https://www.amazon.com/Game-Physics-E...
Game Programming Patterns (Free): https://gameprogrammingpatterns.com/

My Recommended Beginning Game Programming Books:
JavaScript Game Design: https://www.apress.com/gp/book/978143...

My Recommended Java Books:
Data Structures/Algorithms: https://www.amazon.com/Data-Structure...
LWJGL (Free, but I haven't read this thoroughly): https://lwjglgamedev.gitbooks.io/3d-g...

Outro Music: https://www.bensound.com/royalty-free...


Смотрите видео The Command Pattern: Coding Undo/Redo | Game Engine Concepts #3 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь GamesWithGabe 16 Сентябрь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 6,421 раз и оно понравилось 149 людям.