Files
Cesarus85--mjolnir-vr/tools/harness
MrBruh f97b33391b Voice chat
Opus voice chat (port/third_party/opus 1.5.2, port/linux/src/voice_audio.c, port/linux/game/network_voice.c), relayed by the host, in the lobby too. The host decides in Server Setup > Teamplay Options: lobby voice (on by default), the game's mode (off, team near, anyone near, team, team and enemies near: the default), the near distance, and the quality, 8 to 64 kbps (24). Each player picks push to talk (V), open mic or off, the voices' volume, and the output and input devices in Settings > Audio, and mutes others from the scoreboard's menu. A speaker icon marks who talks in the lobby, on the scoreboard and in a list in game. The host takes a machine's frames only with the key it gave it over its stream, within the quality's size, 50 a second and 8 talkers at once, and sends voices only to machines that asked for them, so the network version stays.
2026-10-09 14:20:57 +13:00
..
2026-10-09 14:20:57 +13:00

Asset-free regression tests

The engine's real functions, taken from the sources and compiled against a small fake world: no game assets, SDK or graphics, so a fix can carry a test that CI runs.

python -m pytest -q tools/harness

They need clang (or CC) and a 32-bit C runtime (lib32-glibc, gcc-multilib), as the Linux build does. pytest finds every tests/test_*.py, so a new test needs no change to CI.

A test

  • tests/<name>.c: the fake world, only what the code reads, with what it calls stubbed as macros that name only the arguments they use; then #include "under_test.inc" and a main that runs the case named on its command line, checked with CHECK.
  • tests/test_<name>.py: takes the code, enums and constants from the sources (function, inline, enum_with, constant) rather than copying them, so the test checks what the game builds; build compiles it (warnings are errors) and each case is a pytest test.
  • Negative controls: the code with a deliberate fault (mutated) must fail a named case's CHECK. A test that cannot fail proves nothing.

Limits

Functions are taken by matching braces; one that is not found fails the test. Code with many dependencies is better compiled as whole files against stub headers. Whatever needs real maps or the whole game is checked in the game (offline: debug.null_renderer).