Reader small image

You're reading from  Godot 4 Game Development Projects - Second Edition

Product typeBook
Published inAug 2023
Reading LevelN/a
PublisherPackt
ISBN-139781804610404
Edition2nd Edition
Languages
Tools
Right arrow
Author (1)
Chris Bradfield
Chris Bradfield
author image
Chris Bradfield

Chris Bradfield has worked in the Internet technology space for over 25 years. He has worked in the online gaming space for a number of MMO and social gaming publishers in South Korea and the United States. In his game industry career, he has served as a game designer, developer, product manager, and team leader. In 2012, he discovered a love for teaching and founded KidsCanCode to provide programming instruction and curriculum to young students. He is a member of the Godot Engine documentation team and works to provide learning resources for game development students around the world.
Read more about Chris Bradfield

Right arrow

Next Steps and Additional Resources

Congratulations! The projects you’ve built in this book have started you on the road to becoming a Godot expert. However, you’ve only just scratched the surface of what’s possible in Godot. As you become more proficient and the sizes of your projects grow, you’ll need to know how to find solutions to your problems, how to distribute your games so they can be played, and even how to extend the engine yourself.

In this chapter, you’ll learn about the following topics:

  • How to effectively use Godot’s built-in documentation
  • Using Git to back up and manage your project files
  • An overview of some of the vector math concepts you’ll encounter in most game projects
  • Using Blender, an open source 3D modeling application, to make 3D objects you can use in Godot
  • Exporting projects to run on other platforms
  • An introduction to shaders
  • Using other programming languages in Godot
  • ...

Using Godot’s documentation

Learning Godot’s API can seem overwhelming at first. How can you learn about all the different nodes and the properties and methods each one contains? Fortunately, Godot’s built-in documentation is there to help you. Develop the habit of using it often: it will help you find things when you’re learning, but it’s also a great way to quickly look up a method or property for reference once you know your way around.

Leveling up your skills

Learning to effectively use API documentation is the number one thing you can do to dramatically boost your skill level. Keep a docs tab open in your web browser while you’re working and reference it often, looking up the nodes and/or functions you’re using.

When you are in the Script tab of the editor, you’ll see the following buttons in the upper-right corner:

Figure 7.1: Documentation buttons

Figure 7.1: Documentation buttons

The Online Docs button will open the...

Version control – using Git with Godot

It happens to everyone – at a certain point, you’ll make a mistake. You’ll accidentally delete a file or just change some code in a way that breaks everything, but you can’t figure out how to get back to the working version.

The solution to this problem is version control software (VCS). The most popular VCS, used by developers all over the world, is Git. When you use Git with your projects, every change you make is tracked, allowing you to “rewind” time at any point and recover from unwanted changes.

Fortunately, Godot is very VCS-friendly. All the content of your game is kept in the project folder. Scenes, scripts, and resources are all saved in a human-readable text format that is easy for Git to track.

Git is typically used via a command-line interface, but there are graphical clients you can use as well. There is also a Git plugin available in Godot’s AssetLib that you can try...

Using Blender with Godot

Blender is a very popular open source 3D modeling and animation program (it does a lot of other things too). If you’re planning on making a 3D game and you need to make items, characters, and environments for your game, Blender is probably your best option for doing so.

The most common workflow is to export glTF files from Blender and import them into Godot. This is a stable and reliable workflow and will work well in most situations.

When you export a glTF file, you have two options: glTF binary (.glb) and glTF text (.gltf). The binary version is more compact and is therefore the preferred format, but either will work fine.

Import hints

It’s common to import meshes from Blender and then make modifications such as adding collisions or removing unneeded nodes. To simplify this, you can add suffixes to the names of your objects to give Godot a hint about how you want them to be processed on import. Here are some examples:

  • -noimp...

Exporting projects

Eventually, your project will reach the stage where you want to share it with the world. Exporting your project means converting it into a package that can be run by someone who doesn’t have the Godot editor. You can export your project to a number of popular platforms.

Godot supports the following target platforms:

  • Android (mobile)
  • iOS (mobile)
  • Linux
  • macOS
  • HTML5 (web)
  • Windows Desktop
  • UWP (Windows Universal)

The requirements for exporting a project vary depending on the platform you are targeting. For example, to export to iOS, you must be running on a macOS computer with Xcode installed.

Each platform is unique, and some features of your game may not work on some platforms because of hardware limitations, screen size, or other factors. As an example, if you wanted to export the Coin Dash game for an Android phone, your player wouldn’t be able to move because the user wouldn’t have a keyboard! For...

Introduction to shaders

A shader is a program that is designed to run on the GPU and alters the way that objects appear on the screen. Shaders are used extensively in both 2D and 3D development to create a variety of visual effects. They are called shaders because they were originally used for shading and lighting effects, but today they are used for a wide variety of visual effects. Because they run in the GPU in parallel, they are very fast but also come with some restrictions.

Learning more

This section is a very brief introduction to the concept of shaders. For a more in-depth understanding, see https://thebookofshaders.com/ and Godot’s shader documentation at .

Earlier in this book, when you added a StandardMaterial3D to a mesh, you were actually adding a shader – one that’s pre-configured and built into Godot. It’s great for many common situations, but sometimes you need something more specific, and for that, you’ll need to write shader...

Using other programming languages in Godot

The projects in this book have all been written using GDScript. GDScript has a number of advantages that make it the best choice for building your games. It is very tightly integrated with Godot’s API, and its Python-style syntax makes it useful for rapid development while also being very beginner-friendly.

It’s not the only option, however. Godot also supports two other “official” scripting languages and also provides tools for integrating code using a variety of other languages.

C#

C# is very popular in game development, and the Godot version is based on the .NET 6.0 framework. Because of its wide use, there are many resources available for learning C# and a great deal of existing code in the language for accomplishing a variety of game-related functions.

At the time of writing, Godot version 4.0 is still relatively new. Features are being added and bugs are being fixed continuously, so see the C#...

Getting help – community resources

Godot’s online community is one of its strengths. Because of its open source nature, there is a wide variety of people working together to improve the engine, write documentation, and help each other with issues.

You can find a list of official community resources at https://godotengine.org/community. These links may change over time, but the following are the main community resources you should be aware of:

The Godot GitHub repository is where Godot’s developers work. You can find Godot’s source code there if you find yourself needing to compile a custom version of the engine for your own use or if you’re just curious how things work under the hood.

If you find any kind of problem with the engine itself – something that doesn’t work, a typo in the documentation, and so on – this is the place where you should report it.

    ...

Contributing to Godot

Godot is an open source, community-driven project. All of the work that’s done to build, test, document, and otherwise support Godot is done primarily by passionate individuals contributing their time and skills. For the majority of contributors, it is a labor of love, and they take pride in helping to build something of quality that people enjoy using.

In order for Godot to continue growing and improving, there is always a need for more members of the community to step up and contribute. There are many ways you can help out, regardless of your skill level or the amount of time you can commit.

Contributing to the engine

There are two main ways you can directly contribute to Godot’s development. If you visit https://github.com/godotengine/godot, you can see Godot’s source code, as well as finding out exactly what’s being worked on. Click the Clone or Download button, and you’ll have the up-to-the-minute source code and...

Summary

In this chapter, you learned about a few additional topics that will help you continue to level up your Godot skills. Godot has a great many features in addition to those explored in this book. You’ll need to know where to look and where to ask for help as you move on to working on projects of your own.

You also learned about some more advanced topics, such as working with other programming languages and using shaders to enhance your game’s visual effects.

In addition, since Godot is built by its community, you learned how you could participate and become part of the team that is making it one of the fastest-growing projects of its kind.

Final words

Thank you for taking the time to read this book. I hope you found it useful in starting your game development journey with Godot. The goal of this book was not to give you a “copy-and-paste” solution to making games but rather to help you develop an intuition for the process of game development. As you’ll see when you explore other resources, there are often many ways to solve a problem, and there may not be a single “right” answer. It’s up to you as a developer to evaluate and determine what works for you in your situation. I wish you luck in your future game projects, and I hope to play them sometime in the future!

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Godot 4 Game Development Projects - Second Edition
Published in: Aug 2023Publisher: PacktISBN-13: 9781804610404
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Chris Bradfield

Chris Bradfield has worked in the Internet technology space for over 25 years. He has worked in the online gaming space for a number of MMO and social gaming publishers in South Korea and the United States. In his game industry career, he has served as a game designer, developer, product manager, and team leader. In 2012, he discovered a love for teaching and founded KidsCanCode to provide programming instruction and curriculum to young students. He is a member of the Godot Engine documentation team and works to provide learning resources for game development students around the world.
Read more about Chris Bradfield