Nuclide
Software Development Kit for id Tech
Singleplayer Systems

Here you will find integral singleplayer subsystems documented.

Nodegraph System

The Nodegraph is the navigation mesh used by the majority of the singleplayer AI.

Unlike waypoints for bots, the node graph is generated automatically by the game-logic out of entities, such as info_node and info_node_air.

The resulting node graph is then stored under gamedir/data/MAPNAME.way.

It is stored in the format required by the engine to perform routing calculations for us.

Save/Load System

Nuclide APIs

Every NSEntity class usually comes with a NSEntity::Save() and NSEntity::Restore() override. These are also used for level transitions.

When a save-game has been restored, the overridable method NSEntity::RestoreComplete() will be called. At that point AI or some time based triggers get the chance to re-align themselves with the reloaded environment (if necessary).

LVC Files

The engine stores cached copies for the current (non-saved) game into the <gamedir>/saves directory, in the form of lvc files. Each lvc file represents a map, containing a copy of its entity lump.

When a specific save is made, it will have its own directory under <gamedir>/saves/, with its own copy of lvc files.

FSV Files

Contain misc meta-data accompanying the save file, such as rate, chapter title, player slot parameters, server info keys, as well as specifically engine tracked console variables.

Preview Image

The preview image for save games is stored under <gamedir>/saves/<savename>/screeny.tga.

Level Transition System

Moving between different levels is ensured in part by the engine, and in part by Nuclide and sub-systems such as the Save/Restore System.

Level designers create level changes by utilising the trigger_changelevel entity. For transitions to work, they usually need to incorporate an info_landmark, to designated a shared point between two levels.

In addition, it is recommended that they place a trigger_transition with the same name as the info_landmark. Otherwise you risk carrying over too much entity data. Please read the entity documentation for more details.

When a level transition is completed, Nuclide will call the overridable method NSEntity::TransitionComplete() on every entity, to give it a chance to re-align itself with the new environment.