Pages: 1
  Print  
Author Topic: Graphical Fidelity Testing and Engine Cleanup  (Read 14324 times)
Offline (Male) Goombert
Posted on: June 29, 2018, 07:23:13 am

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile

Note: The two images are intentional false positives I did for the purposes of demonstrating the bot and to verify its behavior.

Hey guys! I've been busy for a few days working on a side improvement to the engine code base that I want to share with you all. It is closely related to the SDL changes fundies recently announced as well as us adding support for Direct3D11 and modern OpenGL ES. We have basically extended our continuous integration to perform an image analysis on graphics tests to improve graphical fidelity both between the graphics systems as well as between ENIGMA and GameMaker. This is still a work in progress but I just this morning got it fully working to where we can successfully screencap the game in the Travis CI virtual machine (minor bug in our test harness taking the screenshot directly after game start and before any draw events were processed).

You can see what we're up to on the pr here:
https://github.com/enigma-dev/enigma-dev/pull/1291

We expect to have it merged soon and will then be adding drawing tests from here on out.

I've also cleaned up the tile drawing code and optimized them on top of the vertex buffer functions I added for GMS compatibility. They are slightly different though because I use an index buffer to render them more optimally as an indexed triangle list. Regardless, from my benchmarks we can see that the tiles are not only more consistent now but also build and render much faster. When me and fundies get these image comparison tests merged into master, I will add a tile drawing test to prevent future regression of the functions and finally merge in the new tile code.
https://github.com/enigma-dev/enigma-dev/pull/1238

I will be following up those changes by rewriting the model classes as well:
https://github.com/enigma-dev/enigma-dev/pull/1289

The whole point of this changeset is to have less duplicate code by using proper abstractions of vertex and index buffer concepts, while essentially providing both to the user. This not only improves what ENIGMA already provided, but will bring new features and functions that users have desired. With all of that in place it will be super easy to finally have OpenGL ES working again as well as Direct3D11 because building a graphics system then simply consists of making each graphics system have working vertex functions.

I hope everyone likes these changes and will find that it's going to significantly improve the project. Open to comments/feedback/suggestions as always.
« Last Edit: June 29, 2018, 01:31:07 pm by Goombert » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) Goombert
Reply #1 Posted on: August 06, 2018, 01:48:55 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
I wanted to update this post a bit with some newer info on the drawing tests. We have finally merged them but we made some significant changes to the architecture. We no longer compare the results against golden images because we want to keep binaries out of the repository so cloning is quicker. What we do now is simply output the images from each draw test to a temporary directory and then essentially compare all the files in each directory.

We report when new tests are added or removed.



That is from a test I recently added when fixing a tile-related regression that occurred in HitCoder's Sonic game. The issue was that the tiles vertex buffer and index buffer was not cleared during room transition.
https://github.com/enigma-dev/enigma-dev/pull/1349



Adding tests in this way ensures that once issues get fixed, they don't come back again in the future. I hope that this shows to everyone this will lead ENIGMA to being more stable than it has ever been before! The future of the project is looking really bright.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) hpg678
Reply #2 Posted on: August 06, 2018, 02:01:16 pm

Member
Location: Barbados
Joined: Mar 2017
Posts: 283

View Profile Email
Thanks great! All good!


 (Y) (Y) :woop: :woop:
Logged
[compromised account]
Offline (Male) Goombert
Reply #3 Posted on: August 07, 2018, 10:41:59 am

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
Update again: We've now added a test for 3D shapes (though they aren't completely correct in GL1 right now, we'll at least know when they change).
https://github.com/enigma-dev/enigma-dev/pull/1350

Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Pages: 1
  Print