adventuregamestudio / ags-test-games

Games for automatic tests
MIT License
1 stars 3 forks source link

Add tests for object texture updates after a dynamic sprite changes #5

Closed ivan-mogilko closed 7 months ago

ivan-mogilko commented 7 months ago

Add tests to check if engine properly updates object's texture after dynamic sprite was changed or recreated. There's an annoying bug that continuously resurfaces since we started optimizing textures.

The test makes screenshots and compares certain rectangle with an expected image of an object. There's a caveat that test result will depend on a graphics driver.

ericoporto commented 7 months ago

Pretty cool, it's failing here on Direct3D and passing on the Software driver!

I can add an additional run here for the OpenGL driver too.

In the main repository we run the Software driver in Linux, OpenGL in macOS and Direct3D in Windows.

Btw, failures here are allowed, it's just the AGS pipeline that will show red on failure - and only the GitHub Actions there, it won't block a release. The idea is exactly this case of having an issue here writing a test that shows and fixing there later.

The AGS version ran here is whatever is set in the project in the Game.agf file. It will look for it in the GitHub Releases and install here to build the project and run it.

ericoporto commented 7 months ago

Replicated your test to the ags4 project and created a new release including it, it should run in the main repository on any next run, because there it just grabs the latest release - for now, later in the future I may switch that repository for tagged runs, at least in release branches.