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())

  1. Loads the default world: worldRuntime_.LoadFromVwrFile("worlds3d/world001.vwr") — a genuinely 3D, hand-authored voxel world (2729 non-air blocks, Y range [0, 13]).
  2. Builds a GETerrainRenderer from the loaded world and a GETileAtlas.
  3. Loads Content/icons/object-m.png as a CNA Texture2D and creates a BasicEffect (textured, no vertex color).
  4. Places GEBlupiController at spawn position (0, 1, 0).

Per-Frame Update

  1. worldRuntime_.Update(dt) — advances the 6 fps tile animation phase.
  2. Reads arrow keys + Space via Keyboard::GetState().
  3. Steps GEBlupiController::Step(world, dx, dz, jump, dt) — grid collision, step-up traversal, gravity.
  4. Updates an Easy3D::Camera3D to 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