I'll build a full Hotline Miami clone as a top-down shooter game using React + Canvas. This will be a complete game with:
- Top-down perspective with smooth movement
- Enemies with AI pathfinding
- Guns, melee weapons, physics-based ragdolls
- Screen shake, blood effects
- Multiple rooms/levels
- Retro neon aesthetic
Let me start building all the files:
Now let me create the main game engine files. I'll build this as a canvas-based game:
Now let me create the main game logic engine:
The type errors are mostly unused imports and one type issue. Let me fix the critical ones in the renderer and levels files:
Let me fix the drawExitIndicator function signature and the maxAmmo type issues:
Good - all remaining errors are just unused variable warnings (TS6133). These won't block the build. Now let me create the main App component:
All errors are just unused variable warnings (TS6133/TS6196) which won't block the build. Let me also update the index.css and main.tsx for a clean setup:
Now let me check the tsconfig to see if the build will fail on these warnings:
The tsconfig has noUnusedLocals: true which will cause build failures. I need to clean up all unused imports/variables. Let me fix them all:
Good, down to 3 errors. Let me fix the remaining ones:
Now let's build the project:
The build succeeded. Let me now do a final review and add some polish — specifically I want to make sure the normalize function is being used in the dash code and add some more visual polish to the renderer. Let me check if normalize is being used:
Good, normalize is used. The build is clean and successful. Let me do a final check to make sure everything looks good by reviewing the main game entry:
The project is complete and builds successfully. Let me run the build one final time to confirm everything is solid:
✅ Build successful! Here's a full breakdown of what was built:
🎮 Hotline Canvas — Hotline Miami Clone
A fully polished top-down shooter built with React + Canvas (no extra libraries).
🕹️ Controls
| Input | Action |
|---|
| WASD / Arrow Keys | Move |
| Mouse | Aim |
| Left Click / Hold | Shoot / Melee |
| Shift | Dash (invincible frames!) |
| E | Pick up weapon |
| R | Throw weapon |
✨ Features
Game Systems:
- 🗺️ 3 hand-crafted levels with 9+ rooms each, corridors and complex layouts
- 🤖 Full enemy AI — idle, patrol, alert, chase, attack state machine with line-of-sight detection
- 🔫 6 weapons — Fists, Bat, Knife, Pistol, Shotgun, Uzi, Magnum with unique stats
- 💥 Physics-based bullet system with trails and wall sparks
- 🩸 Blood particle system with physics + permanent floor decals
- ⚡ Dash mechanic with invincibility frames
- 🏆 Combo system with multiplier scoring and floating text
- 📦 Weapon pickups that drop from enemies (50% chance)
Visual Polish:
- 🌟 Screen shake on all impacts, scaled by weapon type
- 💫 Muzzle flashes with star-ray particles
- 👁️ Neon retro aesthetic — pink/cyan/yellow palette with glow effects
- 📺 Scanline + vignette post-processing overlay
- 🎯 Custom animated crosshair
- 💀 Enemy hit flash and HP bars
- 🔔 Floating score text with combo announcements
- 🌀 Enemy ragdoll physics on death with blood bleed-out
Game Flow:
- 🎬 Animated neon main menu
- 💀 Death screen with score summary
- ✅ Level complete screen
- 🏆 Win screen after all 3 levels
Files built: index.html, src/game/constants.ts, src/game/types.ts, src/game/levels.ts, src/game/physics.ts, src/game/renderer.ts, src/game/engine.ts, src/App.tsx, src/index.css