r/ClaudeCode • • 2h ago

Built with Claude Built a pixel-art RPG mod for Claude Code: tool calls become monsters, to-do lists become bosses, and the HUD tracks cache, rate limit and context. Here's what I learned about mods

What I built: a free, open-source mod that adds a small pixel-art band above the message box. Lua, a tiny moon mage, fights a monster every time Claude uses a tool (reads, edits, shell commands, web, MCP, subagents each have their own monster). A to-do list summons a boss whose health is split into one block per task; the last task is a critical hit. A failed tool call makes the monster hit back, and when Claude fixes the error, an elite appears carrying the error as a trophy. The HUD is real session data: prompt-cache warmth, plan limit, context usage, XP. 9 biomes, 10 bosses, 8 languages, desktop app and VS Code.

How I used Claude Code: I did the game design and the art direction; Claude Code wrote the hooks module (TypeScript), the Python scripts that turn my AI-generated sprites into one clean pixel grid, 79 tests, and the translations. I worked in short sessions, each ending with a handoff file so the next session could pick up where we stopped.

What I learned:

  • The band has a size budget. It's drawn as SVG, and in the desktop app the whole band tree has a ceiling around 260k characters: past it, the app silently keeps the previous frame. Bosses with big sprites "didn't show up" until we measured the tree in a test, split the scene into layers and stopped embedding a font in every tooltip.
  • Hover needs native boxes. Inside an image-mode SVG nothing is hoverable, so the tooltips are app-native areas laid over the scene, positioned in text cells.
  • Animate in SVG, redraw rarely. Walking, parallax and the countdowns are SMIL/CSS animations; the hooks only redraw when the state changes. One bug taught me why: a countdown started hidden and appeared at t=0, so every redraw during a fight made the number blink for a frame.
  • Hot reload keeps state, not timers. A tool call cut short by a reload left a fight "running" forever and froze the scene; now stale fights are cleaned up.
  • Pixel art only at integer scales. Every sprite, the scenery and the trailer use 1x/2x/3x/4x with nearest-neighbor, never in between.
  • Test time with a fake clock. Fights, boss falls and stage transitions are tested by advancing a mock clock instead of waiting.

Install: /plugin install cronicas-de-lua --marketplace geoaltran/cronicas-de-lua-claude-code Repo (code MIT, art CC BY-NC): github.com/geoaltran/cronicas-de-lua-claude-code

Happy to go deeper on any of these. What other part of a Claude Code session would you turn into a game mechanic?

0 Upvotes

8 comments sorted by

•

u/AutoModerator 2h ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

3

u/TheBanq 2h ago

Wow this is the 1287128th version of this, congrats

1

u/Youlan-Befa 39m ago

to be fair the breakdown on the 260k character SVG ceiling and how hover boxes work is actually useful even if you dont care about the rpg wrapper

-1

u/georgealtran 2h ago

Ha, fair, pixel companions are having a moment. I wanted mine to be useful too: the HUD is the real session state (cache warmth, plan limit left, context size), and to-do lists turn into boss fights you actually beat by finishing tasks. Curious what the other 1,287,127 got right that I should steal?

0

u/TheBanq 2h ago

I genereally don't see the point.
I'd rather build an actually enjoyable idle game to play on the side.

There is no point in using that, just because u can doesn't mean u should

3

u/HatWithoutBand 1h ago

So, am I the only one who see in this those typical YT videos, where creator has to put 2 other videos into corners (one of them Subway Surfers) to keep attention of ADHD kids?

1

u/georgealtran 39m ago

Ha, fair. I promise there's no Subway Surfers hidden in a corner (yet). But you've got a point: there's a lot going on at once. Which part pulled your eye the most? I'm working on the visual hierarchy, so that would help a lot.

1

u/HatWithoutBand 4m ago

I mean if I don't take into account, that there are multiple projects like this, the idea itself is off?

I need multiple things going on too in background, like music or video, for inspiration and I think better that way. But it definitely isn't something like this. It won't make productivity better. It won't make your dev sessions better. It just drives your attention to somewhere else.