client - ryzom/ryzomcore GitHub Wiki


title: Ryzom Core Client Reference description: Programming reference for the Ryzom Core game client published: true date: 2023-03-18T00:56:19.402Z tags: editor: markdown dateCreated: 2022-03-13T03:04:33.835Z

This page is a map of the Ryzom client source code for developers working on the client. The client is a single-process application built on the NeL engine libraries. All source lives under ryzom/client/src/ (~300 files) with several subdirectories for major subsystems.

Startup and Main Loop

The client follows a linear startup → main loop → shutdown flow.

File Purpose
client.cpp Entry point, creates the application context
init.cpp Initializes all subsystems: driver, scene, sound, PACS, network, UI, sheets
init_main_loop.cpp Final initialization before entering the game loop
main_loop.cpp The per-frame update: input, network, entity updates, scene animate/render, UI, swap
release.cpp Shutdown and cleanup of all subsystems
global.h / global.cpp Global pointers to the driver, scene, sound, PACS, and other singletons

Configuration

File Purpose
client_cfg.h / client_cfg.cpp CClientConfig — loads and manages client.cfg settings via CConfigFile. All tunable client parameters (resolution, graphics quality, keybinds, paths, etc.) live here

Networking

The client connects to the Frontend Service (FES) via a custom UDP protocol with reliability and ordering, plus a QUIC alternative.

File Purpose
network_connection.h CNetworkConnection — the low-level UDP connection to the FES, handles impulse encoding/decoding, position sending, and database synchronization
quic_connection.h QUIC-based alternative transport (optional, uses MsQuic)
net_manager.h CNetManager — higher-level wrapper that dispatches incoming impulse messages to handlers
connection.h Login → shard selection → character selection → enter game flow
login.h Login screen logic and web authentication
far_tp.h Far teleport (cross-shard teleport) handling

Entity System

All visible objects in the world — player characters, NPCs, creatures, forage sources, FX — are entities managed by an entity manager.

File Purpose
entity_cl.h CEntityCL — base class for all client-side entities. Manages position, visual properties (VPA/VPB/VPC), animations, selection state
character_cl.h CCharacterCL — extends CEntityCL for humanoid characters (players and NPCs). Equipment rendering, face/hair, emotes
player_cl.h CPlayerCL — other players
player_r2_cl.h CPlayerR2CL — Ring scenario player entities
user_entity.h CUserEntity — the local player. Handles movement input, camera modes, selection, combat targeting
forage_source_cl.h CForageSourceCL — forage extraction sources
entity_animation_manager.h Loads and manages all animation sets for entity types

Client Database

The server pushes a hierarchical property database to the client via the mirror system. The client reads it for HP bars, inventory, skills, target info, and everything else the UI displays.

File Purpose
cdb_synchronised.h CCDBSynchronised — the client-side database, synchronized from server impulse messages
ingame_database_manager.h Updates entity visual state from database property changes

Data Sheets

The client loads Georges data sheets (creature stats, item definitions, visual properties, etc.) as packed sheets for fast startup.

File Purpose
sheet_manager.h CSheetManager — loads all packed sheets on startup, provides lookup by CSheetId
client_sheets/ Sheet loader structs for each sheet type: creatures, items, FX, skills, weather, etc.

User Interface

The UI is an XML-driven system with Lua scripting. Interface layouts are defined in XML files under data/gamedev/interfaces_v3/. Action handlers respond to UI events.

Directory / File Purpose
interface_v3/ ~200 files — the entire UI system
interface_v3/action_handler_*.cpp Action handlers: game actions, item manipulation, movement, combat phrases, outposts, help, debug
interface_v3/bot_chat_*.cpp Bot chat / NPC dialog pages
interface_v3/bar_manager.h HP/SAP/STA/Focus bar management
interface_v3/add_on_manager.h Loading additional UI XML from add-on packs

For UI scripting, the Lua environment exposes action handlers and database access. See also Debugging LUA Scripts.

Rendering and Scene

The client uses NeL's scene graph (UScene) for all 3D rendering. The main scene contains the landscape, instance groups, characters, FX, and weather.

File Purpose
continent.h CContinent — loads zones, instance groups, PACS data for one continent
continent_manager.h Manages continent loading/unloading and far-TP transitions
landscape_poly_drawer.h Custom polygon drawing on the landscape (selection circles, etc.)
sky.h / sky_render.h Sky dome rendering (cloud, sun, moon, stars)
water_env_map_rdr.h Water reflection environment map rendering
light_cycle_manager.h Day/night lighting cycle
weather.h Weather state and transitions
micro_life_manager.h Ambient micro-vegetation animation (butterflies, etc.)
timed_fx_manager.h Time-of-day and weather-dependent FX (fireflies, etc.)
ig_client.h Instance group loading with season and weather callbacks
camera.h Camera modes: third person, first person, debug

Collision (PACS)

File Purpose
pacs_client.h Client-side PACS collision setup — loads .rbank/.gr files, creates move containers and primitives for the local player
motion/ Movement and position prediction for entities

Sound

File Purpose
sound_manager.h CSoundManager — initializes UAudioMixer, manages background sound, music, and positioned sources

Ring (R2) Editor

Directory Purpose
r2/ The Ring scenario editor client code — Lua-driven UI for placing entities, writing scripts, managing acts and scenarios

Key NeL Libraries Used

The client links against these NeL libraries. Understanding them is essential for client development.

Library Usage in client
NeL Misc Config files, paths, logging, threads, serialization, timers
NeL 3D Driver, scene, shapes, skeletons, animations, particles, landscape, text
NeL GUI XML interface system, Lua scripting, texture atlases
NeL Net UDP connection, message serialization (lower layers only — the client doesn't use IService)
NeL PACS Collision and movement
NeL Sound Audio mixer, 3D sound, music
NeL Georges Sheet loading

Building and Debugging

See also