# spsquonk/useless architecture

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

- Interactive diagram: https://gitdiagram.com/spsquonk/useless
- Repository: https://github.com/spsquonk/useless

## Overview

This is a FlyFF v15 multiplayer game source tree, with a Windows game client, gameplay/world server, and supporting account, certification, login, cache, and database services. The user-facing journey is expected to span authentication, character selection, and entering the game world, but the sampled evidence does not establish the complete inter-server route, so those links are left unasserted. The graph preserves major server and client domains visible in the tree and README, plus sampled networking and map subsystems. Several paths are represented by their exact directory because their implementation files were not sampled.

Main entry points: [`Source/_Common/MapInformationManager.h`](https://github.com/spsquonk/useless/blob/master/Source/_Common/MapInformationManager.h) (Map information manager), [`Source/LOGINSERVER/DPDatabaseClient.cpp`](https://github.com/spsquonk/useless/blob/master/Source/LOGINSERVER/DPDatabaseClient.cpp) (Login database protocol), [`Source/CERTIFIER/DBManager.cpp`](https://github.com/spsquonk/useless/blob/master/Source/CERTIFIER/DBManager.cpp) (Certification database), [`Source/_Common/MapMonsterInformation.h`](https://github.com/spsquonk/useless/blob/master/Source/_Common/MapMonsterInformation.h) (Monster map records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Game client"]
  node_neuz["Game client"]
  node_client_network["Client networking<br/>[DPClient.cpp]"]
  node_map_info["Map information"]
  node_map_monsters["Monster map data"]
  node_rainbow_npcs["Rainbow NPC data"]
end

subgraph group_gameplay["World gameplay"]
  node_world_server["World server"]
  node_world_network["World networking<br/>[DPCoreClient.cpp]"]
  node_world_database["World persistence"]
  node_npc_scripts["NPC scripts<br/>[NpcScript.cpp]"]
end

subgraph group_services["Account services"]
  node_account_server["Account server"]
  node_certifier["Certification service"]
  node_cert_db["Certification database<br/>[DBManager.cpp]"]
  node_account_client["Account protocol<br/>[dpaccountclient.h]"]
  node_login_server["Login server"]
  node_login_dbclient["Login database protocol"]
  node_login_protect["Login protection<br/>[LoginProtect.h]"]
  node_cache_server["Cache server"]
  node_database_server["Database server"]
end

subgraph group_shared["Shared runtime"]
  node_database_runtime[("Database runtime<br/>[DbManager.cpp]")]
  node_socket_runtime["Socket transport<br/>[clientsock.cpp]"]
  node_packet_archive["Packet serialization<br/>[ar.h]"]
  node_map_manager["Map information manager"]
  node_map_combo["Map selectors<br/>[MapComboBoxData.h]"]
  node_map_monster["Monster map records"]
  node_map_marks["User map marks"]
  node_rainbow_records["Rainbow NPC records"]
  node_static_string["Fixed strings<br/>[static_string.h]"]
  node_cert_users["Certified users<br/>[user.h]"]
  node_network_clientsock["Client socket API<br/>[clientsock.h]"]
  node_monitor["Monitor client"]
end

node_player(("Player"))

node_cert_db -->|"sends account"| node_account_client
node_login_dbclient -->|"routes messages"| node_login_server
node_login_dbclient -->|"updates protection"| node_login_protect
node_login_dbclient -->|"requests pre-join"| node_world_network
node_map_manager -->|"loads selectors"| node_map_combo
node_map_manager -->|"loads monster data"| node_map_monster
node_map_manager -->|"manages marks"| node_map_marks
node_map_manager -->|"loads NPC data"| node_rainbow_records
node_map_monsters -->|"stores records"| node_map_monster
node_rainbow_npcs -->|"stores records"| node_rainbow_records
node_socket_runtime -->|"implements API"| node_network_clientsock
node_cert_db -->|"formats queries"| node_static_string

click node_neuz "https://github.com/spsquonk/useless/tree/master/Source/Neuz"
click node_client_network "https://github.com/spsquonk/useless/blob/master/Source/Neuz/DPClient.cpp"
click node_map_info "https://github.com/spsquonk/useless/blob/master/Source/_Common/MapInformationManager.cpp"
click node_map_monsters "https://github.com/spsquonk/useless/blob/master/Source/_Common/MapMonsterInformationPack.h"
click node_rainbow_npcs "https://github.com/spsquonk/useless/blob/master/Source/_Common/RainbowNPCInformationPack.h"
click node_world_server "https://github.com/spsquonk/useless/tree/master/Source/WORLDSERVER"
click node_world_network "https://github.com/spsquonk/useless/blob/master/Source/WORLDSERVER/DPCoreClient.cpp"
click node_world_database "https://github.com/spsquonk/useless/blob/master/Source/WORLDSERVER/DPDatabaseClient.cpp"
click node_npc_scripts "https://github.com/spsquonk/useless/blob/master/Source/WORLDDIALOG/NpcScript.cpp"
click node_account_server "https://github.com/spsquonk/useless/tree/master/Source/AccountServer"
click node_certifier "https://github.com/spsquonk/useless/tree/master/Source/CERTIFIER"
click node_cert_db "https://github.com/spsquonk/useless/blob/master/Source/CERTIFIER/DBManager.cpp"
click node_account_client "https://github.com/spsquonk/useless/blob/master/Source/CERTIFIER/dpaccountclient.h"
click node_login_server "https://github.com/spsquonk/useless/tree/master/Source/LOGINSERVER"
click node_login_dbclient "https://github.com/spsquonk/useless/blob/master/Source/LOGINSERVER/DPDatabaseClient.cpp"
click node_login_protect "https://github.com/spsquonk/useless/blob/master/Source/LOGINSERVER/LoginProtect.h"
click node_cache_server "https://github.com/spsquonk/useless/tree/master/Source/CACHESERVER"
click node_database_server "https://github.com/spsquonk/useless/tree/master/Source/databaseserver"
click node_database_runtime "https://github.com/spsquonk/useless/blob/master/Source/_Database/DbManager.cpp"
click node_socket_runtime "https://github.com/spsquonk/useless/blob/master/Source/_Network/Net/Src/clientsock.cpp"
click node_packet_archive "https://github.com/spsquonk/useless/blob/master/Source/_Network/Misc/Include/ar.h"
click node_map_manager "https://github.com/spsquonk/useless/blob/master/Source/_Common/MapInformationManager.h"
click node_map_combo "https://github.com/spsquonk/useless/blob/master/Source/_Common/MapComboBoxData.h"
click node_map_monster "https://github.com/spsquonk/useless/blob/master/Source/_Common/MapMonsterInformation.h"
click node_map_marks "https://github.com/spsquonk/useless/blob/master/Source/_Common/UserMarkPositionInfo.h"
click node_rainbow_records "https://github.com/spsquonk/useless/blob/master/Source/_Common/RainbowNPCInformation.h"
click node_static_string "https://github.com/spsquonk/useless/blob/master/Source/Libraries/sqktd/static_string.h"
click node_cert_users "https://github.com/spsquonk/useless/blob/master/Source/CERTIFIER/user.h"
click node_network_clientsock "https://github.com/spsquonk/useless/blob/master/Source/_Network/Net/Include/clientsock.h"
click node_monitor "https://github.com/spsquonk/useless/blob/master/Source/_Network/dpmonitorclient.cpp"

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_neuz,node_client_network,node_map_info,node_map_monsters,node_rainbow_npcs toneBlue
class node_world_server,node_world_network,node_world_database,node_npc_scripts toneAmber
class node_account_server,node_certifier,node_cert_db,node_account_client,node_login_server,node_login_dbclient,node_login_protect,node_cache_server,node_database_server toneMint
class node_database_runtime,node_socket_runtime,node_packet_archive,node_map_manager,node_map_combo,node_map_monster,node_map_marks,node_rainbow_records,node_static_string,node_cert_users,node_network_clientsock,node_monitor toneRose
class node_player toneIndigo
```

## Components

### Game client

- [Game client](https://github.com/spsquonk/useless/tree/master/Source/Neuz): `Source/Neuz`
- [Client networking](https://github.com/spsquonk/useless/blob/master/Source/Neuz/DPClient.cpp): `Source/Neuz/DPClient.cpp`
- [Map information](https://github.com/spsquonk/useless/blob/master/Source/_Common/MapInformationManager.cpp): `Source/_Common/MapInformationManager.cpp`
- [Monster map data](https://github.com/spsquonk/useless/blob/master/Source/_Common/MapMonsterInformationPack.h): `Source/_Common/MapMonsterInformationPack.h`
- [Rainbow NPC data](https://github.com/spsquonk/useless/blob/master/Source/_Common/RainbowNPCInformationPack.h): `Source/_Common/RainbowNPCInformationPack.h`

### World gameplay

- [World server](https://github.com/spsquonk/useless/tree/master/Source/WORLDSERVER): `Source/WORLDSERVER`
- [World networking](https://github.com/spsquonk/useless/blob/master/Source/WORLDSERVER/DPCoreClient.cpp): `Source/WORLDSERVER/DPCoreClient.cpp`
- [World persistence](https://github.com/spsquonk/useless/blob/master/Source/WORLDSERVER/DPDatabaseClient.cpp): `Source/WORLDSERVER/DPDatabaseClient.cpp`
- [NPC scripts](https://github.com/spsquonk/useless/blob/master/Source/WORLDDIALOG/NpcScript.cpp): `Source/WORLDDIALOG/NpcScript.cpp`

### Account services

- [Account server](https://github.com/spsquonk/useless/tree/master/Source/AccountServer): `Source/AccountServer`
- [Certification service](https://github.com/spsquonk/useless/tree/master/Source/CERTIFIER): `Source/CERTIFIER`
- [Certification database](https://github.com/spsquonk/useless/blob/master/Source/CERTIFIER/DBManager.cpp): `Source/CERTIFIER/DBManager.cpp`
- [Account protocol](https://github.com/spsquonk/useless/blob/master/Source/CERTIFIER/dpaccountclient.h): `Source/CERTIFIER/dpaccountclient.h`
- [Login server](https://github.com/spsquonk/useless/tree/master/Source/LOGINSERVER): `Source/LOGINSERVER`
- [Login database protocol](https://github.com/spsquonk/useless/blob/master/Source/LOGINSERVER/DPDatabaseClient.cpp): `Source/LOGINSERVER/DPDatabaseClient.cpp`
- [Login protection](https://github.com/spsquonk/useless/blob/master/Source/LOGINSERVER/LoginProtect.h): `Source/LOGINSERVER/LoginProtect.h`
- [Cache server](https://github.com/spsquonk/useless/tree/master/Source/CACHESERVER): `Source/CACHESERVER`
- [Database server](https://github.com/spsquonk/useless/tree/master/Source/databaseserver): `Source/databaseserver`

### Shared runtime

- [Database runtime](https://github.com/spsquonk/useless/blob/master/Source/_Database/DbManager.cpp): `Source/_Database/DbManager.cpp`
- [Socket transport](https://github.com/spsquonk/useless/blob/master/Source/_Network/Net/Src/clientsock.cpp): `Source/_Network/Net/Src/clientsock.cpp`
- [Packet serialization](https://github.com/spsquonk/useless/blob/master/Source/_Network/Misc/Include/ar.h): `Source/_Network/Misc/Include/ar.h`
- [Map information manager](https://github.com/spsquonk/useless/blob/master/Source/_Common/MapInformationManager.h): `Source/_Common/MapInformationManager.h`
- [Map selectors](https://github.com/spsquonk/useless/blob/master/Source/_Common/MapComboBoxData.h): `Source/_Common/MapComboBoxData.h`
- [Monster map records](https://github.com/spsquonk/useless/blob/master/Source/_Common/MapMonsterInformation.h): `Source/_Common/MapMonsterInformation.h`
- [User map marks](https://github.com/spsquonk/useless/blob/master/Source/_Common/UserMarkPositionInfo.h): `Source/_Common/UserMarkPositionInfo.h`
- [Rainbow NPC records](https://github.com/spsquonk/useless/blob/master/Source/_Common/RainbowNPCInformation.h): `Source/_Common/RainbowNPCInformation.h`
- [Fixed strings](https://github.com/spsquonk/useless/blob/master/Source/Libraries/sqktd/static_string.h): `Source/Libraries/sqktd/static_string.h`
- [Certified users](https://github.com/spsquonk/useless/blob/master/Source/CERTIFIER/user.h): `Source/CERTIFIER/user.h`
- [Client socket API](https://github.com/spsquonk/useless/blob/master/Source/_Network/Net/Include/clientsock.h): `Source/_Network/Net/Include/clientsock.h`
- [Monitor client](https://github.com/spsquonk/useless/blob/master/Source/_Network/dpmonitorclient.cpp): `Source/_Network/dpmonitorclient.cpp`

### Other components

- **Player**

## Connections

- Certification database → Account protocol: sends account (evidence: `Source/CERTIFIER/DBManager.cpp`)
- Login database protocol → Login server: routes messages (evidence: `Source/LOGINSERVER/DPDatabaseClient.cpp`)
- Login database protocol → Login protection: updates protection (evidence: `Source/LOGINSERVER/DPDatabaseClient.cpp`)
- Login database protocol → World networking: requests pre-join (evidence: `Source/LOGINSERVER/DPDatabaseClient.cpp`)
- Map information manager → Map selectors: loads selectors (evidence: `Source/_Common/MapInformationManager.h`)
- Map information manager → Monster map records: loads monster data (evidence: `Source/_Common/MapInformationManager.h`)
- Map information manager → User map marks: manages marks (evidence: `Source/_Common/MapInformationManager.h`)
- Map information manager → Rainbow NPC records: loads NPC data (evidence: `Source/_Common/MapInformationManager.h`)
- Monster map data → Monster map records: stores records (evidence: `Source/_Common/MapMonsterInformationPack.h`)
- Rainbow NPC data → Rainbow NPC records: stores records (evidence: `Source/_Common/RainbowNPCInformationPack.h`)
- Socket transport → Client socket API: implements API (evidence: `Source/_Network/Net/Src/clientsock.cpp`)
- Certification database → Fixed strings: formats queries (evidence: `Source/CERTIFIER/DBManager.cpp`)
