Skip to content

Check the rendering of a few games against expected screenshots - #1114

Open
4ian wants to merge 1 commit into
mainfrom
claude/quirky-hopper-0qzexl
Open

4ian wants to merge 1 commit into
mainfrom
claude/quirky-hopper-0qzexl

Conversation

@4ian

@4ian 4ian commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

An early warning when the rendering of GDevelop changes.

  • Four games get a rendering test, a gameplay test named Rendering: ... taking PNG screenshots:
    • 3D island: ambient occlusion, depth of field, bloom, tone mapping, terrain, water;
    • 3D light playground: sun, point lights, spot lights, mixed lights;
    • expanded 3D house horror: models, fog, flashlight, text;
    • platformer: 2D.
  • scripts/check-rendering-screenshots.js runs only these tests with the latest GDevelop build. It compares each screenshot with rendering-screenshots/<example>/<label>.png; --update rewrites the expected images.
  • New rendering-screenshots CircleCI job: on main, every night, and on branches changing these games, their images or the scripts. The diff images (differences in magenta) are kept as artifacts.
  • The code running the tests of a game moves to scripts/lib/GameplayTestsRunner.js, shared by both scripts. It can now run only some tests, with --cmd-args filters.

Verified locally with the master build (5.6.286). Two runs both passed, and the only variation was 12 channel values in one image, within the tolerance. A modified expected image fails the check with a diff image and a JUnit failure. Types, Jest tests and formatting pass.

This is the first run of the job on CircleCI. If CircleCI's machines draw slightly different pixels than the one used to make the images, rerun with --update there.

GDevelop's own engine gets similar checks on scenes built in code, run on every PR: 4ian/GDevelop#9339.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GFZna1tBkWVDbpAbTNnXpr

A few games get a rendering test (a gameplay test named "Rendering: ..."
taking PNG screenshots): the 3D island (ambient occlusion, depth of field,
bloom, tone mapping, terrain, water), the 3D light playground (sun, point
and spot lights, shadows), the expanded 3D house horror (models, fog,
flashlight, text) and the platformer (2D).

scripts/check-rendering-screenshots.js runs only these tests with the latest
build of GDevelop and compares the screenshots with the images of
rendering-screenshots/ (or writes them with --update). The new
rendering-screenshots CI job runs it on main, every night and on the branches
changing these games, their images or the scripts: an image that differs
while the game did not change is an early warning that the rendering of
GDevelop changed.

The code running the tests of a game moves to scripts/lib/GameplayTestsRunner.js,
to be shared by both scripts, and can now run only some of the tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GFZna1tBkWVDbpAbTNnXpr
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