Skip to content

make test-modern, test-compare and test-renderers - #37

Merged
nolffan merged 2 commits into
nolffan:masterfrom
publicarray:test-modern
Oct 18, 2026
Merged

nolffan merged 2 commits into
nolffan:masterfrom
publicarray:test-modern

Conversation

@publicarray

@publicarray publicarray commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Playtests for the modern build, and side-by-side screenshots to check a change against a reference.

make test-modern runs make test's scripted playtest (tools/playtest-basic.txt, TEST_LEVELS) on out/nolf-modern-release/.

make test-compare runs make test and make test-modern one after the other (their containers share a name), then puts each level's shots side by side, legacy left and modern right, in out/play/compare-test-<level>-test-modern-<level>.jpg: 640x480 a shot, 8-bit JPEG, about 2 MB, small enough to attach to a pull request. TEST_RES sets the screen mode, e.g. TEST_RES=1920x1080.

test-compare-T01S01

The first scene, T01S02-bottle, is T01S02's opening cinematic at Cate Archer's residence, as the camera passes the wine bottle and glass on the bathroom shelf, where d3d9.ren and opengl.ren drew models' back faces.

Culling issue:
test-renderers-unfixed-d3d7-d3d9

Fixed: in a separate PR
test-renderers-T01S02

playtest.sh gains a cinestart command: it waits until a cinematic's letterbox is on screen, and the cinematic's shots are timed from there, since a level loads in its own time. playtest.sh compare takes the shot size and format (PLAYTEST_COMPARE_SIZE, PLAYTEST_COMPARE_EXT) and writes 8-bit images (the 19-shot sheet was a 36 MB 16-bit PNG at 640x480).

🤖 Generated with Claude Code

publicarray and others added 2 commits October 18, 2026 13:22
make test-modern runs the scripted playtest of make test on
out/nolf-modern-release/. make test-compare runs both, one after the
other, and puts each level's shots side by side, legacy left and modern
right, in out/play/compare-test-<level>-test-modern-<level>.jpg: 640x480
a shot, 8-bit JPEG, about 2 MB, small enough to attach to a pull request.
TEST_RES sets the playtests' screen mode (e.g. 1920x1080).

playtest.sh compare takes the shot size (PLAYTEST_COMPARE_SIZE) and the
format (PLAYTEST_COMPARE_EXT), and writes 8-bit images: the contact sheet
of a 19-shot run was a 16-bit 36 MB PNG at 640x480.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
make test-renderers plays each scene of TEST_SCENES (<level>:<script>,
build/scenes/) in out/nolf-modern-release/ with each of TEST_RENDERERS
(d3d7.ren d3d9.ren opengl.ren) and puts the first renderer's shots beside
each other's, in out/play/compare-<scene>-d3d7-<scene>-<renderer>.jpg.
The same build plays a cinematic at the same speed whatever draws it, so
the shots line up. A renderer the game does not load (it falls back
to d3d9.ren and saves that in autoexec.cfg) fails the run. The legacy build, like the retail
game, plays a cinematic faster the higher its frame rate (this one's
bathroom part: about 18 s under Xvfb, 7 s on Windows with a fast GPU,
where the modern build takes about 45 s), which rules it out as the
reference here.

The first scene, T01S02-bottle, is T01S02's opening cinematic at Cate
Archer's residence, past the wine bottle and glass where d3d9.ren and
opengl.ren drew the models' back faces and the chrome passes
translucent.

playtest.sh takes a cinestart command: until a cinematic's letterbox is
on screen, the clock for timing a cinematic's shots, since a level loads
in its own time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@publicarray
publicarray marked this pull request as ready for review October 18, 2026 09:04
@nolffan
nolffan self-requested a review October 18, 2026 11:02

@nolffan nolffan left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I've wanted something like this for a while.

At some point we ought to:

  • build a "demo arena" that uses all features of the game engine
  • write integration/play tests that use it
  • commit known good renders from each renderer and use them for CI tests

@nolffan
nolffan merged commit 900c11e into nolffan:master Oct 18, 2026
6 checks passed
@publicarray
publicarray deleted the test-modern branch October 18, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants