Building an RPG Engine from Scratch

Over the past few months, I've been working on something that's been on my bucket list for years: a traditional turn-based RPG engine. Not just a simple battle system, but a complete framework with party management, dialogue, inventory, shops, and all the systems you'd expect from a classic RPG.

Why GameMaker Studio 2?

While many developers reach for Unity or Godot for RPG projects, I chose GameMaker Studio 2 for a few key reasons:

Core Systems Overview

The DN RPG Engine includes several interconnected systems:

Battle System

The heart of any RPG is its combat. I implemented a turn-based system with:

// Example: Status effect application in battle
function apply_status_effect(target, effect_type, duration) {
    if (!target.status_effects[effect_type]) {
        target.status_effects[effect_type] = duration;
        // Visual feedback and audio cue
        play_sfx(snd_status_applied);
    }
}

Controller Pattern Architecture

Rather than scattering logic across individual objects, I use specialized controller objects:

This pattern keeps the codebase organized and makes debugging much easier.

Challenges and Solutions

Save/Load System

Implementing a proper save system was trickier than expected. I had to persist:

The solution was creating a centralized save data structure that gets serialized to JSON and written to disk.

Localization Support

From the beginning, I wanted to support multiple languages. The solution was a JSON-based translation system that loads language files at runtime. All text strings reference keys like "battle_victory" or "item_health_potion" that get resolved based on the current language setting.

What's Next?

The engine is functional but there's still work to do:

Building this engine has been incredibly educational. It's one thing to play RPGs and appreciate their systems, but implementing them yourself gives you a whole new level of respect for the developers who create these experiences. If you're interested in RPG development, I highly recommend starting with a simple battle system and building up from there.