56 lines
2.1 KiB
Markdown
56 lines
2.1 KiB
Markdown
# Commonwealth Online Server and Qt Host
|
|
|
|
This repository contains the Commonwealth Online authoritative dedicated server and the Qt Host GUI.
|
|
|
|
The dedicated server is C#/.NET. Valve GameNetworkingSockets remains behind the small native C++ bridge in `server/native_transport/`.
|
|
|
|
## Server
|
|
|
|
```bash
|
|
cd server
|
|
dotnet build CommonwealthOnline.Server.csproj -c Release
|
|
dotnet run --project tests/CommonwealthOnline.Server.Tests.csproj -c Release
|
|
dotnet run --project CommonwealthOnline.Server.csproj -- serve --config commonwealth-server.json --interactive
|
|
```
|
|
|
|
The server owns Protocol V2 admission, server-owned player IDs, packet validation, movement validation, interest filtering, durable player state, scoped NPC authority and epochs, combat routing, world state, bans, rate limits, LAN discovery and localhost administration.
|
|
|
|
Transport policy remains:
|
|
|
|
- `transform`, `npcState`: unreliable/sequenced under GNS
|
|
- session/control, player state, combat, world state and authority: reliable/ordered
|
|
|
|
TCP compatibility keeps newline framing inside the TCP transport only. GNS is message-oriented and uses the `COG2` snapshot sequence envelope for latest-wins snapshots.
|
|
|
|
## Native GNS bridge
|
|
|
|
`server/native_transport` stays C++ and owns only GNS listen/connection/message mechanics and endpoint lookup. C# loads the existing C ABI directly.
|
|
|
|
## Qt Host GUI
|
|
|
|
The Qt Host remains native C++. It launches the published `CommonwealthOnline.Server` process and uses the authenticated localhost admin channel for stats, clients, kicks and bans.
|
|
|
|
Build requirements on Windows:
|
|
|
|
- Visual Studio 2022 C++ tools
|
|
- CMake 3.20+
|
|
- Qt 6.4+
|
|
- .NET 8 SDK
|
|
|
|
```bat
|
|
check-setup.bat
|
|
build.bat
|
|
deploy.bat
|
|
```
|
|
|
|
CMake publishes the C# server self-contained and stages it under the Host GUI `server` directory. Packaged users do not need a separate .NET runtime.
|
|
|
|
## Default ports
|
|
|
|
- TCP 7777: gameplay compatibility
|
|
- UDP 7777: GNS gameplay when enabled
|
|
- UDP 7778: LAN discovery
|
|
- TCP 127.0.0.1:7779: authenticated admin control
|
|
|
|
See [server/README.md](server/README.md), [SETUP.md](SETUP.md), [DEVELOPMENT.md](DEVELOPMENT.md), and [DEPLOYMENT.md](DEPLOYMENT.md).
|