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

eBook
€28.99 €41.99
Paperback
€52.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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
Estimated delivery fee Deliver to Estonia

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

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 : 9781788831505
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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
Estimated delivery fee Deliver to Estonia

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.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
€189.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 €5 each
Feature tick icon Exclusive print discounts
€264.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 €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 84.98
Godot Engine Game Development Projects
€52.99
Game Development with Blender and Godot
€31.99
Total 84.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

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela