Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/kenzz55/ue5-iocp-mmo-server/llms.txt

Use this file to discover all available pages before exploring further.

The UE5 IOCP MMO Server is an end-to-end multiplayer backend designed for game developers building large-scale MMO experiences with Unreal Engine 5.4. It combines a high-performance C++ game server built on Windows I/O Completion Ports (IOCP) with a lightweight ASP.NET Core 8 authentication service, MariaDB 11 for persistent data, Redis 7 for token management, and Protocol Buffers for compact binary messaging. Whether you are prototyping a new MMO or studying production-grade server architecture, this project provides a complete, runnable reference implementation covering the full flow from player registration through real-time gameplay.

Key Features

IOCP Network Core

Windows I/O Completion Port networking supports up to 10,000 concurrent sessions. TCP carries reliable gameplay packets; UDP handles low-latency movement replication at a 100 ms notify interval.

Dedicated Auth Service

An ASP.NET Core 8 minimal-API server owns registration, login, server listing, and server selection. It issues short-lived access tokens and enter tokens via Redis, keeping all auth logic out of the game server.

Area of Interest (AoI)

A cell-based AoI system partitions the world using a configurable view distance of 3000 units. Players and monsters are only replicated to sessions within the relevant spatial cells, drastically reducing bandwidth.

Monster AI & Combat

Server-authoritative monster entities support melee and ranged attack types with hit detection, HP tracking, death handling, and a 30-second respawn scheduler — all driven by the game simulation tick.

Inventory System

A durable inventory system persists item instances to MariaDB with optimistic concurrency via a revision counter. Move and use operations are idempotent and identified by client-generated request IDs.

Metrics & Monitoring

The game server exposes a Prometheus HTTP endpoint on port 9108. A pre-configured Grafana dashboard visualises session counts, packet rates, tick timing, and inventory operation throughput in real time.

Technology Stack

LayerTechnology
Game ServerC++ (Windows IOCP, WinSock2, MSWSock)
Auth ServerASP.NET Core 8 (Minimal API)
DatabaseMariaDB 11
Cache / TokensRedis 7
SerialisationProtocol Buffers (proto3)
ClientUnreal Engine 5.4
ObservabilityPrometheus + Grafana

Key Configuration Constants

The following compile-time constants from Common/Config.h and Common/Types.h govern the server’s runtime behaviour. Adjust them before building to tune capacity and timing for your environment.
ConstantValueDescription
ListenPort7777TCP port the game server binds for gameplay connections
UdpListenPort7777UDP port used for movement replication datagrams
MaxPacketSize16 384 bytesMaximum permitted size of a single inbound TCP packet
MaxPacketsPerSecond100Per-session rate limit before the connection is dropped
GameSimulationTickIntervalMs33 msGame loop tick interval (~30 Hz)
MovementAoiViewDistance3000.0Spatial cell radius (UU) for player/monster visibility
HeartbeatIntervalSeconds5 sHow often the server sends a heartbeat ping
HeartbeatTimeoutSeconds15 sIdle time before a session is forcibly disconnected
MAX_SESSIONS10 000Hard cap on simultaneous connected sessions
WORKER_THREAD_COUNT4Number of IOCP worker threads dequeuing completion events
The game server uses WinSock2, MSWSock, and the Windows IOCP API (CreateIoCompletionPort, AcceptEx, DisconnectEx). It cannot be compiled or run on Linux or macOS without a significant rewrite. All server components are intended to be deployed on Windows Server or run locally on Windows 10/11.

Build docs developers (and LLMs) love