DEV Community

Paul Mason
Paul Mason

Posted on • Updated on

Learning Godot Engine

Godot Engine is an open source 2D and 3D cross platform game engine. The editor runs on Windows, MacOS and Linux (and there's an experimental web editor) and exports games for Windows (native and UWP/Xbox), MacOS, Linux, Android, iOS and web. I think it's the strongest when it comes to 2D games amongst Unity, Unreal and Godot, but the weakest for 3D (this may change with the upcoming version 4 release that specifically addresses the 3D shortcomings). The current version (3.4.2) targets GLES2 and GLES3, while version 4 will target Vulcan/Metal and GLES3. All told, Godot is becoming more and more popular with indie developers (and studios - Sonic Colors was developed using Godot), but it still lacks a good catalogue of impressive titles and learning resources (although what exists is actually very good). The biggest issue I find with the learning resources, which is a general issue not limited to Godot, is it mostly takes the form of step by step (follow the instructor) tutorials that create a game, but you actually don't learn anything that sticks and helps you to develop your own games.

The point of this is to come up with a better approach to learning something complex (like game development) using a specific toolset that is quite complex (like Godot). The principles should be applicable to pretty much anything though. The approach is quite simple - just reverse the usual learning process. Instead of step by step detailed instructions on how to write a particular game, this approach forces you to figure things out for yourself and guides you towards a solution and creates greater understanding by getting you to understand the general problem space and the types of solution you're looking for, rather than just presenting a solution and that's it. I find this method particularly good because it forces me to do the work myself, rather than just sitting and watching passively and maybe trying to follow along with the on-screen code.

If you're struggling with a task, use Google or whatever resources you can find to complete it. You have to find the solution yourself, and don't move to the next task until you have. There's not time limit on anything, take as long as you need (and I don't have a clue how long it will take). Just remember - Google and use whatever resources you want, but make sure that you stay focused on the specific task/problem you want to solve. Don't go watch a 30 hour course or something silly like that.

Phase 1

This is to get to grips with the very rudimentary stuff - the outcome being you figuring out how to develop a simple little top-down 2D game all on your own, with just a few pointers on what to do. You can use GDScript, or C# - it's up to you. Just create a desktop game - don't worry about mobile for now.

Note: You're told more or less what to do, not how to do it - you have to figure out the how. The outcome is totally dependent on the decisions you make and how much effort you put into it.

Task 1

  • Download and install Godot and the export templates.

Task 2

  • Create an empty project and play around with the IDE looking at whatever is there (sections, settings, preferences, anything).
  • Don't try to create anything - just look. Don't worry if you don't understand what stuff does.

Task 3

  • Create a 2D scene with a single image player sprite (you can just use the default Godot robot icon).
  • Be able to move the sprite smoothly around the game window using the 4 arrow keys.
  • Find out how to restrict the sprite to the window bounds (stop at the bounds).
  • Found out how to wrap the sprite at the window bounds (reappear at the opposite side).

Task 4

Carrying on from the previous task:

  • Add 2 rectangles on the left and right side of the game window.
  • Wrap the player sprite when it crosses the rectangles and restrict it to the bounds everywhere else.
  • Add 2 squares anywhere within the game window.
  • When the player sprite collides with either square, teleport it to the other one.
  • After teleporting, reposition the starting square to another random position within the game windows (but not overlapping the other square).

Task 5

Carrying on from the previous task:

  • Replace the static sprite with an animated character (find one somewhere).
  • Replace the square and rectangular teleporters with some nicer images and make them animate in some way when they're activated.

Task 6

Carrying on from the previous task:

  • Add some solid obstacles like walls etc. that the player can't pass.
  • Add some pick-ups that the player can collect (coins, health, whatever).
  • Add some "danger items" (bombs, poison, etc.) that will (later) harm the player.

Task 7

Carrying on from the previous task:

  • Add some animated enemies that chase the player (like pac man) and cause harm when they touch it.

Task 8

Carrying on from the previous task:

  • Add some way for the player to defend itself against the enemies (other than just running away).

Task 9

Carrying on from the previous task:

  • Add a UI scoring system that displays the life/health and inventory based on the pick-ups and danger items.
  • Add sounds where it makes sense.

Task 10

  • Take what you've learned and create a complete single level game (you can start from scratch or modify what you've done - up to you).

Phase 2

In the previous phase you actually learned quite a lot. In this phase you'll just do a single thing - create 2 whole top-down games from scratch with multiple levels. Pick one of the ideas below:

  • A Xenon-2 Megablast clone (I love that game).
  • A Bomberman clone.

And, for your second game, come up with your own original idea; with the following limitations:

  • It must be a top-down 2D game (i.e. not a platformer).
  • It must be an arcade type game (not a puzzle or RPG, but it can have puzzle aspects if you want).

It probably goes without saying, but don't worry too much about the graphics and sounds. Use what you can find, but just don't make your game public if you steal copyrighted assets. If you have the ability to create your own that don't look totally rubbish, bonus!

Phase 3

Up until now, everything you've done has involved some fancy collision detection, but no "physics" - it's time to change that. The classic 2D games that use physics are platformers and "physics games" like Angry Birds (which are kind of like platformers, I suppose).

Task 1

Discussion (0)