Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Godot Engine Game Development Projects
Godot Engine Game Development Projects

Godot Engine Game Development Projects: Build five cross-platform 2D and 3D games with Godot 3.0

Arrow left icon
Profile Icon Chris Bradfield
Arrow right icon
S$52.99 S$75.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.9 (18 Ratings)
eBook Jun 2018 298 pages 1st Edition
eBook
S$52.99 S$75.99
Paperback
S$94.99
Subscription
Free Trial
Arrow left icon
Profile Icon Chris Bradfield
Arrow right icon
S$52.99 S$75.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.9 (18 Ratings)
eBook Jun 2018 298 pages 1st Edition
eBook
S$52.99 S$75.99
Paperback
S$94.99
Subscription
Free Trial
eBook
S$52.99 S$75.99
Paperback
S$94.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Godot Engine Game Development Projects

Coin Dash

This first project will guide you through making your first Godot Engine project. You will learn how the Godot editor works, how to structure a project, and how to build a small 2D game.

Why 2D? In a nutshell, 3D games are much more complex than 2D ones, while 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 game development process. At that point, the jump to 3D will be much easier. You'll get an introduction to 3D in this book's fifth and final project.

Important—don't skip this chapter, even if you aren't a complete newcomer to game development. While you may already understand many of the underlying concepts, this project will introduce a number of fundamental Godot features and design paradigms that you'll need to know going...

Project setup

Launch Godot and create a new project, making sure to use the Create Folder button to ensure that this project's files will be kept separate from other projects. You can download a Zip file of the art and sounds (collectively known as assets) for the game here, https://github.com/PacktPublishing/Godot-Game-Engine-Projects/releases.

Unzip this file in your new project folder.

In this project, you will make three independent scenes: Player, Coin, and HUD, which will all be combined into the game's Main scene. In a larger project, it might be useful to make separate folders to hold each scene's assets and scripts, but for this relatively small game, you can save your scenes and scripts in the root folder, which is referred to as res:// (res is short for resource). All resources in your project will be located relative to the res:// folder. You can see...

Vectors and 2D coordinate systems

Note: This section is a very brief overview of 2D coordinate systems and does not delve very deeply into vector math. It is intended as a high-level overview of how such topics apply to game development in Godot. Vector math is an essential tool in game development, so if you need a broader understanding of the topic, see Khan Academy's Linear Algebra series (https://www.khanacademy.org/math/linear-algebra).

When working in 2D, you'll be using Cartesian coordinates to identify locations in space. A particular position in 2D space is written as a pair of values, such as (4,3), representing the position along the x and y axes, respectively. Any position in the 2D plane can be described in this way.

In 2D space, Godot follows the common computer graphics practice of orienting the x axis to the right, and the y axis down:

If you're...

Part 1 – Player scene

The first scene you'll make defines the Player object. One of the benefits of creating a separate player scene is that you can test it independently, even before you've created the other parts of the game. This separation of game objects will become more and more helpful as your projects grow in size and complexity. Keeping individual game objects separate from each other makes them easier to troubleshoot, modify, and even replace entirely without affecting other parts of the game. It also makes your player reusable—you can drop the player scene into an entirely different game and it will work just the same.

The player scene will display your character and its animations, respond to user input by moving the character accordingly, and detect collisions with other objects in the game.

...

Part 2 – Coin scene

In this part, you'll make the coins for the player to collect. This will be a separate scene describing all of the properties and behavior of a single coin. Once saved, the main scene will load the coin scene and create multiple instances (that is, copies) of it.

Node setup

Click Scene | New Scene and add the following nodes. Don't forget to set the children to not be selected, like you did with the Player scene:

  • Area2D (named Coin)
  • AnimatedSprite
  • CollisionShape2D

Make sure to save the scene once you've added the nodes.

Set up the AnimatedSprite like you did in the Player scene. This time, you only have one animation: a shine/sparkle effect that makes the coin look less flat and...

Part 3 – Main scene

The Main scene is what ties all the pieces of the game together. It will manage the player, the coins, the timer, and the other pieces of the game.

Node setup

Create a new scene and add a node named Main. To add the player to the scene, click the Instance button and select your saved Player.tscn:

Now, add the following nodes as children of Main, naming them as follows:

  • TextureRect (named Background)—for the background image
  • Node (named CoinContainer)—to hold all the coins
  • Position2D (named PlayerStart)—to mark the starting position of the Player
  • Timer (named GameTimer)—to track the time limit

Make sure Background is the first child node. Nodes are drawn in the order...

