# talank/fishhunt architecture

> Architecture diagram of the GitHub repository talank/fishhunt, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/talank/fishhunt
- Repository: https://github.com/talank/fishhunt

## Overview

FishHunt is an Android multiplayer fish-eating game, with a documented single-player option. The main workflow starts at the menu, then enters a solo game or a multiplayer lobby to host or join a room; players eat food or smaller fish, grow, and compete to be largest when time expires. The README describes these capabilities, but no source excerpts were provided, so implementation-level calls and detailed subsystem wiring cannot be verified.

Main entry points: [`FishHunt/Assets/Scenes/MainGame.unity`](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scenes/MainGame.unity) (Main game scene), [`FishHunt/Assets/MainMenu.cs`](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/MainMenu.cs) (Start menu), [`FishHunt/Assets/Lobby/Scripts/Lobby`](https://github.com/talank/fishhunt/tree/master/FishHunt/Assets/Lobby/Scripts/Lobby) (Lobby UI), [`FishHunt/Assets/Scenes/Singleplayer.unity`](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scenes/Singleplayer.unity) (Single-player scene)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and menus"]
  node_mainmenu["Start menu<br/>[MainMenu.cs]"]
  node_pause["Pause menu<br/>[PauseMenu.cs]"]
end

subgraph group_play["Game play"]
  node_singleplayer["Single-player scene<br/>[Singleplayer.unity]"]
  node_maingame["Main game scene<br/>[MainGame.unity]"]
  node_fishmovement["Fish movement<br/>[MoveFish.cs]"]
  node_solomovement["Solo movement<br/>[MoveFishSP.cs]"]
  node_foodgeneration["Food distribution<br/>[FoodGeneration.cs]"]
  node_foodeating["Food eating<br/>[EatFood.cs]"]
  node_playerstate["Player state<br/>[Player.cs]"]
  node_boundaries["Ocean boundaries<br/>[CameraFollow.cs]"]
end

subgraph group_multiplayer["Multiplayer"]
  node_lobby["Lobby UI"]
  node_networkmanager["Network manager<br/>[NetworkManager.cs]"]
  node_networkhook["Network lobby hook"]
  node_networkgame["Network gameplay"]
end

subgraph group_presentation["Game presentation"]
  node_environment["Ocean environment"]
end

node_player(("Player"))
node_internet{{"Unity hosting"}}

node_player -->|"opens"| node_mainmenu
node_mainmenu -->|"starts solo"| node_singleplayer
node_mainmenu -->|"opens multiplayer"| node_lobby
node_player -->|"hosts or joins"| node_lobby
node_lobby -.->|"selects room"| node_networkmanager
node_networkmanager -->|"uses Unity host"| node_internet
node_singleplayer -.->|"plays with"| node_solomovement
node_maingame -.->|"plays with"| node_fishmovement
node_maingame -.->|"distributes food"| node_foodgeneration
node_maingame -.->|"supports eating"| node_foodeating
node_foodeating -.->|"grows player"| node_playerstate
node_maingame -.->|"determines winner"| node_playerstate
node_maingame -.->|"limits roaming"| node_boundaries
node_maingame -.->|"shows ocean"| node_environment
node_networkhook -.->|"supports multiplayer"| node_networkgame
node_player -->|"pauses game"| node_pause

click node_mainmenu "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/MainMenu.cs"
click node_pause "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/PauseMenu.cs"
click node_lobby "https://github.com/talank/fishhunt/tree/master/FishHunt/Assets/Lobby/Scripts/Lobby"
click node_networkmanager "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Standard%20Assets/Managers/NetworkManager.cs"
click node_networkhook "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/SampleScenes/Scripts/NetworkLobbyHook.cs"
click node_singleplayer "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scenes/Singleplayer.unity"
click node_maingame "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scenes/MainGame.unity"
click node_fishmovement "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scripts/MoveFish.cs"
click node_solomovement "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scripts/MoveFishSP.cs"
click node_foodgeneration "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scripts/FoodGeneration.cs"
click node_foodeating "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scripts/EatFood.cs"
click node_playerstate "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scripts/Player.cs"
click node_boundaries "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scripts/CameraFollow.cs"
click node_environment "https://github.com/talank/fishhunt/tree/master/FishHunt/Assets/Resources/Sky%2CWalls%2CFloor"
click node_networkgame "https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/SampleScenes/Scripts/NetworkGameManager.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mainmenu,node_pause toneBlue
class node_singleplayer,node_maingame,node_fishmovement,node_solomovement,node_foodgeneration,node_foodeating,node_playerstate,node_boundaries toneAmber
class node_lobby,node_networkmanager,node_networkhook,node_networkgame toneMint
class node_environment toneRose
class node_player,node_internet toneIndigo
```

## Components

### Entry and menus

- [Start menu](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/MainMenu.cs): `FishHunt/Assets/MainMenu.cs`
- [Pause menu](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/PauseMenu.cs): `FishHunt/Assets/PauseMenu.cs`

### Game play

- [Single-player scene](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scenes/Singleplayer.unity): `FishHunt/Assets/Scenes/Singleplayer.unity`
- [Main game scene](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scenes/MainGame.unity): `FishHunt/Assets/Scenes/MainGame.unity`
- [Fish movement](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scripts/MoveFish.cs): `FishHunt/Assets/Scripts/MoveFish.cs`
- [Solo movement](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scripts/MoveFishSP.cs): `FishHunt/Assets/Scripts/MoveFishSP.cs`
- [Food distribution](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scripts/FoodGeneration.cs): `FishHunt/Assets/Scripts/FoodGeneration.cs`
- [Food eating](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scripts/EatFood.cs): `FishHunt/Assets/Scripts/EatFood.cs`
- [Player state](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scripts/Player.cs): `FishHunt/Assets/Scripts/Player.cs`
- [Ocean boundaries](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Scripts/CameraFollow.cs): `FishHunt/Assets/Scripts/CameraFollow.cs`

### Multiplayer

- [Lobby UI](https://github.com/talank/fishhunt/tree/master/FishHunt/Assets/Lobby/Scripts/Lobby): `FishHunt/Assets/Lobby/Scripts/Lobby`
- [Network manager](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/Standard%20Assets/Managers/NetworkManager.cs): `FishHunt/Assets/Standard Assets/Managers/NetworkManager.cs`
- [Network lobby hook](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/SampleScenes/Scripts/NetworkLobbyHook.cs): `FishHunt/Assets/SampleScenes/Scripts/NetworkLobbyHook.cs`
- [Network gameplay](https://github.com/talank/fishhunt/blob/master/FishHunt/Assets/SampleScenes/Scripts/NetworkGameManager.cs): `FishHunt/Assets/SampleScenes/Scripts/NetworkGameManager.cs`

### Game presentation

- [Ocean environment](https://github.com/talank/fishhunt/tree/master/FishHunt/Assets/Resources/Sky%2CWalls%2CFloor): `FishHunt/Assets/Resources/Sky,Walls,Floor`

### Other components

- **Player**
- **Unity hosting**

## Connections

- Player → Start menu: opens
- Start menu → Single-player scene: starts solo
- Start menu → Lobby UI: opens multiplayer
- Player → Lobby UI: hosts or joins
- Lobby UI → Network manager: selects room
- Network manager → Unity hosting: uses Unity host
- Single-player scene → Solo movement: plays with
- Main game scene → Fish movement: plays with
- Main game scene → Food distribution: distributes food
- Main game scene → Food eating: supports eating
- Food eating → Player state: grows player
- Main game scene → Player state: determines winner
- Main game scene → Ocean boundaries: limits roaming
- Main game scene → Ocean environment: shows ocean
- Network lobby hook → Network gameplay: supports multiplayer
- Player → Pause menu: pauses game
