sots-engine/CONTRIBUTING.md

1.3 KiB

Contributing — clean-room rules

This tree must stay publishable as engine code only. Never commit:

  • game data in any form: .gob contents, extracted catalogs, saves, textures, strings dumps;
  • the original binaries, or anything derived from them by a decompiler/disassembler (no decompiler output, no disassembly excerpts, no pasted pseudo-code — not even in comments);
  • copied fixture files from the game. Test fixtures are hand-written minimal samples.

Facts about the binary (addresses, calling conventions, prototypes, struct layouts) enter this repo only through include/generated/sots_addresses.h, which is generated from the RE repo with a provenance header. Everything else is written from understanding, in our own words and code.

Real-data tests read $SOTS_DATA_DIR (the owner's installed copy) and must skip cleanly when unset. Run tools/clean_room_check.sh before committing.

Build toolchain gotcha

The engine needs CMake >= 3.25. Debian/Ubuntu hosts ship 3.22, which fails with an unhelpful preset error. Either build on CT111 (which has 3.31), or locally:

uv run --with cmake --with ninja cmake --preset host -DPython3_EXECUTABLE=/usr/bin/python3

Pass -DPython3_EXECUTABLE=/usr/bin/python3 explicitly — without it the fixture step captures uv's ephemeral interpreter, which disappears after the run.