# do-00/gameprogramming_team4 architecture

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

- Interactive diagram: https://gitdiagram.com/do-00/gameprogramming_team4
- Repository: https://github.com/do-00/gameprogramming_team4

## Overview

Mort en Bourdonnant is a Unity co-op survival game in which 2–4 players enter a human home as flies, eat food to produce eggs, and bring them back to base while avoiding cats and spiders. The README also describes randomized room and food generation, player skills, networking, and quota-based game-over conditions. Source excerpts were not provided, so the graph uses documented relationships only; paths identify relevant files from the tree, not verified call sites.

Main entry points: [`Assets/Prefabs/Map/MapGenerator.cs`](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Map/MapGenerator.cs) (Room generation), [`Assets/Prefabs/Player/Skill/PlayerSkill.cs`](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Player/Skill/PlayerSkill.cs) (Player skills), [`Assets/Prefabs/Monster/SpiderMonster/SpiderWeb.cs`](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Monster/SpiderMonster/SpiderWeb.cs) (Spider webs), [`Assets/MainSystem/GameOverManager.cs`](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/MainSystem/GameOverManager.cs) (Game over)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Player gameplay"]
  node_players["Player movement<br/>[PlayerMovement.cs]"]
  node_skills["Player skills<br/>[PlayerSkill.cs]"]
  node_skillshop["Skill shop"]
end

subgraph group_world["World and threats"]
  node_mapgen["Room generation<br/>[MapGenerator.cs]"]
  node_cat["Cat AI<br/>[MonsterCatAI.cs]"]
  node_spider["Spider AI<br/>[MonsterSpiderAI.cs]"]
  node_web["Spider webs<br/>[SpiderWeb.cs]"]
end

subgraph group_session["Session systems"]
  node_game["Game manager<br/>[GameManager.cs]"]
  node_shelter["Base shelter<br/>[ShelterZone.cs]"]
  node_revival["Resurrection shrine"]
  node_gameover["Game over<br/>[GameOverManager.cs]"]
  node_flytrigger["Fly trigger<br/>[FlyKingTrigger.cs]"]
end

subgraph group_multiplayer["Multiplayer"]
  node_networkui["Network UI<br/>[NetworkUI.cs]"]
end

node_player(("Player"))
node_home["Human home"]
node_food["Food"]
node_eggs["Eggs"]
node_quota["Round quota"]
node_team(("Co-op players"))

node_player -->|"enters"| node_home
node_player -->|"eats"| node_food
node_player -->|"produces"| node_eggs
node_player -->|"brings eggs"| node_shelter
node_mapgen -->|"generates rooms"| node_home
node_mapgen -->|"randomizes"| node_food
node_cat -->|"detects and attacks"| node_player
node_spider -->|"creates webs"| node_web
node_web -->|"detects; enables pursuit"| node_player
node_team -->|"plays online"| node_networkui
node_player -->|"uses skills"| node_skills
node_skills -.->|"null"| node_skillshop
node_game -->|"tracks rounds"| node_quota
node_quota -->|"failure ends game"| node_gameover
node_player -->|"all deaths end game"| node_gameover
node_player -.->|"null"| node_revival
node_player -.->|"null"| node_flytrigger

click node_players "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Player/PlayerMovement.cs"
click node_skills "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Player/Skill/PlayerSkill.cs"
click node_skillshop "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Player/Skill/SkillShopManager.cs"
click node_mapgen "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Map/MapGenerator.cs"
click node_cat "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Monster/CatMonster/MonsterCatAI.cs"
click node_spider "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Monster/SpiderMonster/MonsterSpiderAI.cs"
click node_web "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Monster/SpiderMonster/SpiderWeb.cs"
click node_game "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/MainSystem/GameManager.cs"
click node_shelter "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/MainSystem/ShelterZone.cs"
click node_revival "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/MainSystem/ResurrectionShrine.cs"
click node_gameover "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/MainSystem/GameOverManager.cs"
click node_flytrigger "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/MainSystem/FlyKingTrigger.cs"
click node_networkui "https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Network/NetworkUI.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_players,node_skills,node_skillshop toneBlue
class node_mapgen,node_cat,node_spider,node_web toneAmber
class node_game,node_shelter,node_revival,node_gameover,node_flytrigger toneMint
class node_networkui toneRose
class node_player,node_home,node_food,node_eggs,node_quota,node_team toneIndigo
```

## Components

### Player gameplay

- [Player movement](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Player/PlayerMovement.cs): `Assets/Prefabs/Player/PlayerMovement.cs`
- [Player skills](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Player/Skill/PlayerSkill.cs): `Assets/Prefabs/Player/Skill/PlayerSkill.cs`
- [Skill shop](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Player/Skill/SkillShopManager.cs): `Assets/Prefabs/Player/Skill/SkillShopManager.cs`

### World and threats

- [Room generation](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Map/MapGenerator.cs): `Assets/Prefabs/Map/MapGenerator.cs`
- [Cat AI](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Monster/CatMonster/MonsterCatAI.cs): `Assets/Prefabs/Monster/CatMonster/MonsterCatAI.cs`
- [Spider AI](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Monster/SpiderMonster/MonsterSpiderAI.cs): `Assets/Prefabs/Monster/SpiderMonster/MonsterSpiderAI.cs`
- [Spider webs](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Prefabs/Monster/SpiderMonster/SpiderWeb.cs): `Assets/Prefabs/Monster/SpiderMonster/SpiderWeb.cs`

### Session systems

- [Game manager](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/MainSystem/GameManager.cs): `Assets/MainSystem/GameManager.cs`
- [Base shelter](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/MainSystem/ShelterZone.cs): `Assets/MainSystem/ShelterZone.cs`
- [Resurrection shrine](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/MainSystem/ResurrectionShrine.cs): `Assets/MainSystem/ResurrectionShrine.cs`
- [Game over](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/MainSystem/GameOverManager.cs): `Assets/MainSystem/GameOverManager.cs`
- [Fly trigger](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/MainSystem/FlyKingTrigger.cs): `Assets/MainSystem/FlyKingTrigger.cs`

### Multiplayer

- [Network UI](https://github.com/do-00/gameprogramming_team4/blob/main/Assets/Network/NetworkUI.cs): `Assets/Network/NetworkUI.cs`

### Other components

- **Player**
- **Human home**
- **Food**
- **Eggs**
- **Round quota**
- **Co-op players**

## Connections

- Player → Human home: enters (evidence: `README.md`)
- Player → Food: eats (evidence: `README.md`)
- Player → Eggs: produces (evidence: `README.md`)
- Player → Base shelter: brings eggs (evidence: `README.md`)
- Room generation → Human home: generates rooms (evidence: `README.md`)
- Room generation → Food: randomizes (evidence: `README.md`)
- Cat AI → Player: detects and attacks (evidence: `README.md`)
- Spider AI → Spider webs: creates webs (evidence: `README.md`)
- Spider webs → Player: detects; enables pursuit (evidence: `README.md`)
- Co-op players → Network UI: plays online (evidence: `README.md`)
- Player → Player skills: uses skills (evidence: `README.md`)
- Player skills → Skill shop: null
- Game manager → Round quota: tracks rounds (evidence: `README.md`)
- Round quota → Game over: failure ends game (evidence: `README.md`)
- Player → Game over: all deaths end game (evidence: `README.md`)
- Player → Resurrection shrine: null
- Player → Fly trigger: null
