o
odin.langpkg.dev
packages / app / fishing-game

fishing-game

fdd53a6app

No description provided.

No license ยท updated 4 months ago

๐ŸŽฃ Odin Fishing Game

A 3D fishing game built with Odin and Raylib.

Project Structure

odin_fishing_game/
โ”œโ”€โ”€ main.odin        โ† All game code
โ”œโ”€โ”€ fish.json        โ† Fish types, probabilities, model paths
โ”œโ”€โ”€ build.sh         โ† Build helper script
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ fishes/          โ† Put your .glb 3D models here
    โ”œโ”€โ”€ common_carp.glb
    โ”œโ”€โ”€ bluegill.glb
    โ”œโ”€โ”€ bass.glb
    โ”œโ”€โ”€ rainbow_trout.glb
    โ”œโ”€โ”€ catfish.glb
    โ”œโ”€โ”€ pike.glb
    โ”œโ”€โ”€ golden_koi.glb
    โ””โ”€โ”€ dragonfish.glb

Running

From the project root (where odin-linux-amd64-nightly+2026-03-03/ lives):

# Run directly
./odin-linux-amd64-nightly+2026-03-03/odin run odin_fishing_game \
    -extra-linker-flags:"-lraylib -lGL -lm -lpthread -ldl -lrt -lX11"

# Or build first
chmod +x odin_fishing_game/build.sh
./odin_fishing_game/build.sh
cd odin_fishing_game && ./fishing_game

Note: Raylib must be installed system-wide. On Ubuntu/Debian:

sudo apt install libraylib-dev

Or build from source: https://github.com/raysan5/raylib

Controls

Key Action
SPACE Cast line / Hook fish when biting / Skip result screen
R Recast line while waiting
Right-click drag / Arrow keys Rotate camera (orbital mode)
ESC Quit

Gameplay

  1. Press SPACE to cast your line into the pool
  2. Wait for a bite โ€” the bobber will dip and flash
  3. Press SPACE quickly when you see !! BITE !!
  4. Watch your catch fly into the bucket!

Fish & Rarities

Fish Rarity Chance
Common Carp Common 30%
Bluegill Common 25%
Bass Uncommon 18%
Rainbow Trout Uncommon 12%
Catfish Rare 7%
Pike Rare 5%
Golden Koi Epic 2%
Mythic Dragonfish Legendary 1%

Adding Your Own 3D Models

  1. Export your fish model as .glb
  2. Drop it in odin_fishing_game/fishes/
  3. Update fish.json โ€” set "model_path" to "fishes/your_fish.glb"

The game falls back to a colorful procedural fish shape if no model file is found.

fish.json Format

{
  "fishes": [
    {
      "name": "My Fish",
      "rarity": "Common",
      "probability": 0.30,
      "model_path": "fishes/my_fish.glb",
      "color": [0.7, 0.5, 0.2],
      "scale": 0.8
    }
  ]
}

Probabilities should sum to 1.0. color is RGB in [0..1] range and is used as a tint on the 3D model as well as the procedural fallback mesh.