# nicomuratona/muemu-0.97k-kayito architecture

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

- Interactive diagram: https://gitdiagram.com/nicomuratona/muemu-0.97k-kayito
- Repository: https://github.com/nicomuratona/muemu-0.97k-kayito

## Overview

This repository is a MuEmu 0.97k game package: a Windows game client, an info encoder, four server processes, and two editing tools. The player workflow is expected to pass through server selection and account login before gameplay and persistent character/item data; those server-to-server handoffs are shown as unverified because the sampled excerpts do not establish their routing. README update notes document client/server synchronization for several gameplay systems. Tool and editor details are limited to the README and sampled editor forms.

Main entry points: [`Source/Client/Main/Main.cpp`](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/Main.cpp) (Game client), [`Source/MuServer/GameServer/GameServer.cpp`](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/GameServer/GameServer.cpp) (Game server), [`Source/Client/Main/Controller.cpp`](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/Controller.cpp) (Client controls), [`Source/Client/Main/ItemManager.cpp`](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/ItemManager.cpp) (Client items)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Game client"]
  node_main_client["Game client<br/>[Main.cpp]"]
  node_client_controls["Client controls<br/>[Controller.cpp]"]
  node_client_items["Client items<br/>[ItemManager.cpp]"]
  node_client_packets["Client protocol<br/>[PacketManager.cpp]"]
  node_client_maps["Client maps<br/>[MapManager.cpp]"]
end

subgraph group_servers["Mu server"]
  node_connect["Connect server<br/>[ConnectServer.cpp]"]
  node_connect_socket["Connect sockets<br/>[SocketManager.cpp]"]
  node_join["Join server<br/>[AccountManager.cpp]"]
  node_game["Game server<br/>[GameServer.cpp]"]
  node_gameplay["Gameplay rules<br/>[SkillManager.cpp]"]
  node_game_items["Game items<br/>[ItemManager.cpp]"]
  node_game_world["Maps and events<br/>[Map.h]"]
end

subgraph group_persistence["Persistence"]
  node_data["Data server<br/>[DataServer.cpp]"]
  node_data_queries["Database queries<br/>[QueryManager.cpp]"]
  node_database[("SQL database")]
end

subgraph group_content["Content authoring"]
  node_encoder["Info encoder<br/>[InfoEncoder.cpp]"]
  node_bmd_tools["BMD/TXT tools<br/>[Main.cs]"]
end

subgraph group_admin["Account administration"]
  node_editor["Account editor<br/>[Main.cs]"]
  node_character_editor["Character editor"]
end

node_player(("Player"))

node_player -->|"plays through"| node_main_client
node_main_client -.->|"uses controls"| node_client_controls
node_client_controls -->|"toggles map"| node_client_maps
node_main_client -.->|"exchanges packets"| node_client_packets
node_main_client -.->|"handles items"| node_client_items
node_main_client -.->|"selects server"| node_connect
node_connect -.->|"routes login"| node_join
node_join -.->|"admits player"| node_game
node_game -.->|"dispatches skills"| node_gameplay
node_game -->|"handles items"| node_game_items
node_game -.->|"manages world"| node_game_world
node_game -.->|"persists state"| node_data
node_data -.->|"executes queries"| node_data_queries
node_data_queries -.->|"reads and writes"| node_database
node_client_items -->|"synchronizes item data"| node_game_items
node_gameplay -->|"sends gameplay updates"| node_client_packets
node_encoder -->|"generates main info"| node_main_client
node_bmd_tools -.->|"edits game content"| node_encoder
node_editor -.->|"edits accounts"| node_database
node_character_editor -->|"edits characters"| node_database

