35,99 €
Jumping into Godot 4 as a beginner can be overwhelming. You’re wrestling with a new interface, trying to wrap your head around how nodes and scenes work, and learning GDScript all at once. After years of teaching game development and creating YouTube tutorials, Robert Henning knows exactly where you’re likely to have those “wait, what?” moments. He’s built this guide to systematically address those challenges head-on, breaking down complex concepts into digestible steps.
You’ll start by setting up Godot 4 and understanding its interface and tools. Then, you’ll dive into nodes and scenes, Godot’s way of organizing everything, which sounds intimidating but is actually quite intuitive. From there, you’ll explore both 2D and 3D game creation, adding key elements such as players, enemies, collectibles, and lighting effects that make your game pop visually. You’ll also get hands-on with Godot’s scripting language, GDScript, to bring your game ideas to life.
By the end of this Godot 4 book, you’ll have the skills to build complete 2D and 3D games from scratch, covering everything from level design and game state management to score tracking and more. Whether you’re just getting started or are ready to level up, this book will help you turn your ideas into fully playable games.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Veröffentlichungsjahr: 2025
Godot 4 for Beginners
Develop engaging 2D and 3D games with Godot 4’s scripting and design features
Robert Henning
Godot 4 for Beginners
Copyright © 2025 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Portfolio Director: Rohit Rajkumar
Relationship Lead: Neha Pande
Program Manager: Sandip Tadge
Content Engineer: Shreya Sarkar
Technical Editor: Tejas Mhasvekar
Copy Editor: Safis Editing
Indexer: Tejal Soni
Proofreader: Shreya Sarkar
Production Designer: Prashant Ghare
Growth Lead: Lee Booth
First published: August 2025
Production reference: 1250725
Published by Packt Publishing Ltd.
Grosvenor House
11 St Paul’s Square
Birmingham
B3 1RB, UK.
ISBN 978-1-83620-309-4
www.packtpub.com
This book is dedicated to my family, who are my biggest supporters. Know that with love and encouragement, you can achieve anything. And Dad, I know that you would be proud of me.
– Robert Henning
Creating games has never been this accessible, thanks in large part to powerful yet approachable engines like Godot. However, diving into engines like Godot—while user-friendly—still involves mastering a diverse set of skills, from the obvious ones like programming and math to the less obvious ones like software architecture and game design. Even if you already know the inner workings of a game engine, transitioning to another can be tedious.
This book, written by professional game development tutor Robert Henning, addresses exactly this issue and eases readers into the vast field of game development. The cultivation of new skills will be much easier through Robert’s teaching methods. Moreover, you will even enjoy the process, as the book includes exercises and projects that offer early wins to boost your motivation.
Although I have never met Robert in person, he helped me become a professional game developer in a very direct way—by creating tutorials and Godot Engine-related content on YouTube that both aided and motivated me. At the time of writing this foreword, his channel has over 50,000 subscribers, which is a testament to the usefulness of his videos and his prolific will to help people get started with game development in Godot.
Reading through these pages and doing the exercises transports me back to when I was a beginner—a blank slate—and makes me excited to try out new things. Because if there is one thing that is most important, it is this: always keep a beginner’s mindset and experiment. Every time you learn something or do an exercise, take it to its limits. Change a value here and there until it breaks, and then take a step back. It’s only when we leave the path that we see clearly why the path is there in the first place.
So, I will hold you no longer. Go explore the path laid out by Robert in this excellent book. Look at it as an adventure. Experiment freely, explore the possibilities, and find your own style. You won’t regret it.
Sander Vanhove,
Lead Game Developer and Technical Artist, and Author of the bestselling book Learning GDScript by Developing a Game with Godot 4
Robert Henning has over 20 years of computer science education experience, specializing in game development. He has taught game development using Scratch, Java with Greenfoot, Delphi, Construct 3, Unity, and Godot. A passionate advocate for Godot, Robert has promoted this platform since the early versions.
Robert also runs a popular YouTube channel (https://www.youtube.com/@GameDevJourney) offering tutorials and showcasing games made with Godot. His hands-on approach and dedication to accessible learning have earned him a reputation as a trusted educator. Godot 4 for Beginners is a culmination of his expertise, designed to guide newcomers through creating their own games with clear, step-by-step instructions.
Deepak Jadhav is an experienced professional with extensive experience in game development and project management, particularly in extended reality (XR) technologies. He excels in creating immersive augmented reality (AR) and mixed reality (MR) experiences, delivering innovative solutions across various industries. His expertise spans game programming, game engines (Godot, Unity, and Unreal), AI system implementation, and applying these skills to enterprise applications. Deepak holds a Master’s degree in Game Development and Project Management and a Bachelor’s degree in Computer Technology, equipping him with technical and managerial skills for leading complex XR and game development projects.
Ural, a game developer based in Turkey, holds a PhD in veterinary medicine. His journey in game development began in high school with Python, leading him to work on diverse projects using engines such as Godot, Unity, and Unreal Engine. He started using Godot as his first game engine in 2018 and has solo-developed various games with it. Since 2021, he has been a lead developer at Harmonia Games. Ural is passionate about exploring different workflows and game architectures. He led the development of the PC game REM the Dreamer, released on Steam, and engineered his own custom game engine from the ground up using C++.
Henrique “Ludonaut” Campos is an indie game developer and game designer working in the industry for years. Started as a University teacher in 2015 in the Computer Graphics and Artificial Intelligence chairs and working in the GDQuest team from 2018 to 2022, Henrique is also an independent consultant for studios and schools. Under the alias of Ludonaut, Henrique creates game development content on his YouTube channel creating games, assets, ebooks, and courses that can be found in his itch.io profile. Being the author of the Game Development Patterns with Godot 4 book, Henrique paved the way for Godot users to make reusable and scalable code libraries for Godot Engine projects.
Preface
Part I: Learning How the Godot Engine Works
Let’s Get Godot-ing!
Getting the most out of this book – get to know your free benefits
Next-gen reader
Interactive AI assistant (beta)
DRM-free PDF or ePub version
Technical requirements
What is Godot?
What makes Godot so special?
Setting up Godot 4
Creating a new project
Making the scene dynamic
Delta
Continuing the bouncing label project
Summary
Exploring the Godot Engine Interface
Technical requirements
Important terms
Editing an existing Godot project
Creating an additional scene
Reacting to player input
Scripting player reactions to input
Hiding the label until the user provides input
Input handling
Summary
Introduction to 3D
Technical requirements
Creating 3D objects
Moving around the scene
Creating a material for your object
Creating a material
Applying a material
Challenge yourself
Creating lighting for the scene
Directional light
Omni light
Spotlight
Summary
Scripting with GDScript
Technical requirements
Understanding GDScript
Creating scripts
Understanding functions
Understanding the game loop
_ready()
_process(delta)
_physics_process(delta)
Understanding variables
Creating a variable
Data types
Naming conventions
Understanding operators
Order of operations
Practice exercise
Relational and comparison operators
Practice exercise
Using custom functions
Arguments and parameters or function inputs
Functions can return output
Summary
Part II: Working with the Godot Engine
Understanding Vectors
Technical requirements
What are vectors?
Coordinates in Godot
Using vectors in Godot
Movement and positioning
Vector addition
Vector subtraction
Vector multiplication
Vector length
Distance
Normalization
Summary
Creating a 2D Mini-Game in Godot – Part 1
Technical requirements
Building the level with a TileMap
Creating and controlling the player
Adding the background
Setting up the player animations
Detecting collisions
TileMap collisions
Collision layers and collision masks
Painting the tiles
Adding the CharacterBody2D template for the Player script
Cleaning the code
Summary
Creating a 2D Mini-Game in Godot – Part 2
Technical requirements
Controlling player animations with code
Helper variables
Wall-sliding and double-jumping mechanics
Double-jump function
Wall-slide function
Checking conditions
Detecting input
Resetting the wall slide
Limiting downward speed
Animate function
Falling through platforms
Adding collectible items
Strawberry scene (our collectible item)
Implementing the Strawberry script
Adding a patrolling enemy
Mushroom stomping
Implementing level completion
Summary
Part III: Building and Beyond – Your Game Development Journey
Creating a 3D Mini-Game in Godot – Part 1
Technical requirements
Working in 3D: a new dimension in Godot
Building a 3D character
Creating a level design
Creating a level component
Example: creating a grass platform
Handling irregular collision shapes
Creating the level layout
Organizing the level scene
Working with a Character Controller script
Using variables
Linking the Player script with the camera
Alternative method for adding reference variables
Exploring functions
Creating an input map
Implementing player controls and actions
Handling game events and feedback
Implementing a camera controller
Running tests
Summary
Creating a 3D Mini-Game in Godot – Part 2
Technical requirements
Exploring collectibles
Creating the Gem scene
Adding the Gem script
Introducing obstacles
Creating the Cannon scene
Creating the Ball scene
Writing the Ball script
Writing the Cannon script
Completing our level
Creating the Flag scene
Changing scenes
Polishing our level
Setting the background color
Adding particle effects
Creating the smoke scene
Adding audio to our level
Using the sine function
Summary
Adding Game Juice
Technical requirements
Understanding game juice
Foundations of juicing: animation and audio
Visual feedback (animation and particle effects)
Audio feedback (music and sound effects)
Implementing a health bar HUD
Developing a heart-based health system
Updating the HUD in the Level script
Adding a hit animation
Creating a confetti cannon effect
Scripting the confetti cannon
Adding audio and sound effects
Implementing a sound effect
Summary
Understanding Game Design
Technical requirements
Understanding the foundations of game design
Introducing the game design document
Why is documentation necessary for your game design?
Understanding the guiding principles for the GDD
Think visually
Keep it brief and clear
Stay organized
Learn by example
Exploring the Game Design Document
Title: what will you call your game?
Team: who will build or develop the game?
Status: what is the status of the project?
Statement of concept: what is your game about in one sentence?
Expanded concept paragraph and USP: what makes your game unique, and how can you describe it in more detail?
Genre: what type of game are you making?
Audience: who is this game for?
Experience: what should the player feel or experience while playing?
Anchor points: what are the core ideas, inspirations, or reference points?
Platform: which platforms will the game be released on?
Review competition: what similar games exist, and how will yours stand out?
Assets: what art, sound, and other resources will your game need?
Monetization: how will the game generate revenue, if at all?
Describing game elements of the GDD in detail
Player progression and objectives
Game world and background
User interface
Audio and visual style
Game systems and features
Software requirements
Game objects
Detailed asset list
Prototypes
Playtesting
Archive
Current concerns and considerations
Implementation details
Summary
Where to Next?
Technical requirements
Utilizing educational resources
YouTube
Blogs
Exploring opportunities for practice
Participating in game jams
Community and networking
Why networking matters
Where to build your network
People to follow
Utilizing tools and assets
Tools
Resources
Building your portfolio
Developing game ideas
Design guide for your next project
Further reading
Summary
Unlock Your Book’s Exclusive Benefits
How to unlock these benefits in three easy steps
Step 1
Step 2
Step 3
Need help?
Other Books You May Enjoy
Index
Cover
Index
In this first part of the book, you’ll build a strong foundation in using the Godot game engine. We’ll begin by exploring Godot’s origins and what makes it a unique and powerful tool for game development. Then, you’ll get hands-on with the engine’s interface, learning how scenes, nodes, and the editor all work together. You’ll also take your first steps into 3D game development and dive into scripting with GDScript, Godot’s intuitive, Python-like language. By the end of this part, you’ll be ready to begin creating interactive games with confidence.
This part of the book includes the following chapters:
Chapter 1, Let’s Get Godot-ing!Chapter 2, Exploring the Godot Engine InterfaceChapter 3, Introduction to 3DChapter 4, Scripting with GDScript