Chapter threeRoblox action RPG
Salagubang Wars
A Filipino-folklore creature collector about catching, raising and battling salagubang beetles. I'm the solo creator and director. My dev team is an agentic team that I run and orchestrate.
I direct and review; the agents write the code. Currently in a private playtest with friends, so there's no public link yet.
起 (Opening)01 / The problem
One director, one Studio, a whole team's worth of game.
Salagubang Wars is a Filipino-folklore creature RPG on Roblox, and I'm one person. The question was how far I could get by directing AI coding agents without the game turning into a pile of confident, untested code.
Media incoming
Screenshots and gameplay video land here once the private playtest wraps.
承 (Development)02 / What I built
A real-time action RPG, built by an agentic team I run.
I designed the game and I direct it: every design ruling, every look picked on a walkable board, every build played and published by me. The agents write the code. I set the rules they work by and review what they ship.
転 (Turn)03 / The hard part
Sep 28 to Oct 2
Turn-based core reversed, real-time fight kit in
Rebuilding combat mid-flight without silently breaking it.
The old engine got frozen as a golden corpus first, then a pure 20 Hz simulation went in beside it, and callers moved over one at a time.
結 (Outcome)04 / The result
13
live builds in 9 days of private playtest. Each one through the same publish routine.
- World build moved to a bake
- 223 s
- Full test run
- 1,156 s to 469 s
- Planted faults caught
- 46 of 46
By the numbers
- 223 sof world building for one place moved out of server start, into a prebuilt bake
- 45skill effects built in parallel and merged once
- 13live builds in 9 days
- 46/46planted faults caught by mutation testing
- 469 sfull test run, down from 1,156 s (one machine)
How it works
Two systems in one picture: the agentic team that builds the game, and the game it ships. The gates in the middle are where most of the real engineering went.
- Built by me
- Platform, team or vendor
01THE GAME
Catch it. Raise it. Fight beside it.
Salagubang Wars is a creature-collection action RPG rooted in Filipino folklore. You summon beetles from Mang Tonio's pit, feed spare beetles to the one you're raising (it grows in the shape of what it eats), send the rest hunting through portals in your home yard, and fight beside your beetle in real time across six places, from the town of BAYAN to the GUBAT forest.
There are 13 species, a 12-trainer LIGA where every rung is a mounted boss fight, a firefly named Kutitap who flies ahead to your next objective, and a villain straight out of myth, the Bakunawa. Every Filipino term on screen shows its English, so players from anywhere can follow along.
I designed it, I direct it, and I make the taste calls. When the first catching loop shipped and technically worked, I still called it boring, and we redesigned it instead of retuning spawn timers forever.
02THE PIVOT
Turn-based to real-time in about a week.
Combat started turn-based: a pure, seeded resolver with deterministic replay. On September 28 I reversed the core design. Kids want to keep attacking, not wait around to get hit.
We built new beside old. First the whole turn-based engine got frozen as a golden corpus, so nothing could silently change during extraction. Then came a pure 20 Hz simulation (intents, telegraphed attacks, dodge, statuses, combos, cooldowns) with a thin server shell and a client view, with callers switched over one at a time. Decision on September 28, full fight kit on October 2.
Teamwork is a tested number, not a vibe: a balance gate keeps the beetle's share of the damage between 45% and 60% at levels 1, 30, 60 and 100. The dodge is a client-side dash, but the server keeps the invincibility frames. Real-time PvP came later on the same core, by turning each side into stand-in mobs, with one match runner for trainer duels, kid-vs-kid and a sparring bot. On October 18 the old engine was retired (6 files, 6,592 lines), with every test of a rule still in use moved over to the new core first.
難所 (Hard part)The hard part
"The beetle follows me around in combat." Six hypotheses deep, the root cause was a teleport guard. It sampled at 60 Hz while avatars replicate at about 20 Hz, so one frame could carry 0.9 to 2.6 studs. That read as a teleport and snapped the beetle back to the kid every step. The tests never saw it because test kids move by code, not over a network. Now a move under 10 studs is never a teleport.
03THE LANES
An agentic team. One director.
This is the part I'm proudest of. I run and orchestrate an agentic dev team. I direct and review; the agents write the code. Each agent owns a lane (world, PvP, the economy, quests and lore, models, items, UI, ops, and a coordinator). Every lane owns its files, keeps its own decision-log prefix, has its own test harness, and takes a turn on the Studio lock.
Every shared file has exactly one owner. Other lanes file a request or log a minimal "crossing". The coordinator writes no game code at all: it runs roll-call, turns my notes and testers' reports into lane work, makes the calls I delegate, sequences Studio time, and accepts "done" only with evidence (a commit hash, suite results, captures, my own check).
Lanes are files, not chats. Sessions crash and hit usage limits, so each lane lives in a markdown file (what it owns, what's in flight, its rules, its traps), and a fresh chat runs one command to take over. Lanes can spawn their own subagents in worktrees too: the 45 skill effects were built in parallel that way, and they merged once.
RULES WRITTEN IN BLOOD
git add srconce swept 565 lines of another lane's work into an unrelated commit. Now it'sgit commit --only <paths>, and nothing stays staged.- A
git stashbriefly yanked every session's work out of the shared tree. Nobody stashes the shared tree anymore. - An agent's
sed -icrashed the Rojo sync server, and Studio kept running stale code for every lane with no warning. Now every Studio check reads a changed line back first, and before each publish every script in Studio must match disk (441 of 441). - A background capture job got killed while holding the one Studio lock, and five sessions sat waiting. Runners never queue in the background now.
難所 (Hard part)The hard part
One git index and one Roblox Studio for everyone. Parallel agents are only fast if they can't step on each other, so the real work was designing ownership, handoffs and locks, then turning every incident into a written rule.
04HONEST TESTS
Instruments that could not fail.
The game's rules are pure Luau modules that run headless under Lune, so the rules get tested before anything is visible. The harness grew fast, and by October a full suite run gated every publish.
Then I went hunting for tests that pass no matter what. A roll suite with zero assertions. A replay guard that compared a value to itself. A diff tool that reported "IDENTICAL" after comparing two empty sets. A typecheck pointed at a settings file that didn't exist, which analysed nothing, exited 0, and reported "0 type errors" a dozen times.
The answer was mutation testing (one tool caught 46 of 46 planted mutants), guards against vacuous checks, and proof that analysis actually ran. Later an INFRA lane audited about 570 source-text pins with planted breaks and replaced 27 private comment strippers with one shared reader.
FASTER, NOT LOOSER
- Parallelized the harness: a full run went from 1,156 s to 469 s on the same machine, with identical per-suite output.
- The first parallel run failed a timing assertion (2.72 s versus 0.11 s alone). That was CPU contention, not a bug, so those suites run serially instead of loosening the assertion.
- Roblox caps a function at 200 locals. Every suite was green while all six worlds failed to load in Studio, because the headless runner doesn't enforce the limit. Now a script does, and the build fails at 190.
難所 (Hard part)The hard part
Silence is not success. A green exit code from a tool that analysed nothing looks exactly like a pass, so every gate has to prove it ran, not just that it didn't complain.
05DATA AND MONEY
Saves you can't double-spend.
Every write goes through one atomic transaction over the player's profile, tagged with an operation id. A "duplicate" reply means the write already committed and only the acknowledgement got lost.
The catch-bag sale treated "duplicate" as a failure. It put the catches back while the coins were already saved, then invited a second press with a fresh id, which sold the same bag twice. The fix shipped with a shape check that requires duplicate handling next to every transaction call, and that check immediately found a tenth call site.
Another one: a single random stream served every match, and every seed was published to the client for replays, so a client could predict its next fight and skip the ones it would lose. Each match now gets its own entropy-seeded random.
MONETIZATION WITH GUARDRAILS
- One receipt handler for the whole game, idempotent by purchase id. A beetle name that fails the text filter is refused and never charged.
- 2x passes run through one multiplier, applied after the anti-bot backstops and never on sell prices.
- Voucher products where a receipt without a held voucher grants nothing, which closed the hole where prompting a product id got any pass for 1 Robux.
- Rules from day one: Robux never touches the currency chain, XP is never sold, upgrades never fail, and there's no gambling. Roblox bans simulated gambling, so a "winner eats the loser" wager was ruled out early.
難所 (Hard part)The hard part
The creator account owns every gamepass it creates, so my own playtests silently ran at 2x and looked exactly like economy bugs. Now there's an admin switch to play as a free kid.
06ART PIPELINE
Thirteen species. One skeleton.
The first beetles came out of a parametric Blender generator that runs headless: one lofted-tube builder, every species on identical topology (1,198 verts, 2,196 tris), one shared armature, one walk cycle. Later the rig went from 26 to 44 bones without moving a single vertex, because the mandibles and extra limb segments already existed as geometry.
Then Claude Design concepts. Their model and clip exports go through a converter and a delta retarget onto our 44-bone rig, exact to 1.95e-5 studs over 1,310 frames, and the clip data packs from 4.40 MB to 1.51 MB, bit-identical. Concept pieces get dressed onto the generated skeleton, and a harness checks every dressed piece of every look under every clip against the source animation. That covers 13 species, 9 mobs and 9 bosses, uploaded through Open Cloud scripts instead of manual imports.
Every visual change goes on a walkable look-dev board in Studio first. I walk it, I pick, and the port gets generated from the recorded choice. That rule exists because five eye-effect designs went straight into the game in a row and got rejected on sight. The first board got approved in one look.
難所 (Hard part)The hard part
The Roblox import fault went through five hypotheses, three of them wrong. The real cause: Blender wrote bone defaults from frame 1, not the rest pose. Lesson kept forever: never verify an export by re-importing it into the tool that made it, because the importer undoes the exporter and hides the bug. Honest failure too: an AI-mesh blending experiment ran six board rounds before I stopped it. It looked hideous, and the legs didn't deform.
07PLAYTEST
Friends in. Bugs out.
The first private publish went out on October 11 for a friends' playtest. The coordinator lane triaged 36 reports into 29 unique issues and routed them to the owning lanes, and the fixes landed that same day. Plenty of reports weren't what they looked like: "crafting is broken" was the price (nothing in chapter 1 paid enough yet), and "I can't hit the flying butterflies" was decorative wildlife.
Publishing is a routine, and every step exists because of a specific failure: freeze, every lane reports clean, full harness, Studio read-back against disk, world-bake hash check, publish, restart servers. That routine shipped 13 live builds in 9 days.
Live ops run through Discord. The server is built from code, an in-game REPORT A BUG button posts through a Cloudflare Worker relay into a forum, and my self-hosted agent Diwa handles tester applications, writes the in-game allowlist, and posts a daily error digest. The allowlist gate fails open, so a list outage lets testers in rather than locking them out (the place itself stays private).
難所 (Hard part)The hard part
Live servers said HTTP requests weren't enabled while Studio showed them switched on. Four hypotheses died before the real answer: the setting on the place itself was still off, despite what the dialog showed. Set it, read it back, publish. Trust what the running thing reports, not the settings screen.
How I work
I orchestrate AI coding agents.
Salagubang Wars is where the method gets stress-tested: an agentic team, one shared Studio, a lot of moving parts. Spec first, agents in lanes, independent verification, and me as owner, director and final judge of what ships.
Same four steps every time: spec first, agents in lanes, verify independently, I make the calls. Read them in full in chapter one.
実例 (Real examples)On this project
- Every session ends with a structured sitrep: what shipped, the decisions, a diagnosis chain with the wrong turns kept on purpose, a verification table that separates "seen in Studio" from "headless only", and a copy-paste handoff.
- Adversarial verification: investigators plus refuters, and a cross-check of 159 backlog items that overturned 16 "done" claims.
- Lanes review each other. The level lane's review of combat caught an XP double-grant (a retry under a new id), fixed by retrying with the same operation id.
- I steer by playing. "PvP isn't fun if it auto hits" turned into aimed duels. "GUBAT feels empty" turned into nests.
What it's built on
01 / GAME
遊戯 (Play)- Roblox
- Luau (strict)
- Rojo
- Lune
- luau-lsp
02 / ART
造形 (Modeling)- Blender (Python, headless)
- Claude Design
- Roblox Open Cloud
- three.js
03 / OPS
運営 (Operations)- Cloudflare Workers
- Discord
- GitHub Actions
- Self-hosted CI runner
- Diwa
04 / AGENTS
並列 (Parallel)- Claude Code
- Opus
- Sonnet
- Git worktrees