click node_main_client "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/Main.cpp"
click node_client_controls "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/Controller.cpp"
click node_client_items "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/ItemManager.cpp"
click node_client_packets "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/PacketManager.cpp"
click node_client_maps "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/MapManager.cpp"
click node_encoder "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/InfoEncoder/InfoEncoder.cpp"
click node_connect "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/ConnectServer/ConnectServer.cpp"
click node_connect_socket "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/ConnectServer/SocketManager.cpp"
click node_join "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/JoinServer/AccountManager.cpp"
click node_game "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/GameServer/GameServer.cpp"
click node_gameplay "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/GameServer/SkillManager.cpp"
click node_game_items "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/GameServer/ItemManager.cpp"
click node_game_world "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/GameServer/Map.h"
click node_data "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/DataServer/DataServer.cpp"
click node_data_queries "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/DataServer/QueryManager.cpp"
click node_bmd_tools "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Tools/kayitoTools/kayitoTools/Forms/Main.cs"
click node_editor "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Tools/kayitoEditor/kayitoEditor/Forms/Main.cs"
click node_character_editor "https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Tools/kayitoEditor/kayitoEditor/Forms/Management/CharacterManager.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_main_client,node_client_controls,node_client_items,node_client_packets,node_client_maps toneBlue
class node_connect,node_connect_socket,node_join,node_game,node_gameplay,node_game_items,node_game_world toneAmber
class node_data,node_data_queries,node_database toneMint
class node_encoder,node_bmd_tools toneRose
class node_editor,node_character_editor,node_player toneIndigo
```

## Components

### Game client

- [Game client](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/Main.cpp): `Source/Client/Main/Main.cpp`
- [Client controls](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/Controller.cpp): `Source/Client/Main/Controller.cpp`
- [Client items](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/ItemManager.cpp): `Source/Client/Main/ItemManager.cpp`
- [Client protocol](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/PacketManager.cpp): `Source/Client/Main/PacketManager.cpp`
- [Client maps](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/Main/MapManager.cpp): `Source/Client/Main/MapManager.cpp`

### Mu server

- [Connect server](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/ConnectServer/ConnectServer.cpp): `Source/MuServer/ConnectServer/ConnectServer.cpp`
- [Connect sockets](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/ConnectServer/SocketManager.cpp): `Source/MuServer/ConnectServer/SocketManager.cpp`
- [Join server](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/JoinServer/AccountManager.cpp): `Source/MuServer/JoinServer/AccountManager.cpp`
- [Game server](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/GameServer/GameServer.cpp): `Source/MuServer/GameServer/GameServer.cpp`
- [Gameplay rules](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/GameServer/SkillManager.cpp): `Source/MuServer/GameServer/SkillManager.cpp`
- [Game items](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/GameServer/ItemManager.cpp): `Source/MuServer/GameServer/ItemManager.cpp`
- [Maps and events](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/GameServer/Map.h): `Source/MuServer/GameServer/Map.h`

### Persistence

- [Data server](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/DataServer/DataServer.cpp): `Source/MuServer/DataServer/DataServer.cpp`
- [Database queries](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/MuServer/DataServer/QueryManager.cpp): `Source/MuServer/DataServer/QueryManager.cpp`
- **SQL database**

### Content authoring

- [Info encoder](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Client/InfoEncoder/InfoEncoder.cpp): `Source/Client/InfoEncoder/InfoEncoder.cpp`
- [BMD/TXT tools](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Tools/kayitoTools/kayitoTools/Forms/Main.cs): `Source/Tools/kayitoTools/kayitoTools/Forms/Main.cs`

### Account administration

- [Account editor](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Tools/kayitoEditor/kayitoEditor/Forms/Main.cs): `Source/Tools/kayitoEditor/kayitoEditor/Forms/Main.cs`
- [Character editor](https://github.com/nicomuratona/muemu-0.97k-kayito/blob/master/Source/Tools/kayitoEditor/kayitoEditor/Forms/Management/CharacterManager.cs): `Source/Tools/kayitoEditor/kayitoEditor/Forms/Management/CharacterManager.cs`

### Other components

- **Player**

## Connections

- Player → Game client: plays through
- Game client → Client controls: uses controls
- Client controls → Client maps: toggles map (evidence: `Source/Client/Main/Controller.cpp`)
- Game client → Client protocol: exchanges packets
- Game client → Client items: handles items
- Game client → Connect server: selects server
- Connect server → Join server: routes login
- Join server → Game server: admits player
- Game server → Gameplay rules: dispatches skills
- Game server → Game items: handles items (evidence: `Source/MuServer/GameServer/ItemManager.cpp`)
- Game server → Maps and events: manages world
- Game server → Data server: persists state
- Data server → Database queries: executes queries
- Database queries → SQL database: reads and writes
- Client items → Game items: synchronizes item data
- Gameplay rules → Client protocol: sends gameplay updates
- Info encoder → Game client: generates main info
- BMD/TXT tools → Info encoder: edits game content
- Account editor → SQL database: edits accounts
- Character editor → SQL database: edits characters (evidence: `Source/Tools/kayitoEditor/kayitoEditor/Forms/Management/CharacterManager.cs`)
