Falsprite
Generate animated sprite sheets from a text prompt. Powered by Nano-banana-2, BRIA & OpenRouter on fal.ai, one API key.
Install / Use
/learn @lovisdotio/FalspriteREADME
FalSprite
Game-ready sprite sheet animations from a single text prompt. Built on fal.ai — one API key powers everything.
What it does
Type a character description, pick a grid size, choose animation actions — FalSprite generates a full sprite sheet with transparent background and animated preview.
Pipeline (all on fal.ai):
- nano-banana-2 — image generation (sprite sheet)
- OpenRouter LLM (GPT-4o-mini via fal) — intelligent prompt rewriting with character design + choreography
- BRIA — automatic background removal
Features
- Configurable grid: 2x2, 3x3, 4x4, 5x5, 6x6
- Multi-action selection: pick multiple animation actions per grid row (idle, walk, run, attack, cast, jump, dance, death, dodge, or custom)
- LLM prompt rewrite: your simple prompt becomes a detailed character + choreography direction
- Auto background removal: BRIA removes the background automatically
- Live preview: real-time frame-by-frame animation with FPS control
- Downloads: sprite sheet PNG, transparent PNG, animated GIF
- Reference image: upload a reference to guide the generation
- Showcase examples: curated animated GIF examples
Quick start
git clone https://github.com/lovisdotio/falsprite.git
cd falsprite
npm install
npm run dev
You need a fal.ai API key — get one at fal.ai/dashboard/keys. That single key covers all three services (image gen, LLM, bg removal).
Deploy to Vercel
npm i -g vercel
vercel
The project includes Vercel-ready serverless functions in api/ and static assets in public/.
Project structure
├── public/ Static frontend
│ ├── index.html Main app
│ ├── app.js Frontend logic
│ ├── styles.css Styles
│ ├── showcase/ Example GIFs
│ └── select.html Showcase curation tool
├── api/ Vercel serverless functions
│ ├── generate.mjs Sprite generation endpoint
│ ├── upload.mjs Image upload endpoint
│ └── fal/media.mjs Media proxy endpoint
├── lib/fal.mjs Shared FAL API helpers
├── server.mjs Local dev server
├── batch-generate.mjs Batch generation tool (dev)
└── process-showcase.mjs Showcase processor (dev)
Tech stack
- Frontend: Vanilla JS, no framework, no build step
- Backend: Node.js (native HTTP server for dev, Vercel serverless for prod)
- AI: All via fal.ai APIs (nano-banana-2, OpenRouter, BRIA)
- GIF: gif.js (browser) + gifenc (server-side batch)
License
MIT
Related Skills
node-connect
341.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
