Modules

The source tree grouped by what each part is responsible for (as of 2026-11-10).

The code has about 66 000 lines: 178 source files under src/ and 31 headers under include/. It is layered: an engine-independent world model at the bottom, the game and the editor above it, and a thin CNA application host on top (Architecture). The groups below are a reading aid, not separate libraries. Most of them live in the same directory, src/GalaxyEggbert/Game/ (namespace GalaxyEggbert::Game).

ModuleWhereDepends on CNA?
World data modelinclude/GalaxyEggbert/, src/GalaxyEggbert/Worlds/, src/GalaxyEggbert/*.cppNo (enforced)
Game simulationsrc/GalaxyEggbert/Game/Mostly no
Renderingsrc/GalaxyEggbert/Game/Yes (pure helpers excepted)
3D effectssrc/GalaxyEggbert/Game/Yes (the *Logic.hpp parts no)
UI, input and audiosrc/GalaxyEggbert/Game/Yes
Persistence and replaysrc/GalaxyEggbert/Game/Mostly no
Editorsrc/GalaxyEggbert/Editor/Partly
Application hostsrc/GalaxyEggbertCNA/Yes
Tools and teststools/, tests/Some Verify* tools link the game

World data model

The voxel world and the original's data, with no CNA or cna-engine include, so it can be unit-tested without a window. Namespaces GalaxyEggbert::Worlds and GalaxyEggbert.

PartFilesWhat it holds
Voxel containerWorlds/World, Chunk, Block, BlockMetadata, VoxelConfig, BitPacking, BinaryIO, GridRaycast.hpp A 100×100×100 grid in 10×10×10 chunks with palettes, bit packing, sparse metadata and a change journal; .vwr load and save. See World.
The original's enumsDef/*.hpp (ObjectType, BlupiAction, SoundChannel, SpriteChannel, GamePhase, GameSpeed, …) Numbers that are stored in world files and must never change.
Block factsBlockTypes.hpp, BlockDefinitionRegistry, UnverifiedRenderMapping.hpp One definition per block icon 0-440: render mode, collision, animation, role flags. See BlockDefinitionRegistry.
RecordsMoveObjectRecord, BigDecorRecord, HintZoneRecord, PlayerStart.hpp Codecs for the sparse metadata stored in a world. See MoveObjectRecord.
HubsHubDoorsMission doors, gold doors, world signs and arrivals. See HubDoors.
ConstantsGameConstants.hppGrid size, the original's 640×480 logical screen, sprite cell size.

Game simulation

The rules of play. These parts run on the fixed 1/60 s tick, are deterministic, and mostly see only the World and plain numbers, which is what lets the Verify* tools drive them headless.

PartFiles
Blupi's movement and collisionBlupiController, SolidBox.hpp, CratePush.hpp, BarRows.hpp
Objects, enemies, hazards, pickupsInteractionSystem, EnemyBlupi.hpp, TankShot.hpp, ReusablePickup.hpp, FanGeometry.hpp, LavaHeight.hpp, LavaSurfaceData.hpp, DecorQuartTable.hpp
World state at run timeWorldRuntime, LegacySawFloors.hpp, PlateRotationMetadata, ObjectVerticalPlacement.hpp
Object facts and picturesObjectDefinitionRegistry, ObjectIcons (GetObjIcon)
HintsTrainingHints (the original's training hints), ObjectiveHint.hpp (the compass aid)
CameraChaseCameraYaw, CameraShake

Rendering

The host reads the simulation into a SceneFrame draw list, and WorldRenderer draws it. Details: Rendering.

PartFiles
Frame and draw listSceneFrame.hpp, WorldRenderer
TerrainTerrainRenderer, TileAtlas, TileCoverage.hpp, TerrainLighting.hpp, TerrainModelCells.hpp, TerrainAnimDivisor, TerrainOcclusion.hpp (face culling), BrickEdges.hpp, MeshParts.hpp, SwatchUv
Block render modesDirectionalCubeTiles, InnerPillarBoxTiles, ThinBarTiles, InnerFlatPlateTiles, BlockModels.hpp, LiftVisual.hpp
Terrain reliefTerrainRelief (the Ray Dream relief of each tile near the camera)
ModelsObjectModelTable, ModelSubdivision.hpp, ProceduralMaterial.hpp, CharredBlupi.hpp, BoltMesh.hpp, BoltPaths.hpp, GlueStrands.hpp
SurfacesWaterSurface.hpp, WaterWaves.hpp, LavaSurface.hpp
Textures and spritesTextureScale (1x/2x sheets), TexturedMesh.hpp, QuadBatch

3D effects

The Setup's effect levels Off, Low, Medium, High and Ultra. They change presentation only, and the simulation is identical at every level (3D Effects & Graphics).

PartFiles
Fog, soft shadows, particlesWorldEffects.cpp, EffectParticles, SceneEffectsLogic.hpp
Shaders and shadow mapsSceneShaders, SurfaceShaders (water, lava)
Post-processingPostProcess (the glow and the finish)
UltraUltraFinish (HDR, tonemapping, TAA, depth of field, motion blur), UltraLogic.hpp, UltraAssets.hpp, TerrainGi.hpp (voxel GI), TerrainMaps.hpp

UI, input and audio

PartFiles
HUDHud, TextMetrics.hpp, DebugOverlay.hpp
Menus, on-screen pad, typed cheatsInputPad, CheatConfig.hpp
DevicesControlInput.hpp, GamepadInput.hpp
SoundSound

Persistence and replay

PartFiles
Settings and progressSaveData, UserFolder
Resuming an interrupted missionResumeLog
Demos and recordingsDemoReplay, FreeFileName.hpp
Scripted playthroughs (QA)Autoplay

See Save Data & Resume.

Editor

The in-game 3D world editor, namespace GalaxyEggbert::Editor (3D World Editor).

PartFiles
Editing sessionWorldEditor (WorldEditor.cpp, WorldEditorUpdate.cpp), EditCommandStack, Clipboard, BoxRegion, VoxelRaycast, AutoTile.hpp, EditorVariants.hpp, ObjectPlacement.hpp, PlayerStartColor.hpp, EditorCommandKeys.hpp
PaletteEditorPalette, EditorPaletteInput, EditorPaletteLayout, EditorPaletteRenderer, PaletteCategories
Drawing aidsEditorHighlightRenderer, ObjectPathRenderer, ObjectPathMarkers.hpp
Touch and gamepadEditorDeviceControls
Screens and storageEditorBrowserScreen (world slots), GalaxyBrowserScreen (the player's galaxy), CustomWorldStorage, PlatformFiles

Application host

src/GalaxyEggbertCNA/ holds the XNA Game subclass GalaxyEggbertGame and everything platform-specific. It is split by concern:

FileConcern
main.cppCommand-line flags, the user folder, Run()
GalaxyEggbertGame.cppConstruction, input capture, music and vehicle sounds, voyages, cheats, full screen, focus loss and exit
GalaxyEggbertGameLoad.cppLoadContent() and building a world's presentation (terrain, models, reliefs)
GalaxyEggbertGameUpdate.cppUpdate() and the simulation tick UpdateTick()
GalaxyEggbertGameMissions.cppAutoplay steps, loading worlds (campaign, editor, galaxy, title scene), hub doors and phases
GalaxyEggbertGameScene.cppReading the simulation into the SceneFrame
GalaxyEggbertGameDraw.cppThe frame: world, HUD, menus, editor, captures
GalaxyEggbertGameDemo.cppThe resume log, the main-menu demos and the player's recordings
GameHelpers.hpp, GameInternal.hppHelpers shared by the files above
AndroidAssets.cppCopying the assets to internal storage on Android

Tools and tests

See Testing & QA and Assets & Tools.