Skip to content
bozar edited this page May 9, 2024 · 6 revisions

Godot 4 Roguelike Tutorial

This tutorial shows how to build a single player, turn based Roguelike game with Godot 4 engine and GDScript. You can find source code on GitHub. The finished game is available on GitHub release page or itch.io page. There is also a demo video on Youtube. It is a successor to my Godot 3 tutorial with two differences.

Firstly, most part of the tutorial is about writing scripts for a Roguelike game, rather than teaching GDScript grammar or engine usage. I assume that you know the basics of Godot 4 engine and are quite familiar with traditional Roguelike games.

Secondly, the tutorial aims to build a more complicated game than its Godot 3 counterpart. Below is an overview of all chapters.

  • Chapter 00: Create a project and change settings.
  • Chapter 01: Create a colorful PC that moves 1 grid per key stroke.
  • Chapter 02: Let PC move over dungeon floors.
  • Chapter 03: Let PC interact with traps, buildings & NPCs.
  • Chapter 04: Create a scheduling system.
  • Chapter 05: Implement PC field of view.
  • Chapter 06: Implement NPC AI.
  • Chapter 07: Manage game progress: win, lose & spawn NPCs.
  • Chapter 08: Generate a dungeon from prefabs.
  • Chapter 09: Add wizard keys and menus (help & settings). Export the game.
  • Appendix A: Provide an overview of folder structure and scene tree.

Every chapter focuses on a specific field and can be read in any order. However, if you find them confusing or even daunting, fear not this night. Dark Knight is coming!

Source code is categorized by tags.

  • 0: The last commit of Chapter 0.
  • 1a: Chapter 1, Part A.
  • 2c1: Chapter 2, Part C, Section 1.
  • fix/3d2/1: The first bug fix for Chapter 3, Part D, Section 2.

The game is built with Godot 4.2.1. I also use VSCode and godot-tools (geequlim.godot-tools) plugin for development.

Clone this wiki locally