Game Programming Patterns in Godot: The Singleton Pattern (Godot Autoload)
GameDev w/ David GameDev w/ David
1.08K subscribers
6,838 views
0

 Published On Jan 6, 2024

👉️ Discover the Singleton pattern and other essential game development patterns with the book "Game Programming Patterns" by Robert Nystrom. Buy it now here: https://amzn.to/3QhtkSY

Alternatively, this generous author has made the entire contents of the book available for free on his website: https://gameprogrammingpatterns.com/

(Disclosure: As an Amazon Associate I earn from qualifying purchases.)

In this Godot tutorial, I will explain to you what is the Singleton Pattern and how can we leverage it via the Autoload feature in the Godot Game Engine. The Singleton Pattern can be used to have a unique instance of a given class, thus enabling you to keep the state of any component between scene changes. This pattern is implemented via Godot Autoload, which is the concrete way for the engine to deal with this game design pattern.

đź”” Subscribe:

Subscribe to my channel to see more videos like this:

http://www.youtube.com/@GameDevWDavid...

đź“– Useful resources:

- More information about Godot Autoload in the official Godot Game Engine documentation:
https://docs.godotengine.org/en/stabl...
- Assets used in this tutorial:
The Bounty Hunter by Clembod: https://clembod.itch.io/bounty-h
Oak Woods - Environment Asset by brullov: https://brullov.itch.io/oak-woods

🔵 Follow me:

Find out about my latest videos and publications:

  / gamedevwdavid  
https://mastodon.social/@GameDevWDavid
https://davidserrano.io/

⏳ Timecodes:

00:00 - Introduction on this Godot tutorial
01:43 - The Singleton Pattern
03:54 - Create a Godot Singleton with Godot Autoload
05:38 - Conclusion



---



Stock Video by Videezy: http://videezy.com

This video shows footage of the following videos that are licensed under the Creative Commons license (https://creativecommons.org/licenses/...
- Godot Engine - Desktop/Console - 2022 Showreel:    • Godot Engine - Desktop/Console - 2022...  

Music credits:

Track: Alexi, Action, Infraction- Witch's Whispers
Music provided by Infraction No Copyright Music
Spotify: https://bit.ly/3DY8YYc

show more

Share/Embed