A retro-style arcade game where you play as a salmon swimming upstream through a treacherous waterfall. Dodge obstacles, evade predators, and collect power-ups as you fight against the current!
- SNES-Style Graphics: Procedurally drawn pixel art with a limited color palette for authentic retro aesthetics
- Chiptune Audio: Web Audio API-powered sound effects and music
- Multiple Obstacles:
- Rocks: Tumble down the waterfall
- Logs: Float and spin in the current
- Eagles: Swoop down from above to snatch fish
- Bears: Reach out from the riverbank with their claws
- Power-Up System: Collect fish and power orbs to boost your surge meter
- Combo System: Chain collectibles for score multipliers (up to 5x)
- High Score Tracking: Local storage saves your best runs
- Touch Controls: Full mobile/tablet support with on-screen buttons
- Keyboard Controls: Arrow keys or WASD for movement, Space to surge
| Key | Action |
|---|---|
| ← / A | Move Left |
| → / D | Move Right |
| Space | Surge (swim upward) |
| Enter | Start Game / Retry |
- ◀ ▶ Buttons: Move left/right
- SURGE Button: Swim upward against the current
- Tap anywhere: Start game or retry
- Your salmon automatically swims upstream against the waterfall current
- Use left/right controls to dodge obstacles
- Hold the Surge button to swim upward faster (uses power meter)
- Collect small fish to refill power and increase score
- Collect power orbs for bigger boosts and combo multipliers
- Avoid rocks and logs (lose a life on contact)
- Watch out for eagles and bears - they're instant game over!
- Survive as long as possible and beat your high score!
- React 19 - UI framework
- Vite - Build tool and dev server
- Canvas API - All graphics rendered to HTML5 canvas
- Web Audio API - Procedurally generated chiptune sounds
- CSS3 - Responsive touch controls
- Node.js 18+
- npm or yarn
cd salmon-run
npm install
npm run devnpm run buildThe built files will be in salmon-run/dist/. Copy to your web server's public directory.
The game is deployed to batesai.org/fishgame via Cloudflare Pages.
Fish Game/
├── README.md # This file
├── game.js # Original vanilla JS version
├── index.html # Original standalone HTML
└── salmon-run/ # React + Vite version (active)
├── src/
│ ├── components/
│ │ ├── Game.jsx # Main game component & logic
│ │ └── Game.css # Game styling & touch controls
│ ├── sprites/
│ │ └── sprites.js # SNES-style sprite drawing
│ ├── audio/
│ │ └── AudioManager.js # Chiptune sound generation
│ ├── App.jsx
│ └── main.jsx
├── dist/ # Compiled output
├── package.json
└── vite.config.js
| Constant | Value | Description |
|---|---|---|
| Canvas Size | 320x480 | Base resolution (scaled 2x) |
| Starting Lives | 3 | Hearts displayed top-right |
| Max Power | 100 | Surge meter capacity |
| Max Combo | 5x | Maximum score multiplier |
MIT License - See LICENSE for details.
Created by Daniel Bates - batesai.org
