GODOT
Create a video game in the Godot engine
Following on from last issue’s introduction to the development engine Godot, Calvin Robinson shows you how to develop your own game.
Calvin Robinson
Godot is an open source video game development engine. In last issue we looked at the engine platform and produced our first application: a 2D interface that displayed Hello World. This issue we’re going to use Godot to develop our first video game.
We’re going to start off with a dodge ‘em game, reminiscent of Asteroids, with enemies swarming a two-dimensional environment and the player having to avoid them. However, we won’t have a weapon to begin with, so to score any points we’ll have to survive for the longest amount of time possible, without colliding with any enemies.
Two-dimensional games are simpler to create, so we’ll start there, before jumping in to a three-dimensional environment.
Let’s begin with a brand new project in Godot. Assuming that you followed along from last issue, launch Godot. Otherwise, make sure you have everything installed.
OUR EXPERT
Calvin Robinson is a subject matter expert at the National Centre for Computing Education, and a computer science teacher.
Full Steam for Godot
The easiest way of getting Godot downloaded, installed and kept up to date is by using Steam. A simple sudo apt-get update && sudo apt-get install steam should get Steam sorted on a Debian-based distro. There’s also a .deb installer available at SteamPowered.com. Run Steam for the first time, accept the terms and conditions and then install the font packages. Sign up and sign in, and you’re ready to go.
On the Steam store page, search for Godot, install it for free and it’ll appear in your library. Depending on your Steam settings, Godot should now stay up to date at all times. Use the library to launch Godot. You can add a desktop and/or start menu shortcut by right-clicking and going to Properties.
Godot editing suite is incredibly intuitive by design.
In the Godot Project Manager create a new Project, setting the window resolution to 480x720 by going to Project Settings>Display, Window. We’ll also want to set the Stretch option to 2D Mode and tick Keep on the aspect ratio to ensure nothing goes off-kilt and the aspect ratio remains in place at all times. We’re developing a game in portrait mode, and we don’t want things to be shifted too much at any point.
We’ll need the dodge assets from Godot’s wiki page (https://docs.godotengine.org): download them from https://bit.ly/38RFPgS. This package includes all the sprites and sound effects we’ll need, so that we can focus on building the game itself, rather than spending time creating such assets. Of course, if you want to edit these or create your own assets from scratch to give your version of the game a personal touch to it, feel free to do so. Everything is open source.