Zawias: a painted isometric RPG built with local AI

Isometric RPGs from the late 90s had something today’s 3D games rarely try: hand-painted backgrounds with tiny characters walking across them. Every frame looked like an illustration from a tabletop rulebook. The catch was always the same. Someone had to paint that illustration, and then mark by hand where you can walk and what hides a character.
I wanted to see how much of that can be done locally today, on one home graphics card, with no cloud services. The result is Zawias: A Tale of the Rusty Market, a vertical slice RPG on the D&D 2024 rules (SRD 5.2) in Godot 4.7. It has an original world, four classes, turn-based combat, one quest with three routes, and it plays in English and Polish.
The world in one paragraph
Zawias is a ring-city hanging in the crack between the planes. Any door can become a gate if you carry the right key, and a key can be an object, a word or a memory. Belief has weight here: factions literally shape reality with what they believe. Someone has stolen the Key Without a Door from Mirela the keysmith, a promise with no address. The trail leads to the Unravelers, who think everything falls apart and that this is a good thing. You can get the key back by word (convince their leader that an unfulfilled possibility is entropy too), by stealth (back door and lockpicks) or by force.

Foundation: rules you can test
Before the first pixel there were rules. All of the SRD 5.2 mechanics live in plain GDScript with no scenes: advantage and disadvantage, actions, bonus actions, reactions, opportunity attacks, the 2024 Weapon Mastery, concentration, death saves. Dice have a seed and a queue of forced results, so every fight can be replayed roll for roll.
That makes the most important test in the project an AI playthrough. Each of the four classes walks all three quest routes: diplomacy, stealth and combat. On the combat route the game saves and loads halfway through. Fights are played by the AI on both sides. This test caught bugs I would not have noticed for a long time, like the Sleep spell putting the wizard to sleep when cast at an enemy standing next to them.
It also caught a balance problem. Encounters built from the SRD budget for one character turned out to be brutal for everyone except the fighter: the wizard won the warehouse fight once in 40 attempts.
| Class | Normal: ambush / warehouse | Story: ambush / warehouse |
|---|---|---|
| Fighter | 36/40, 36/40 | 39/40, 38/40 |
| Rogue | 14/40, 14/40 | 25/40, 29/40 |
| Cleric | 14/40, 15/40 | 30/40, 28/40 |
| Wizard | 13/40, 1/40 | 18/40, 15/40 |
So the default difficulty is Story (enemies at half HP and −3 to hit), and plain SRD is available as Normal. The test AI is simple, so a human does better than these numbers.

Characters: from one sentence to an animated model
Every character starts as one line in a cast file, for example
mirela: a stern middle-aged human locksmith woman.... A local language model can write those lines from a Polish
description, and it enforces the rules that break later steps: no items in hands, no capes, no names from other settings.
After that everything runs on its own:
- Concept: FLUX.2 [klein] 4B draws the character in A-pose, front view, on a plain background (about 6 s). A vision model picks the best of three variants.
- 3D model: TRELLIS.2 turns the image into a mesh with UVs, a color texture and a normal map.
- Cleanup in Blender: merging, removing stray fragments, a matte material, pulling colors toward the game’s fixed palette (rust, brass, violet) and baking ambient occlusion into the texture.
- Rig and animation: a skeleton from Quaternius’ Universal Animation Library (CC0), fitted to the character’s proportions, with ready walk, attack, cast and death animations.
- Validation: triangle budget, skeleton, the full set of animations, texture size.
The whole Rusty Market cast, 14 characters, generated in about 11 minutes. A character is about 100 pixels tall on screen, so I also checked how much detail it really needs. NPC models reduced from 12,000 to 7,000 triangles are indistinguishable in game frames. The exception was the bandit in a cloak: decimation broke the mesh and the rig turned him into a cone, so he stays at the full budget.
The painted area, or the interesting part
This is the core of the project. The map starts as a simple 3D blockout: boxes for houses, low walls, cobbles. Then:

One projector. I render the whole map from a single orthographic camera at exactly the in-game camera angle (isometric, 45° / −35.26°). That way the painting can be projected back onto the world without distortion. The price is that camera rotation is locked.
Painting in tiles. FLUX repaints the blockout in a 3×3 grid. Painting the whole map at once made the building layout drift. A second pass removes market stalls, lamps and crates from the painting, because those stay in the game as 3D models. Each tile gets a score (“how much violet void appeared where the blockout has cobbles”) and is repainted if needed.
Depth. Depth Anything V2 computes depth per tile, because on the whole map it flattens houses. I take the floor from the blockout, where I know it exactly, and building heights from the model, scaled per tile. The result is encoded as 16-bit depth in the R and G channels of an image.
In the game. A shader spans a 640×360 grid in front of the camera and pushes every vertex back to the world point read from the depth map. Every pixel writes its own depth. The effect: 3D characters walk behind and in front of painted buildings, and the painting receives real shadows from lamps and characters.

Two problems only showed up in practice.
The painter makes things up. FLUX can paint a house where the map has a street. So I wrote a consistency check: on every walkable cell I stand a virtual character and check whether the painting hides it while the blockout does not. The first version flagged 89 cells, but almost all of them were ordinary occlusion by a tall roof in front. After changing the metric, 19 cells were left with slightly clipped feet and none that needed blocking. The mechanism is there anyway: cells clearly built over in the painting are blocked by the game, except cells with characters, doors and triggers, and cells whose blocking would cut the map in two.
Characters vanish behind houses. At this camera angle tall buildings hide the streets behind them. The fix is silhouettes: a second material on each character draws only where the depth test fails. The player is blue, NPCs gold, enemies red. Along the way came a funny bug: a leg under a cloak glowed through the cloak, because at this camera angle the distance along the view axis between cloak and leg was larger than I had assumed. Pushing the silhouette one meter toward the camera fixed it.
Sound without samples
The music (exploration, combat, ending, title screen) was generated locally with ACE-Step 1.5, with silence trimmed and seamless loops. Sound effects, from footsteps on cobbles to sword hits, spells, dice and the portal, are synthesized in numpy: no samples and no licenses to track. Footsteps are synced to the phase of the walk animation, measured by a separate tool. The music can be checked without listening: a script looks for silence, clipping and the loop seam and draws a spectrogram. That mattered, because I worked in WSL, which has no audio device.
A second language in an afternoon
The English version came last, so it had to be bolted onto finished code. Polish stayed the source language and the
translation is an overlay: code strings go through Loc.t("Polish text"), and data and dialogues get a flat map of
file:path → text. A script wrapped about 300 strings in the code by itself, skipping constants and debug messages.
A test makes sure every string has a translation and that %d placeholders and BBCode tags match. There were about 550
texts from data and dialogues to translate. The mechanics follow SRD terminology (Hit Points, Armor Class, Weapon
Mastery), and place names have English equivalents: Rusty Market, Unravelers, Doorless Arch.

What I learned
- A test that only reads text files is not enough. I deleted “orphaned” model textures because nothing referenced them in any text file. The imported scene referenced them in binary, so the fighter model stopped loading and the game quietly swapped in a placeholder figure. The tests kept passing. Now a separate test loads every model, portrait and sound the game will use, and a missing model is reported as an error.
- An adversarial review before release pays off. A “what’s wrong here” pass found the missing icon and version number, notifications overlapping character labels and silhouettes showing through cloaks. It was wrong once too: it claimed the WAV music weighed 70 MB in the build, but Godot imports it as compressed QOA (17 MB). Measure before you “fix” something.
- Model licenses are part of the project. Depth Anything V2 Large is licensed for non-commercial use only, so the release is free. A paid version would need the depth recomputed with the Small model (Apache 2.0).
- An AI agent speeds things up but doesn’t excuse you from looking. The code, tests and pipeline were built together with an agent (Claude Code). What helped most was that the agent took screenshots and looked at them itself: stains, overlapping text and backwards-facing models only show up in a picture.
Numbers
| Engine | Godot 4.7.2, Compatibility renderer (OpenGL 3.3) |
| Code | about 6,700 lines of GDScript, 46 automated tests |
| Characters | 14 animated 3D models, 7k triangles (NPCs) and 12k (player characters) |
| Painted map | 9 tiles at 2560×1440, about 6 minutes for the whole map on an RTX 5070 |
| Text | 11 dialogues, about 850 translated strings |
| Build | Windows and Linux, about 210 MB, 60 fps on an RTX 5070 |
Play it and look inside
The game is a free download on itch.io, and the source code, including the whole asset pipeline, is on GitHub. The documentation covers the painted-area technique, the dialogue format and how to add another language in detail. If you build a map of your own, I’d love to see it.