Book Image

Godot 4 Game Development Projects - Second Edition

By : Chris Bradfield
5 (1)
Book Image

Godot 4 Game Development Projects - Second Edition

5 (1)
By: Chris Bradfield

Overview of this book

Godot 4.0 is one of the most sought-after open-source game engines, and if you’re enthusiastic about exploring its features, then this book is for you. Written by an author with over twenty-five years of experience, the Godot 4 Game Development Projects introduces the Godot game engine and its feature-rich 4.0 version. With an array of new capabilities, Godot 4.0 is a strong alternative to expensive commercial game engines. If you’re a beginner, this book will help you learn game development techniques, while experienced developers will understand how to use this powerful and customizable tool to bring their creative visions to life. This updated edition consists of five projects with an emphasis on the 3D capabilities of the engine that will help you build on your foundation-level skills through small-scale game projects. Along the way, you’ll gain insights into Godot’s inner workings and discover game development techniques that you can apply to your projects. Using a step-by-step approach and practical examples, this book covers everything from the absolute basics to sophisticated game physics, animations, and much more. By the time you complete the final project, you’ll have a strong foundation for future success with Godot 4.0 and you’ll be well on your way to developing a variety of games.
Table of Contents (10 chapters)

Coin Dash – Build Your First 2D Game

This first project will guide you through making your first Godot Engine game. You will learn how the Godot editor works, how to structure a project, and how to build a small 2D game using some of Godot’s most commonly used nodes.

Why start with 2D?

In a nutshell, 3D games are much more complex than 2D ones. However, many of the underlying game engine features you’ll need to know are the same. You should stick to 2D until you have a good understanding of Godot’s workflow. At that point, the jump to 3D will feel much easier. You’ll get a chance to work in 3D in this book’s later chapters.

Don’t skip this chapter, even if you aren’t a complete newcomer to game development. While you may already understand many of the concepts, this project will introduce Godot’s features and design paradigms – things you’ll need to know going forward.

The game in this chapter is called Coin Dash. Your character must move around the screen, collecting as many coins as possible while racing against the clock. When you’re finished, the game will look like this:

Figure 2.1: The completed game

Figure 2.1: The completed game

In this chapter, we’ll cover the following topics:

  • Setting up a new project
  • Creating character animations
  • Moving a character
  • Using Area2D to detect when objects touch
  • Using Control nodes to display information
  • Communicating between game objects using signals