Part 4 – User Interface

The final piece your game needs is a user interface (UI). This is an interface to display information that the player needs to see during gameplay. In games, this is also referred to as a Heads-Up Display (HUD), because the information appears as an overlay on top of the game view. You'll also use this scene to display a start button.

The HUD will display the following information:

  • Score
  • Time remaining
  • A message, such as Game Over
  • A start button

Node setup

Create a new scene and add a CanvasLayer node named HUD. A CanvasLayer node allows you to draw your UI elements on a layer above the rest of the game, so that the information it displays doesn't get covered up by any game elements...

Part 5 – Finishing up

You have created a working game, but it still could be made to feel a little more exciting. Game developers use the term juice to describe the things that make the game feel good to play. Juice can include things like sound, visual effects, or any other addition that adds to the player's enjoyment, without necessarily changing the nature of the gameplay.

In this section, you'll add some small juicy features to finish up the game.

Visual effects

When you pick up the coins, they just disappear, which is not very appealing. Adding a visual effect will make it much more satisfying to collect lots of coins.

Start by adding a Tween node to the Coin scene.

...

Summary

In this chapter, you learned the basics of Godot Engine by creating a basic 2D game. You set up the project and created multiple scenes, worked with sprites and animations, captured user input, used signals to communicate with events, and created a UI using Control nodes. The things you learned here are important skills that you'll use in any Godot project.

Before moving on to the next chapter, look through the project. Do you understand what each node is doing? Are there any bits of code that you don't understand? If so, go back and review that section of the chapter.

Also, feel free to experiment with the game and change things around. One of the best ways to get a good feel for what different parts of the game are doing is to change them and see what happens.

In the next chapter, you'll explore more of Godot's features and learn how to use more...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Learn the art of developing cross-platform games
  • Leverage Godot’s node and scene system to design robust, reusable game objects
  • Integrate Blender easily and efficiently with Godot to create powerful 3D games

Description

Godot Engine Game Development Projects is an introduction to the Godot game engine and its new 3.0 version. Godot 3.0 brings a large number of new features and capabilities that make it a strong alternative to expensive commercial game engines. For beginners, Godot offers a friendly way to learn game development techniques, while for experienced developers it is a powerful, customizable tool that can bring your visions to life. This book consists of five projects that will help developers achieve a sound understanding of the engine when it comes to building games. Game development is complex and involves a wide spectrum of knowledge and skills. This book can help you build on your foundation level skills by showing you how to create a number of small-scale game projects. Along the way, you will learn how Godot works and discover important game development techniques that you can apply to your projects. Using a straightforward, step-by-step approach and practical examples, the book will take you from the absolute basics through to sophisticated game physics, animations, and other techniques. Upon completing the final project, you will have a strong foundation for future success with Godot 3.0.

Who is this book for?

Godot Engine Game Development Projects is for both new users and experienced developers, who want to learn to make games using a modern game engine. Some prior programming experience in C and C++ is recommended.

What you will learn

  • Get started with the Godot game engine and editor
  • Organize a game project
  • Import graphical and audio assets
  • Use Godot's node and scene system to design robust, reusable game objects
  • Write code in GDScript to capture input and build complex behaviors
  • Implement user interfaces to display information
  • Create visual effects to spice up your game
  • Learn techniques that you can apply to your own game projects

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 29, 2018
Length: 298 pages
Edition : 1st
Language : English
ISBN-13 : 9781788836425
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

Publication date : Jun 29, 2018
Length: 298 pages
Edition : 1st
Language : English
ISBN-13 : 9781788836425
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total S$ 151.98
Godot Engine Game Development Projects
S$94.99
Game Development with Blender and Godot
S$56.99
Total S$ 151.98 Stars icon

Table of Contents

