Running the Game
What happens when you launch GalaxyEggbertCNA.
Launch
./build-cna/GalaxyEggbertCNA
src/GalaxyEggbertCNA/main.cpp constructs a
GalaxyEggbert::CNA::GalaxyEggbertCnaGame (a subclass of
Microsoft::Xna::Framework::Game), calls Run(), then deletes it.
Window title: "Galaxy Eggbert (CNA)".
Relative-path assumption
The loader uses relative paths (
"worlds3d/world001.vwr",
"Content/icons/object-m.png") — the binary must be run from its own build
directory, where the post-build asset copy placed these files. This is a known, flagged
limitation (see Known Issues).
What Happens on Startup (LoadContent())
- Loads the default world:
worldRuntime_.LoadFromVwrFile("worlds3d/world001.vwr")— a genuinely 3D, hand-authored voxel world (2729 non-air blocks, Y range [0, 13]). - Builds a
GETerrainRendererfrom the loaded world and aGETileAtlas. - Loads
Content/icons/object-m.pngas a CNATexture2Dand creates aBasicEffect(textured, no vertex color). - Places
GEBlupiControllerat spawn position(0, 1, 0).
Per-Frame Update
worldRuntime_.Update(dt)— advances the 6 fps tile animation phase.- Reads arrow keys + Space via
Keyboard::GetState(). - Steps
GEBlupiController::Step(world, dx, dz, jump, dt)— grid collision, step-up traversal, gravity. - Updates an
Easy3D::Camera3Dto follow Blupi.
Draw
Clears the device to sky blue (0.392, 0.584, 0.929, 1.0), enables depth test,
sets the terrain effect's View/Projection from the camera, and draws the terrain via
GETerrainRenderer::Draw(). A one-shot self-check samples backbuffer pixels via
GetBackBufferData() to confirm terrain is actually visible (not a placeholder color).
Controls
See Controls for the full key list — currently just arrow keys + Space.
What You Will (and Won't) See
- You will see: real, textured, animated 3D terrain — a ground floor, a 10-step staircase, a raised platform, a walled room with a doorway, two pillars.
- You will not see: Blupi (the controller is invisible/collision-only), any objects or pickups, a HUD, or hear any sound.