Skip to content
Max Busson edited this page Aug 20, 2024 · 16 revisions

Tactical RPG Codebase Wiki

Welcome to the godot-tactical-rpg wiki!

This guide will help you understand the structure and key components of the codebase.

Project Overview

This project is a tactical RPG framework built for Godot using GDScript.

Features

  • Turn-based combat system

  • Grid-based map

  • Character classes

  • Advanced camera handling

  • Mouse & Keyboard support

  • Gamepad/Controller support

  • Single-player gameplay

  • Toggleable debugger features

    358905181-8098806a-92f6-4ee4-9450-b598093df7d7

Coding Standards

This project tries its best to adhere to the below rules:

  • Follow the GDScript Style Guide

  • Use static typing for better performance and code clarity

  • Implement thorough in-editor documentation using GDScript comment standards

    358904864-47ee9852-2408-4879-8975-220fb266120a

Project Structure

We use a shared-assets architecture, which is meant to facilitate scalability & maintenance. Though it's a great system for the above goals, it can be a bit... Daunting, at first!

But do not fret -- here is a guide to navigating the codebase.

High-Level Structure Overview

65bb6862-6e84-4149-af5a-047a04f413eb

Detailed Project Architecture

WIP dedicated article

Getting Started

  1. Familiarize yourself with the main.gd script to understand how the game initializes.
  2. Explore the TacticsLevel class to see how combat flows are managed. a. TacticsArena is in charge of loading and initialising the map and its tiles. Takle a look here to understand grid and pathfinding mechanics. b. TacticsParticipant is where the bulk of the combat turn logic lives. c. Check TacticsPawn to see how individual units are implemented.

Extending the Codebase

Add Character Classes

To add new character classes, create new resource files in the data/models/world/stats/expertise/ directory.

Add mechanics

For new gameplay mechanics, consider adding new service classes to handle the logic. Service classes are nested under their resource folder in /data/modules

Add UI Elements

UI extensions should be added to the data/modules/ui/ directory.

Performance Considerations

  • The codebase is designed to be lightweight and scalable
  • Use the provided utility classes (e.g., CalcVector) for optimized calculations
  • Leverage the modular structure to keep individual components focused and efficient

For more detailed information on specific components, please refer to the individual pages in this wiki.

Clone this wiki locally