Tutorial: Building GalaxyEggbertCNA

From a fresh clone to a running window on Linux.

Step 1 — Clone the Repository and Its Siblings

cd ~/development
git clone https://github.com/openeggbert/galaxy-eggbert.git
git clone <url> cna
git clone <url> cna-engine
git clone <url> mobile-eggbert
cd galaxy-eggbert

By default, CMake expects cna, cna-engine, and mobile-eggbert as siblings of galaxy-eggbert. Use -DCNA_HOME=, -DCNA_ENGINE_HOME=, -DMOBILE_EGGBERT_HOME= if yours are elsewhere. (Until 2026-10-20 the second sibling was easy-3d, overridden with -DEASY3D_HOME=; cna-engine replaced it.)

Step 2 — Configure

cmake -S . -B build-cna \
  -DGALAXY_EGGBERT_BUILD_CNA=ON \
  -DGALAXY_EGGBERT_BUILD_SIMPLE3D=OFF \
  -DCMAKE_BUILD_TYPE=Debug
CNA is added first and built statically CMakeLists.txt adds CNA before cna-engine; cna-engine links CNA's static module libraries instead of building its own copy, so CNA is built with CNA_SHARED_LIBRARY=OFF (forced by the game's CMake).

Step 3 — Build

cmake --build build-cna --target GalaxyEggbertCNA -j2

This also builds and runs the post-build asset-copy step (mobile-eggbert's Content/ + worlds/, plus this repo's own worlds3d/).

Step 4 — Run

cd build-cna
./GalaxyEggbertCNA
Run from the build directory The loader uses relative paths (worlds3d/world001.vwr, Content/icons/object-m.png) — you must run the binary from where the asset copy placed those files.

Expected: a window titled "Galaxy Eggbert (CNA)" showing a sky-blue-cleared 3D view of textured terrain (a ground floor, staircase, platform, walled room, and pillars). Arrow keys + Space move an invisible collision point around; there is nothing visible to represent it.

Step 5 — Run the Worlds Data Model Tests

cmake -S . -B build-cna -DBUILD_TESTING=ON
cmake --build build-cna --target GalaxyEggbertWorldsTests
ctest --test-dir build-cna --output-on-failure

Troubleshooting

ProblemFix
CMake can't find CNA/cna-engine/mobile-eggbertPass -DCNA_HOME=, -DCNA_ENGINE_HOME=, -DMOBILE_EGGBERT_HOME= explicitly
Duplicate-symbol link errorsReconfigure from a clean build directory. (The old cause — configuring easy-3d before CNA — is gone: CMakeLists.txt now adds CNA first and builds it statically for cna-engine.)
Binary can't find worlds3d/world001.vwrRun from inside build-cna/, not the repo root
No visible terrainCheck Content/icons/object-m.png was copied next to the binary