Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
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
$19.99 per month
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.9 (18 Ratings)
Paperback Jun 2018 298 pages 1st Edition
eBook
$9.99 $55.99
Paperback
$69.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Chris Bradfield
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.9 (18 Ratings)
Paperback Jun 2018 298 pages 1st Edition
eBook
$9.99 $55.99
Paperback
$69.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$9.99 $55.99
Paperback
$69.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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 : 9781788831505
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

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
$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 $5 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 $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 111.98
Godot Engine Game Development Projects
$69.99
Game Development with Blender and Godot
$41.99
Total $ 111.98 Stars icon
Banner background image

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 included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.