There isn't a single .png in CraftWar's art folder. Every unit, every building, and the game's announcer (a corroded robot head with an LED eye) exist only as code — coordinates, rectangles, and circles recalculated 20 times a second.
CraftWar's engine (`src/gfx/draw_game.cpp`) doesn't load sprites — it builds every character by stacking canvas primitives: `fillRect` for metal plating, `fillCircle` for eyes and rivets, `line` for corrosion cracks. The game's "Undead-AI" announcer, for example, is a roughly 60-line function that draws a rusted robot head — not a single external asset, just geometry and hex color straight in the code.
This isn't a technical limitation — it's an architectural decision. CraftWar runs on deterministic lockstep netcode: both players simulate exactly the same thing, frame by frame. Drawing via code instead of sprites means the animation (the LED eye blinking, the jaw opening to speak) is a function of the same deterministic `tick` that already governs the simulation — there's no need to sync an external spritesheet with game state, the drawing *is* a direct expression of the state.
Writing art by hand-coded coordinates is slow and error-prone — moving a rivet two pixels means recalculating offsets across a dozen related lines. Using an AI assistant as a pair-programmer for this kind of low-level code changes the actual workflow: you describe the composition you want ("robot head, top plate with a light band, two eyes — one with a live LED, one with a dead, cracked socket") and the AI proposes a first pass of `fillRect`/`fillCircle` calls with the right proportions, which you then hand-tune by iterating on the rendered result. It's the same working pattern we use on client projects: AI doesn't replace design judgment, it accelerates translating a visual idea into verifiable code.
A traditional pixel art sprite costs kilobytes per animation frame. A primitive-based drawing function costs the same regardless of how many animation frames it has — because there are no frames, there's a continuous function of time. For a game that runs entirely in WebAssembly in the browser (like CraftWar, playable now at [guatemalia.com/craftwar](https://guatemalia.com/craftwar)), this translates directly into a smaller binary and faster load times.
The same principle — using an AI assistant to write and verify low-level code instead of depending on heavy, separately generated assets — is exactly the kind of engineering acceleration we apply in enterprise AI architecture: it's not about AI "doing the work alone," it's about compressing the cycle between "here's how I want it to look" and "here's how it looks, verified and running."
Carlos Montiel is an enterprise AI solutions architect. He implements LLMs, Agents, RAG, and orchestrators for companies across Guatemala and Latin America. Reach out for a consultation.
Contact Carlos Montiel