Skip to content

Run the tests ​

The tests exercise the real engine code headlessly against the original data, so they need the game data in ./cd (they cannot run in CI, which only compiles them). OPENRF_DATA=<folder or image> points them (and render_test) elsewhere, e.g. at the .cue, to check the disc-image reader: the output must be identical. They build natively (macOS or Linux, no libraries needed):

sh
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j
for t in sim_test combat_test sfx_test ai_test rules_test twoplayer_test; do ./build/$t > /dev/null && echo "$t ok"; done
python3 tools/render_cmp.py        # renderer vs. the Python reference: expect 0 mismatches
TestCovers
sim_testBunker lift, driving all vehicles, collision, water, docking
combat_testWeapons, projectiles, explosions, debris, damage states
sfx_testSound mixer: priorities, budget, attenuation, looping, pitch (writes out/sfx/test.wav)
ai_testGun turrets, drone, submarine
rules_testFlag, winning and losing, soldiers, gates, mines, high scores
twoplayer_testTwo-player split screen: both sides launching, one winning
render_test / render_cmp.pyPerspective renderer, pixel-identical to tools/view.py in 7 scenes

OpenRF is released under the GPL-3.0. Return Fire is © 1995–1996 Silent Software / Prolific. OpenRF contains no original code or assets. The cross-platform and browser builds run on gasm.