Skip to content

danielalanbates/salmon-run-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Salmon Run: Waterfall Surge

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!

Play Now

Play at batesai.org/fishgame

Screenshots

Salmon Run Gameplay

Features

  • 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

Controls

Desktop

Key Action
← / A Move Left
→ / D Move Right
Space Surge (swim upward)
Enter Start Game / Retry

Mobile/Tablet

  • ◀ ▶ Buttons: Move left/right
  • SURGE Button: Swim upward against the current
  • Tap anywhere: Start game or retry

How to Play

  1. Your salmon automatically swims upstream against the waterfall current
  2. Use left/right controls to dodge obstacles
  3. Hold the Surge button to swim upward faster (uses power meter)
  4. Collect small fish to refill power and increase score
  5. Collect power orbs for bigger boosts and combo multipliers
  6. Avoid rocks and logs (lose a life on contact)
  7. Watch out for eagles and bears - they're instant game over!
  8. Survive as long as possible and beat your high score!

Tech Stack

  • 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

Development

Prerequisites

  • Node.js 18+
  • npm or yarn

Setup

cd salmon-run
npm install
npm run dev

Build

npm run build

The built files will be in salmon-run/dist/. Copy to your web server's public directory.

Deployment

The game is deployed to batesai.org/fishgame via Cloudflare Pages.

Project Structure

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

Game Constants

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

License

MIT License - See LICENSE for details.

Author

Created by Daniel Bates - batesai.org

About

SNES-style arcade game: swim upstream as a salmon, dodge obstacles, evade predators. Built with React + Vite. Play at batesai.org/fishgame

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors