Openage Development News: September 2022

What's new

Part 1 - SLD format documentation/parsing

In August the Definitive Edition of AoE2 received an update that changed its default graphics files from the previously used SMX format to the new SLD format. Since the AoE2 devs did not publish any information about the format, we had to reverse engineer it ourselves (together with Tevious from SLX Studio, spriteblood from Overreign and simonsan from the LibreMatch project). You can find the reversed specification in the openage repository (Link).

There are still some unknowns in the format that we don't fully understand, but the specification allows decodung of the most relevant parts: the main graphics, shadows and the player color mask. We still have to figure out how unit outlines and building damage masks are decoded exactly, so you can expect some updates to the linked spec in the future. The openage converter can already read the files and convert them to PNG with help of the singlefile converter

For openage, the change to SLD doesn't change much because we don't use the files directly and instead always convert them to PNG. However, one important thing to note is that the SLD graphics compression is lossy, so the quality of sprites is slightly worse in comparison to the lossless SMX compression. The difference is barely noticable ingame, but if you like zooming in really far, you should probably make a backup of any SMX files in the installation folder.

Blacksmith SLD main graphic Blacksmith SLD shadow graphic Blacksmith SLD damage mask Blacksmith SLD playercolor mask

(SLD layers: main graphics, shadows, damages mask, playcolor in that order)

You can see the difference between SLD and SMX if you zoom in 1500%:

Blacksmith SLD/SMX comparison

(Left: SLD; Right: SMX)

The SLD is more blocky because it uses a texture compression algorithm operating on 4x4 pixel blocks. Finer details are lost and there's less variety between colours.

Part 2 - GUI and Qt6

Back at the openage engine, there's also been progress, mainly focussed on the GUI framework. The old GUI is "functional" but it does not work great and needs a serious overhaul before we can start slapping new features onto it. Previously, we used a mixture of SDL2 and Qt5 for the GUI, which also required some hacky lines of code to get that working on different platforms. There's also old engine code entangled into some of the classes which makes maintance very unpleasent.

The most important change so far in the new GUI is that we ported Qt5 code to Qt6. Qt6 can handle multiple graphics backends (OpenGL or Vulkan) much better than Qt5 and also made some improvements in terms of cross-platform support. Hopefully, this means we can get rid of a lot of weird and hacky stuff. In the long run, we will probably also get rid of SDL2 (since Qt has mostly the same features) and maybe the codebase will actually be readable :D

Right now there's not much to see, unless you like empty window frames.

Qt6 window

Next month, there should be something more interesting that we can show you.

What's next?

There is still a lot to do for the new GUI, so that will also be the focus for next month. After the GUI has been cleaned up, we have to stitch the individual components for graphics output back together (unit rendering, camera movement, terrain drawing, etc.). Once visual output works again, we can start testing the core engine.

There is a chance that we'll also get to work on the gamestate in the engine, although that would probably involve more render tests than actual gameplay. Getting something visible on the screen is more important right now.

Questions?

Any more questions? Let us know and discuss those ideas by visiting our subreddit /r/openage!

As always, if you want to reach us directly in the dev chatroom:

  • Matrix: #sfttech:matrix.org

links

stalking