QtCraft API
QtCraft is a voxel sandbox game built with Qt 6 (C++23, Qt Quick, QRhi). Client and server are separate programs even in single player: the game runs its server in the same process (QcLocalServerHost) and talks to it only through protocol messages, as it talks to a server over the network.
This reference is generated by QDoc from the comments in the headers and QML files. How the game is played is in the handbook.
Libraries
Each library may use only the libraries listed before it (with the exceptions named on its page); the client libraries never see a server type.
| Library | Content |
|---|---|
| qc_common | Shared by client and server: coordinates, chunks, the content registry, physics, the protocol, the handbook. |
| qc_network | TCP and TLS transport of the protocol frames. |
| qc_worldgen | World generation: generators, terrain, structures, villages, the showcase world. |
| qc_server | The authoritative server: tick, world, chunks, mobs, plants, commands, saving. |
| qc_worlds | Running worlds for the game and the headless server: the local server, the world library, mods. |
| qc_clientcore | The client without GUI: session, prediction, meshing, light, camera, textures, sound synthesis. |
| qc_audio | Sound output of the graphical client. |
| qc_app_core | The Qt Quick client: controllers for QML, rendering, input. |
| qtcraft_headless | The headless server, bots and the control interface. |
| QtCraft QML Types | The QML module QtCraft: screens, HUD and controls. |