A local web app — and the start of a fuller AI Game Studio — for generating game assets from text prompts. Today: 2D reference sprites and animation frames composed into a 1×N spritesheet with a looping animated preview. Backgrounds are chroma-keyed to transparency automatically, so frames drop straight into a game engine. Projects can be saved and loaded by name.
The app talks to OpenRouter as the single boundary to the model providers. One key gives access to 300+ image / video / audio / text models, which is the runway for everything on the TO-DO list (backgrounds, tilemaps, SFX, music, voice, …).
Pick the video model at generation time — currently Grok Imagine Video (xAI) or Seedance 2.0 (ByteDance), both routed through OpenRouter.
Full Demo: https://www.youtube.com/watch?v=MijheSPXnDo
- Node 20+
ffmpegonPATH- An OpenRouter API key
npm install
cp .env.example .env
# then open .env and paste your key:
# OPENROUTER_API_KEY=sk-or-v1-...npm run devOpen http://localhost:5173.
This starts Vite (frontend, :5173) and an Express server (backend, :8787) together. Stop with Ctrl+C.
- Type a sprite prompt in column 1 → Generate Reference Sprite.
- Pick a video model and type a motion prompt in column 2 → Generate Frames (calls image-to-video via OpenRouter, polls until done, extracts transparent PNGs).
- Click frame tiles to toggle which ones to include.
- Generate Spritesheet → composes a 1×N PNG client-side, builds a looping GIF preview server-side.
- Export PNG to download the spritesheet.
- Header: New to start fresh, Save to name and snapshot the current project, Load to switch to a saved one.
Generated artifacts live under projects/ (gitignored). The current working state is always in projects/latest/.
A pixel-art knight in silver armor with a longsword, side-view, full body, simple flat colors, standing poseFemale ninja with red scarf, dynamic side-view, 2D sprite, anime styleCute green slime monster, side-view, big eyes, soft shadingCyberpunk hacker in a hoodie, glowing visor, side-view full body, gritty style
Smooth walk cycle, side-view, no head tilting, no camera movementSword slash attack, side-view, fast, no shadowsIdle breathing animation, subtle, loopingJump arc — crouch, leap, mid-air, land
Tips:
- Keep motion prompts focused on the action. Phrases like "no camera movement", "side-view", and "no head tilting" help keep frames game-ready.
- Per-model default durations: Grok Imagine Video = 2 s, Seedance 2.0 = 4 s. ~24–30 fps on the source clip, so trim with the frame selector before composing.
- Switching the model is one entry in
server/video.ts— seeVIDEO_MODELS. - Recommend sticking to Grok Imagine Video since it's much cheaper than Seedance 2
- Background generation
- Tilemap generation
- Aseprite format export
- Tiled format export
- SFX generation
- Music generation
- Voice generation
- Full asset scaffolding export
See AGENTS.md for the full spec, architecture, endpoint list, model-registry pattern, and chroma-key tuning notes.
