A lean-and-crouch 3D shooter where positioning and stance control matter more than movement speed.
Unlike traditional shooters with full movement freedom, Peek Shooter focuses on analog stance control:
- Smoothly control how much you crouch
- Lean left/right around cover
- Strafe between cover positions
- All stances are persistent until you change them
The core gameplay loop is peeking around obstacles to shoot targets while managing your exposure.
| Key | Action |
|---|---|
| W/S | Stand / Crouch (analog) |
| A/D | Strafe left / right |
| Q/E | Lean left / right (analog) |
| R | Reset stance to neutral |
| Mouse | Aim (after clicking to lock) |
| Left Click | Shoot |
| B | Toggle fire mode (single/burst/auto) |
| Tab | Switch weapon hand |
| ESC | Unlock mouse |
| ~ | Open debug console |
- Smooth interpolation on all stance changes
- Crouch affects camera height
- Lean adds camera tilt and horizontal offset
- Strafe moves between cover positions
- Seeded noise generator for consistent-but-random recoil
- Per-weapon recoil profiles (vertical kick, horizontal drift, recovery rate)
- Pattern system for sustained fire behavior
- Visual weapon kick synchronized with camera recoil
Currently includes profiles for:
- Assault Rifle - Balanced recoil, medium recovery
- SMG - Lower recoil, faster recovery, more horizontal drift
- Sniper - High single-shot kick, slow recovery
npm install
npm startThen open http://localhost:3000
Capture screenshots for debugging:
npm run screenshot # Basic capture
npm run screenshot -- -o test.png # Custom filename
npm run screenshot -- -d 3000 # Wait 3 seconds before capturepeekshooter/
├── index.html # Game HTML + UI
├── game.js # Core game logic
│ ├── NoiseGenerator # Seeded PRNG for recoil
│ ├── WEAPON_PROFILES # Configurable weapon stats
│ ├── recoilState # Runtime recoil tracking
│ └── gameState # Player state + constants
├── screenshot.js # CLI screenshot tool
└── package.json
- Three.js for 3D rendering
- Vanilla JavaScript
- Puppeteer for screenshots
- Multiplayer support (WebRTC P2P)
- Sound effects (procedural audio)
- Fire modes (single/burst/auto)
- Additional weapons
- Enemy AI
- Mobile/gamepad support (dual analog would be ideal for this control scheme)
MIT