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 Learning GDScript by Developing a Game with Godot 4
  • Table Of Contents Toc
  • Feedback & Rating feedback
Learning GDScript by Developing a Game with Godot 4

Learning GDScript by Developing a Game with Godot 4

By : Vanhove
4.8 (10)
close
close
Learning GDScript by Developing a Game with Godot 4

Learning GDScript by Developing a Game with Godot 4

4.8 (10)
By: Vanhove

Overview of this book

In the digital landscape driven by interactive experiences, the demand for creative individuals with the skills to create captivating games has never been higher. Written by Sander Vanhove, a seasoned game developer with over 20 games to his credit, this book will serve as your entry point into game development, showing you how to leverage the powerful features of the open-source, versatile GDScript 2.0 to develop your ideas, from simple platformers to complex RPGs. Whether you're an aspiring game developer, a hobbyist seeking a creative outlet, or simply someone intrigued by the world of game programming, this book will guide you through the intricacies of the Godot 4 game engine. Starting with a primer on the fundamentals of programming, you’ll cover everything from data to logic, while familiarizing yourself with Godot’s built-in tools such as the physics engine, navigation, and cameras. As you progress, you’ll unlock deeper insights into more advanced tools that will take your programming to the next level. Aided by easy-to-follow step-by-step tutorials, examples, exercises, and experiments, you’ll seamlessly integrate this newfound knowledge to create a Vampire Survivor-like game from scratch. By the end of this book, you’ll have become proficient in leveraging the Godot 4 game engine to bring your gaming visions to life.
Table of Contents (22 chapters)
close
close
1
Part 1:Learning How to Program
7
Part 2: Making a Game in Godot Engine
14
Part 3: Deepening Our Knowledge

What this book covers

Chapter 1, Setting Up the Environment, starts off the book by setting up everything we need to create games in the Godot Engine and gives a brief overview of the engine and how to write scripts.

Chapter 2, Getting Familiar with Variables and Control Flow, explains the major concepts of what variables are and how we can store data within them. From here, we go over different control flows that help us make decisions during the execution of our game.

Chapter 3, Grouping Information in Arrays, Loops, and Dictionaries, teaches about two new data types: arrays and dictionaries. These will help us group data in a more structured format. Along the way, we will learn about the two different kinds of loops with which we can loop over different sets of data.

Chapter 4, Bringing Structure with Methods and Classes, delves into writing reusable pieces of code using methods and how to structure variables and methods into classes.

Chapter 5, How and Why to Keep Your Code Clean, introduces many concepts around writing clean code, which will help us create code that is reusable and understandable by others as well as ourselves.

Chapter 6, Creating a World of Your Own in Godot, will kick off our own game project. We’ll start by defining what kind of game we will be making and progress to making the base of a player character and the environment in which they will be moving around.

Chapter 7, Making the Character Move, offers a refresher on vector math, which is integral to moving entities around in two-dimensional space. Then, we’ll write the physics code to make our layer character move and go into debugging the game while it is running.

Chapter 8, Splitting and Reusing Scenes, shows how we can easily split up our game into multiple smaller scenes that are easier to manage and maintain, followed by how we can organize all the scene and script files in tidy folders within the project.

Chapter 9, Cameras, Collisions, and Collectibles, starts by making a smooth camera that will follow the player character without making the real-life player nauseous. After this, we’ll move on to handling collisions with the terrain and creating collectible items.

Chapter 10, Creating Menus, Making Enemies, and Using Autoloads, finishes up our single-player game by teaching us about the menu system of the Godot Engine, followed by the creation of enemies that can navigate through the world and projectiles with which the player can shoot these enemies. We conclude this chapter with an introduction to autoloads, with which we can store the high score.

Chapter 11, Playing Together with Multiplayer, converts our single-player experience into a multiplayer one. We start with a crash course in computer networking. After this, we will learn about MultiplayerSpawner and MultiplayerSynchronizer to be able to play our game with others over a network.

Chapter 12, Exporting to Multiple Platforms, shows how we can export the game for different platforms such as Windows, macOS, Linux, and even the web. We will conclude the chapter by uploading our game to Itch.io, a popular platform for indie games.

Chapter 13, OOP Continued and Advanced Topics, introduces the more advanced object-oriented programming (OOP) topics such as the super keyword, static variables, enumerations, lambda functions, the different ways of passing values to methods, and the tool keyword.

Chapter 14, Advanced Programming Patterns, gives us a basis for programming patterns and explores the Event Bus, Object Pool, and State Machine patterns so that we can use them in our next project.

Chapter 15, Using the File System, introduces the file system of the Godot Engine and shows us how we can save and load data in our game.

Chapter 16, What Next?, leaves us with some last techniques and resources to start the next game project as well as introduce the game development community we can be part of.

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

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