8 Chapters
Introduction Chevron down icon Chevron up icon
Coin Dash Chevron down icon Chevron up icon
Escape the Maze Chevron down icon Chevron up icon
Space Rocks Chevron down icon Chevron up icon
Jungle Jump (Platformer) Chevron down icon Chevron up icon
3D Minigolf Chevron down icon Chevron up icon
Additional Topics Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.9
(18 Ratings)
5 star 50%
4 star 22.2%
3 star 0%
2 star 27.8%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Irwin Rodriguez Nov 03, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Tengo como mes y medio de haberlo comprado y me parece estupendo, ahora mismo acabo de finalizar el segundo juego "Escape the Maze" que enseña el movimiento basado en celdas o grilla. En mi opinión el libro está bastante bien, me gusta la ideal de Chris de enseñar a traves de proyectos ya que así se aprende de una forma más pracmática y menos teórica.Una cosa si debo aclarar: si eres totalmente nuevo en este mundo entonces no te recomiendo este libro ya que supone que el lector posee conocimientos en programación. Yo lo entiendo sin mayor problema porque tengo más de 10 años en la programación de aplicaciones para escritorio y conozco del tema, pero debo ser honesto y decir que el libro da por sentado que tú como lector ya conoces de este mundo.La programación de videojuegos es 100% POO (Programación orientada a objetos) por lo tanto si eres nuevo no vas a poder llevarle el ritmo al libro, en ese caso te recomiendo que comiences por un curso gratis en la web sobre Python ya que el autor utiliza GDScript como lenguaje de programación y éste es 90% similar a Python, de manera que les recomiendo Python a los nuevos programadores.No quería valorar el libro todavía porque aun me quedan 3 proyectos por aprender, pero basandome en los 2 proyectos que acabo de terminar puedo decir que me ha resultado muy útil y he aprendido muchisimo con las tecnicas expuestas por el autor.Lo recomiendo 100% pero para personas que ya sepan programación orientada a objetos.
Amazon Verified review Amazon
Gabriel Aug 05, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Artículo perfecto y en plazo.
Amazon Verified review Amazon
cybereality Dec 17, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Godot Engine Game Development Projects is not only one of the best Godot books you can buy, it may be the best game development book out there bar none. Unlike many other books, it doesn’t start by teaching you about the API or performing simple actions. Instead, Chris Bradfield jumps straight into coding complete game projects, 5 in total, with ample source code examples and clear explanation. This is far beyond what I typically read. The author shows how to make games with title screens, pausing, user interface, and very complete in function. Like with the platformer chapter you see not only how to move and jump, but also climbing up ladders, dust particles when you land, making a parallax background, and extra features you don’t usually see. Most of the projects are in 2D, but the last chapter makes a mini-golf game in 3D, so that was a nice bonus.Inside the text we have 5 fairly complete game projects for you to follow along with. The first project is called Coin Dash, and is a simple game where you collect coins. It covers vector movement, sprite animation, collision detection, creating UIs for score and time, using buttons, and managing states. The next game is called Escape the Maze, which adds an enemy, using a TileSet and TileMap for laying out the level, using global scripts, sound effects, and saving a high score to a local file. Then Bradfield presents Space Rocks, an Asteroids-like clone. In this project we learn about rigid body physics, using state machines, screen wrap, shooting bullets, spawning objects, and creating enemies. This is a very complete project, not only can you move and shoot, but there are explosion effects, when shooting rocks they break into smaller rocks, objects bounce off each other, he shows how to pause the game, enemies shoot at you, etc. Very well done.For the 4th game we make a platformer called Jungle Jump. Here we use kinematic bodies, utilize collision layers and masks, sprite animation, scrolling backgrounds, the HUD, a title screen, collectable items, and the basics of movement and jumping. At the end there are some finishing touches like a double jump, dust particles when you land, crouching, even climbing up ladders. The fifth game is 3D Minigolf, which introduces some 3D concepts, importing meshes, working with cameras, using GridMaps, collision, and a UI. Finally, the book concludes with various topics such as learning to use the API docs, exporting to mobile, working with shaders, additional supported programming languages, and how to contribute to the community.I would have to say, this is an amazing book for Godot and, well, maybe the best game development text I have ever read (and I read a lot). Most books only scratch the surface with simple tech demos, but here we have 5 fairly complete games. I mean, they’re are definitely demos, but above and beyond what you see in many tutorials. For example, the platformer where you have dust effects when landing, climbing ladders, and all that. You also see how a larger project is structured, including pausing, title and game over screens, multiple levels, etc. This is especially useful when starting out, as there is a break between looking at the API or a basic tutorial, and then finishing a complete game. So I feel this book has an advantage over most other texts out there. I honestly could not be more happy with what I have read here. I would recommend this book to game developers at all levels. Either people experienced with coding who want to learn how things are done in Godot, or even people just starting out. This book is gold.
Amazon Verified review Amazon
Arch Stanton Jan 10, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you're looking for a Godot learning guide at any level, you know how slim the pickings are. This book, while not perfect, presents a polished and comprehensive introduction that serves as a very good foundation to a fast-changing/growing authoring tool. I look forward to seeing future editions of it and using them in my classes.
Amazon Verified review Amazon
Joshualp Dec 21, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It is very useful in learning how to program with Godot. Follow the examples and you will build games.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.