Module Index
Major code modules in GalaxyEggbertCNA and the shared Worlds data model.
Application
GalaxyEggbertCnaGame — CNA Game subclass, LoadContent/Update/Draw
World Runtime
GEWorldRuntime — loads .vwr/.txt, drives tile animation
Terrain Renderer
GETerrainRenderer — builds static + animated cube meshes
Tile Atlas
GETileAtlas — block type → UV rect mapping
Player Controller
GEBlupiController — invisible collision-only movement
World Data
Voxel world: 100³ blocks, chunk-based storage
Chunk
Palette-compressed 10³ voxel container
CnaEngine::Graphics::MeshBuilder
CPU-side builder for boxes, plates and billboards (replaced Easy3D::CubeMesh)
CnaEngine::Graphics::GpuMesh
Uploads and draws built meshes via CNA (replaced Easy3D::CubeMeshRenderer)
Rendering
Cube-per-block terrain, animated tiles, billboards
Input
Arrow keys + Space, polled via CNA Keyboard
World File (.vwr)
Binary voxel format: header, chunk table, palette
Level Loading
.vwr (default) and mobile-eggbert .txt (secondary) loading
Module Responsibilities
| Module | Files | Notes |
|---|---|---|
| Application lifecycle | main.cpp, GalaxyEggbertCnaGame.hpp/.cpp | Entry point; owns all CNA-side subsystems |
| World loading & animation | Game/GEWorldRuntime.hpp/.cpp | .vwr default, .txt secondary; 6 fps anim phase |
| Terrain rendering | Game/GETerrainRenderer.hpp/.cpp | One cube per non-air block, static + animated split |
| Texture mapping | Game/GETileAtlas.hpp/.cpp | Block type → CnaEngine::Graphics::UvRect via BlockTypes::tileUV() |
| Player movement | Game/GEBlupiController.hpp/.cpp | Engine-agnostic; collision-only, no rendering |
| Voxel data model | include/GalaxyEggbert/Worlds/*.hpp, src/GalaxyEggbert/Worlds/*.cpp | Engine-agnostic; shared with Simple3D; unit tested |
| Game definitions | include/GalaxyEggbert/def/ | All enums: GamePhase, ObjectType, SoundChannel, etc. |
| Mesh building & drawing (cna-engine) | ../cna-engine (CnaEngine::Graphics): MeshBuilder, GpuMesh, Camera, UvRect; game helpers in src/GalaxyEggbert/Game/TexturedMesh.hpp | Generic helpers beside CNA, no Eggbert-specific knowledge; replaced easy-3d on 2026-10-20 |