My team and I released our game on Steam last year for Windows, Mac, and Linux. The game is written in C++ and uses SDL2, including SDL2_image, SDL2_ttf, and OpenGL for graphics. Around the middle of this year, a couple of bugs started affecting the Linux version (and only the Linux version) of the game.
Two different problems have appeared:
All of the text (but none of the other textures) is garbled. Here's a picture:
We're using SDL2_ttf for the text, drawing it to an SDL_Surface, and turning that surface into an OpenGL texture. That last step is what we do for all the images in the game, including the ones unaffected by this bug.
The music is intermittently garbled, with sort of a high-pitched buzzing noise appearing underneath it. We are not using SDL_mixer, just SDL2's built-in sound tools.
I think both bugs are due to a change in the Steam Linux Runtime rather than anything we did, since the Linux release was working fine until some time in early-mid 2022. Probably relatedly, when I run the game with the versions of libSDL2-2.0.so.0 and libSDL2_ttf-2.0.so.0 that come with my distribution's package manager, the bugs go away; it's only the versions that come with the Steam Linux Runtime that cause the problem.
I am compiling the Linux version of the game inside the "Scout" Docker container (https://gitlab.steamos.cloud/steamrt/scout/sdk/-/blob/steamrt/scout/README.md), so I don't think I'm linking against the wrong versions of the static parts of these libraries.
It would be great to have a fix for these bugs. But, since the problems are fixed with one version of both of these libraries, it would also be fine if I understood how to package them properly. They have more dependencies than the Steam Linux Runtime versions, so they're not really suitable for packaging with the game as is. Does anyone know how I could compile them to have as few dependencies as the SLR versions, or have any suggestions in general for what I should do about this?
Thanks so much, and let me know if I can provide any more information.