Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Game Development Patterns with Godot 4
  • Table Of Contents Toc
Game Development Patterns with Godot 4

Game Development Patterns with Godot 4

By : Henrique Campos
close
close
Game Development Patterns with Godot 4

Game Development Patterns with Godot 4

By: Henrique Campos

Overview of this book

Game development demands more than just creativity; it requires code that’s as dynamic and adaptable as the games you dream of creating. Seasoned Godot developer, educator and creator of popular resources like The Essential Guide to Creating Multiplayer Games with Godot 4.0, Henrique Campos introduces you to object-oriented programming design patterns, offering time-tested, reliable solutions to common coding issues. With these patterns, you’ll not only build scalable, maintainable architectures for your games but also gain the confidence to tackle real-world development challenges head-on with Godot's built-in features. In this hands-on guide, you’ll step into the role of a game mechanics engineer tasked with implementing requests from a fictional game designer, simulating the collaborative nature of real-world game development. Using Godot 4.3, you’ll develop a complete platformer game featuring a playable character, enemies with advanced AI, interactive objects, multiple levels, music, and more. Along the way, you’ll master core programming concepts such as SOLID principles, favor composition over inheritance, and have a solid understanding of object-oriented programming along with the principles behind the design patterns. By the end of the book, you’ll be able to diagnose and fix pathologies in your code with ease.
Table of Contents (19 chapters)
close
close
Lock Free Chapter
1
Part 1: Object-Oriented Design Principles
6
Part 2: Basic Design Patterns
12
Part 3: Advanced Design Patterns

Understanding the Event Queue pattern

In most applications, it’s a common practice to abstract special “happenings” in the form of events. For instance, when the player presses keys, when the game loop updates, when a button is pressed, when a character reaches critical health, when the player talks to a non-playable character, when the player loots an item, when the player defeats an enemy, and so on. We saw in Chapter 6 that we can trigger these events as signals, and this is one of the most common approaches. It even leads to what is known as the Event Bus pattern, another design pattern that uses a singleton to host signals that other classes can emit. It’s a mix of the Singleton and the Observer pattern for event-driven architectures.

But emitting notifications, or signals, is not enough. Sometimes we need to store these events so we can handle them later on. The Event Queue pattern is made exactly for that. I decided to put this pattern in the Advanced...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Game Development Patterns with Godot 4
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon