A Tetris-meets-platformer game where BAMster (a hamster with a laser pistol) jumps between falling colorful blocks and shoots them. Supports single-player, local multiplayer, and online multiplayer.
# Install dependencies
pnpm install
# Build shared package (required first time)
pnpm --filter @bamster/shared build
# Start the game
pnpm devOpen http://localhost:3000 in your browser.
| Action | Keys |
|---|---|
| Move | Arrow Keys or A/D |
| Jump | Space, W, or Up Arrow |
| Shoot | Z or Left Click |
| Action | Keys |
|---|---|
| Move | J/L |
| Jump | I |
| Shoot | U |
- Blocks fall from the sky and stack up
- Jump on landed blocks to stay alive (falling blocks hurt!)
- Shoot blocks to destroy them and earn points
- Same-color blocks that touch merge together - destroying one destroys the entire cluster for bonus points
- Collect power-ups that occasionally fall:
- 🌽 Corn - Extra health (permanent)
- 👟 Sneakers - Jump boost (30 sec)
- 🔫 Rapid Fire - Faster shooting (30 sec)
- 🔫 Spread Shot - 3-way shot (30 sec)
- 🔫 Piercing - Laser goes through blocks (30 sec)
- Single Player - Survive as long as possible, beat your high score
- Local Multiplayer - Two players on one keyboard, last one standing wins
- Online Play - Coming soon (server infrastructure ready)
bamster/
├── packages/
│ ├── client/ # Phaser 3 game (Vite + TypeScript)
│ │ └── src/
│ │ ├── scenes/ # BootScene, MenuScene, GameScene, GameOverScene
│ │ ├── entities/ # Bamster, Block, Laser, PowerUp
│ │ └── systems/ # BlockSpawner, InputManager, NetworkManager
│ ├── server/ # Colyseus multiplayer server
│ │ └── src/
│ │ ├── rooms/ # GameRoom
│ │ └── schema/ # GameState (synchronized state)
│ └── shared/ # Shared types and constants
└── package.json # Workspace root
# Start client dev server
pnpm dev
# Start multiplayer server
pnpm dev:server
# Start both in parallel
pnpm dev:all
# Type check all packages
pnpm typecheck
# Build for production
pnpm build# Build shared package first (required)
pnpm --filter @bamster/shared build
# Build client
pnpm --filter @bamster/client buildOutput will be in packages/client/dist/.
The client builds to static files that can be hosted anywhere:
# Netlify
npx netlify deploy --dir=packages/client/dist --prod
# Vercel
cd packages/client && npx vercel --prod
# GitHub Pages
# Copy dist/ contents to gh-pages branch
# Any web server
scp -r packages/client/dist/* user@server:/var/www/html/For online multiplayer, deploy the server to a Node.js host (Railway, Render, Fly.io):
- Build:
pnpm --filter @bamster/server build - Set the
PORTenvironment variable - Update client's server URL in
packages/client/src/systems/NetworkManager.ts
Press F3 to enable debug mode, then:
- F4: Trigger "Floor is Lava" event
- F5: Trigger random event
- F8: Toggle invincibility (for screenshots/testing)
- Game Engine: Phaser 3
- Language: TypeScript
- Build Tool: Vite
- Multiplayer: Colyseus
- Package Manager: pnpm (monorepo)
Game constants can be adjusted in packages/shared/src/constants.ts:
GAME_WIDTH/GAME_HEIGHT- Screen dimensionsGRAVITY- Physics gravityBAMSTER_SPEED/BAMSTER_JUMP_VELOCITY- Player movementBLOCK_FALL_SPEED- How fast blocks fallBLOCK_SPAWN_INTERVAL- Time between block spawnsPOWERUP_SPAWN_CHANCE- Probability of power-up instead of blockPOWERUP_DURATION- How long timed power-ups last