Finite State Machines & State Pattern in Game Dev ๐ŸŽฎ

Learn how finite state machines and the state pattern help create clean, maintainable, and expandable game code.

Finite State Machines & State Pattern in Game Dev ๐ŸŽฎ
The Shaggy Dev
115.4K views โ€ข Nov 2, 2021
Finite State Machines & State Pattern in Game Dev ๐ŸŽฎ

About this video

In this video, we'll discuss finite state machines and how they can be used to write cleaner, more maintainable, and more expandable code for your games. We'll look at the naive way of managing state in a game, how we can improve upon that method slightly with enumerators, and finally how to build a robust system using the state pattern.

Intro: 00:00
Life without state machines: 00:54
Finite state machines: 02:38
Using enumerators: 04:55
The state pattern: 06:09
Final thoughts and where to go next: 10:28

Game Programming Patterns: https://gameprogrammingpatterns.com/state.html

Video transcript: https://shaggydev.com/2021/11/01/state-machines-intro/

Artwork by Kenney: https://www.kenney.nl/

Video Information

Views

115.4K

Likes

4.4K

Duration

10:55

Published

Nov 2, 2021

User Reviews

4.7
(23)
Rate:

Related Trending Topics

LIVE TRENDS

Related trending topics. Click any trend to explore more videos.