AI-Powered Retro Game Creator - Describe your game idea, watch it come to life.
PixelForge is a web platform where you can talk to an AI agent and create retro pixel-based games through natural conversation. Think "Lovable for Gaming" - describe your game idea, and the AI generates playable code instantly.
- 🤖 AI-Powered Generation - Describe your game in plain English
- 🕹️ Instant Preview - Play your game immediately in the browser
- 📝 Code Export - Download the generated JavaScript code
- 🎨 Retro Aesthetic - Beautiful cyberpunk UI with CRT effects
- ⚡ KAPLAY Engine - Modern successor to Kaboom.js
- Node.js 18+
- npm or yarn
- Google Gemini API key
# Clone the repo
git clone https://github.com/yourusername/pixelforge.git
cd pixelforge
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local and add your GEMINI_API_KEY
# Run the development server
npm run devCreate a .env.local file:
GOOGLE_GENERATIVE_AI_API_KEY=your_gemini_api_key_hereGet your API key at: https://aistudio.google.com/app/apikey
- Open the app at
http://localhost:3000 - Describe your game in the chat (e.g., "Create a platformer where a cat collects fish")
- Watch it generate - The AI creates the game code
- Play instantly - Your game appears in the preview panel
- Iterate - Ask the AI to modify or improve the game
- "Make a space shooter where you dodge asteroids"
- "Create a snake game with neon colors"
- "Build a platformer with double jump"
- "Make a breakout clone with power-ups"
pixelforge/
├── src/
│ ├── app/
│ │ ├── api/generate/ # AI generation endpoint
│ │ ├── layout.tsx # Root layout
│ │ ├── page.tsx # Main page
│ │ └── globals.css # Global styles
│ ├── components/
│ │ ├── Header.tsx # Navigation header
│ │ ├── ChatPanel.tsx # AI chat interface
│ │ ├── GamePreview.tsx # Game canvas
│ │ └── CodeEditor.tsx # Code viewer
│ ├── store/
│ │ └── useStore.ts # Zustand state management
│ ├── types/
│ │ └── index.ts # TypeScript types
│ └── lib/ # Utilities
├── public/
│ ├── sprites/ # Pixel art assets
│ └── sounds/ # Game sounds
└── ...
PixelForge will integrate with Nano Banana for AI-generated pixel art assets:
- Character sprites
- Environment tilesets
- Animation frames
- Consistent art style across all assets
| Technology | Purpose |
|---|---|
| Next.js 15 | React framework with App Router |
| TypeScript | Type safety |
| Tailwind CSS | Styling |
| KAPLAY | 2D game engine (Kaboom.js successor) |
| Zustand | State management |
| Google Gemini | AI game generation |
| Vercel AI SDK | AI integration |
- Basic chat interface
- AI game generation
- Live game preview
- Code export
- Nano Banana asset integration
- Game templates
- Save & share games
- Multiplayer support
- Custom sprite upload
- Sound effects generation
Contributions welcome! Please read our contributing guidelines first.
MIT License - see LICENSE for details.
Made with 💜 by the PixelForge team
Forge your dreams into pixels