Skip to main content

atsf4g-co Documentation

atsf4g-co (AT Service Framework for Game - Coroutine) is a coroutine-based game server framework built on atframework libraries (atframe_utils, libatbus, libatapp, and libcopp). Project code requires C++14 and supports Windows, Linux, and macOS.

Core Features​

  • Asynchronous coroutines: C++20 coroutines and traditional libcopp stackful coroutines share the framework API. Switch backends with PROJECT_SERVER_FRAME_USE_STD_COROUTINE without changing business code that uses that API. The C++20 backend needs a toolchain with standard coroutine support; C++14 uses the stackful backend.
  • Declarative development: protobuf declarations drive RPC APIs, handler registration, task action skeletons, database APIs, and Excel loaders. Routine extensions use existing declarations plus business logic.
  • Cross-platform infrastructure: atgateway handles client access and atproxy handles inter-server traffic; service discovery, router caches, Redis access, and OpenTelemetry are built in.
  • Reusable components and services: dtmq, distributed transactions, leaderboards, compliance text filtering, friends, matchmaking, teams, and their SDKs. Lobby modules cover chat, mail, and item inventories.
  • Orbit: a Dedicated Server (DS) management solution for Unreal Engine (UE), with controller / agent / server / client layers managing process lifecycles, heartbeats, and communication.
  • Deployment tools: atdtool and values configuration generate resources and scripts for Kubernetes, Docker, and bare-metal/local deployments.

Check each target's language standard and third-party toolchain requirements separately; newer dependency versions can cause a build to use a higher language standard. See prerequisites and switching coroutine backends.

Where to Start​

For a first run, follow prerequisites → build → run and deploy. In a working project, go straight to the development quick start and choose your task.

SectionContent
Development Quick StartMinimal workflows for RPCs, services, components, Excel, server config, protocols, and DB tables
ComponentsIntegration entry points for dtmq, transactions, rank, friends, matchmaking, teams, and Orbit
ServicesService responsibilities and local validation entry points
ArchitectureDesign and implementation details for changes to framework behavior
Technical WhitepapersProblems, recovery designs, and scenarios for WAL, transactions, metric-driven policies, and HPA

Repository Layout at a Glance​

atsf4g-co/
├── atframework/ # Framework libraries and atproxy / atgateway
├── src/
│ ├── server_frame/ # Shared config, protocols, dispatcher, router, RPC, data layer
│ ├── *svr/ # Lobby, authentication, cache, friend, matchmaking, team services
│ ├── component/ # dtmq, distributed_transaction, rank, orbit, compliance, shared algorithms
│ ├── templates/ # Code generation templates for framework maintainers
│ ├── tools/ # Code generators and offline RPC test tools
│ └── robot/ # Go stress-test and simulated client
├── install/ # Deployment templates and values
├── resource/ # Excel tables and resource conversion configuration
├── project/ # Build options and tools
└── third_party/ # Third-party dependencies