Casefile Noir is an immersive top-down detective RPG that combines classic pixel art aesthetics with cutting-edge AI. Players step into the shoes of a 1940s detective, investigating crimes by collecting evidence, interrogating suspects, and using Gemini AI to detect contradictions and solve cases.
This project was created for the Gemini 3 Hackathon, showcasing how AI can enhance gameplay through:
- Dynamic contradiction detection using Gemini's reasoning capabilities
- Intelligent NPC dialogue generation
- Context-aware evidence analysis
- Top-down RPG exploration with smooth WASD/Arrow key controls
- Evidence collection system with interactive notebook UI
- Suspect interrogation with branching dialogue trees
- AI-powered contradiction detection that analyzes player-collected evidence against suspect statements
- Atmospheric noir aesthetic with rain effects and day/night cycles
- Dynamic minimap with full-screen toggle (press
M) - Synthesized ambient soundtrack with noir-themed background music
- Grain & vignette post-processing for authentic film noir feel
- Gemini-powered logic engine for case solving
- Real-time contradiction analysis between evidence and testimonies
- Intelligent hint system when players are stuck
- Procedural NPC spawning with A* pathfinding
- Advanced collision detection with stair navigation
- Tiled map integration with 50+ custom layers
- Responsive UI with mobile-friendly controls
- Node.js 18+
- npm or yarn
- A Gemini API key (Get one here)
- Clone the repository
git clone https://github.com/yourusername/casefile-noir.git
cd casefile-noir- Set up the backend
cd server
npm install
# Create .env file
echo "GEMINI_API_KEY=your_api_key_here" > .env
npm run dev- Set up the frontend
cd ../client
npm install
npm run dev- Open the game
Navigate to
http://localhost:5173in your browser
npm run dev to start the Vite dev server. Do NOT use Python's http.server or any other static file server - Vite is required to bundle Phaser and process ES modules.
| Key | Action |
|---|---|
WASD / Arrow Keys |
Move detective |
E |
Interact with evidence/NPCs |
M |
Toggle full-screen map |
F7 |
Toggle minimap visibility |
K |
Mute/unmute audio |
F2 |
Toggle debug overlay |
F3 |
Toggle physics debug |
F4 |
Toggle NPC debug markers |
- Phaser 3 - Game engine
- Tiled - Map editor
- Vite - Build tool
- Web Audio API - Synthesized music
- Node.js + Express - API server
- Google Gemini API - AI logic engine
- Multer - File upload handling
- Python scripts - Sprite processing & map validation
- Custom tileset - Victorian-era pixel art
- A pathfinding* - NPC navigation
casefile-noir/
โโโ client/ # Frontend Phaser game
โ โโโ src/
โ โ โโโ scenes/ # Game scenes (StartMenu, Game, etc.)
โ โ โโโ utils/ # Utilities (AudioManager, Minimap, etc.)
โ โ โโโ ui/ # UI components (Notebook, Evidence Modal)
โ โโโ public/
โ โ โโโ assets/ # Sprites, maps, tilesets
โ โโโ index.html
โโโ server/ # Backend API
โ โโโ routes/ # Express routes
โ โโโ services/ # Gemini integration
โ โโโ server.js
โโโ README.md
- Evidence Collection: Players explore the Victorian city, interacting with objects marked with glowing indicators
- Interrogation: NPCs can be questioned, with responses generated dynamically
- AI Analysis: When ready, players submit their evidence to Gemini, which analyzes contradictions
- Case Resolution: The AI provides hints or confirms the solution based on collected evidence
This is a hackathon project, but contributions are welcome! Feel free to:
- Report bugs via Issues
- Suggest features
- Submit pull requests
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini Team for the incredible AI API
- Phaser Community for excellent documentation
- Tiled Map Editor for the powerful tilemap tools
- OpenGameArt for inspiration on pixel art assets
Made with โ and ๐ฎ for the Gemini 3 Hackathon
