Join us on the Linux Gaming community on Lemmy, the federated open source alternative to Reddit.
Gamedev: How to describe Linux support
8BitSkull 23 Jul
Hi everyone! I'm a gamedev. Big fan of GamingOnLinux, and Linux gamers generally. You are polite and very helpful when it comes to bug reports.

Even though Linux users tend to go the extra mile when there are issues, I still spend a lot of time (disproportionately so) debugging things that only seem to appear on Linux.

I want to continue supporting Linux in the future, but I'm wondering about how best to phrase this support, so I am hoping someone here might be able to help. Please note I know almost nothing about Linux (other than that "PC" does *not* stand for Windows).

What would you expect to see in terms of a description of Linux support? I know there are a lot of versions (distros?) out there. Is it possible some are less stable than others? Is it possible some issues can be attributed to the distro, or is it always my fault if something goes wrong? Should I officially support some "best" distro, and the rest just kind of "if it works it works"?

I hope my questions make sense! If you have insights or suggestions beyond what I asked, please do share!

Thanks in advance.
Liam Dawe 23 Jul
The main thing is to ensure it's tested. You're not expected to test on many multiple distributions, I wouldn't worry about that.

The most popular for gamers are Arch and Ubuntu, with 99% of things working fine between them. If it works there, it should work practically anywhere.

The main issue I've seen is Game Maker titles, as they build directly against Ubuntu libraries, where libcurl has a slight difference causing it not to run out of the box (usually) on other distributions. The problem there is that Game Maker should be testing against the Steam Linux Runtime and/or supply the needed dependencies but they don't.

Do you have any examples of issues you've faced? I'm sure someone would be able to point out workarounds or actual fixes.
CatKiller 23 Jul
This is a good guide to read.
CatKiller 23 Jul
Quoting: 8BitSkullEven though Linux users tend to go the extra mile when there are issues, I still spend a lot of time (disproportionately so) debugging things that only seem to appear on Linux.
Also, just because an issue is easiest to trigger on Linux, that doesn't mean that it's a Linux issue. We've had lots of accounts from other developers that a Linux build is a great debugging tool for all their builds.
8BitSkull 23 Jul
Quoting: Liam DaweThe main thing is to ensure it's tested. You're not expected to test on many multiple distributions, I wouldn't worry about that.

The most popular for gamers are Arch and Ubuntu, with 99% of things working fine between them. If it works there, it should work practically anywhere.

My previous release was tested (by you, among others!), and I intend to continue with that in the future. It just seems like a subset of Linux users experience very similar issues.

Quoting: Liam DaweThe main issue I've seen is Game Maker titles, as they build directly against Ubuntu libraries, where libcurl has a slight difference causing it not to run out of the box (usually) on other distributions. The problem there is that Game Maker should be testing against the Steam Linux Runtime and/or supply the needed dependencies but they don't.

Do you have any examples of issues you've faced? I'm sure someone would be able to point out workarounds or actual fixes.

I use Defold. I have resolved some of the issues faced by Linux users, but I still have some that I am unable to get to the bottom of.

Some of the issues that appear on Linux that I haven't seen elsewhere:
* I get nil values (the Lua equivalent of null/undefined) in the pathfinding library I use. I know there's nothing wrong with the library itself because it just works on PC Windows.
* A very strange issue where an iterator variable in a for loop ended up being a very small value (6.8181059126092e-322) instead of 0. The community thought this was a coercion issue, but fixes addressing this had no impact. Again, this only happens on Linux.
* A strange one where the game is stretched in an odd way (see screenshot below). No idea what causes this.

Stretch issue

Defold uses the same Lua version for Linux as Windows, so I don't think it's that. I'm in the process of engaging with the Defold developers about this to see if I can gain any insight from them.

Quoting: CatKillerThis is a good guide to read.

Thanks, will check it out.

Quoting: CatKiller
Quoting: 8BitSkullEven though Linux users tend to go the extra mile when there are issues, I still spend a lot of time (disproportionately so) debugging things that only seem to appear on Linux.
Also, just because an issue is easiest to trigger on Linux, that doesn't mean that it's a Linux issue. We've had lots of accounts from other developers that a Linux build is a great debugging tool for all their builds.

I take your point, and that may well have been the case for some issues (I can't remember precisely but I do think Linux users spotted some bugs that would have happened on other OSes too). However, there are definitely some (like those listed above) that exclusively happen on Linux for some reason.
Liam Dawe 24 Jul
Quoting: 8BitSkull* I get nil values (the Lua equivalent of null/undefined) in the pathfinding library I use. I know there's nothing wrong with the library itself because it just works on PC Windows.
Well, working on Windows doesn't mean there's no problems in the lib. We've seen reports from other game devs that have shown real bugs when run on Linux using different debuggers and compilers. Clearly there's a problem somewhere but it absolutely also could be somewhere else. What lib is it?

Quoting: 8BitSkull* A very strange issue where an iterator variable in a for loop ended up being a very small value (6.8181059126092e-322) instead of 0. The community thought this was a coercion issue, but fixes addressing this had no impact. Again, this only happens on Linux.
Like above. I'm thinking though, this could even be an issue with the local. Unity has seen the issue with issues like the system expecting commas instead of dots or things like that. There are a few possible things that can mess with math.

https://unix.stackexchange.com/questions/87745/what-does-lc-all-c-do/87748

It's why a lot of games simply force it to prevent issues.
Quoting: 8BitSkull* A strange one where the game is stretched in an odd way (see screenshot below). No idea what causes this.
Hmm, resolution scaling issue? Hard to say without knowing what window library is used and details from the user system.
CatKiller 24 Jul
Quoting: 8BitSkullA very strange issue where an iterator variable in a for loop ended up being a very small value (6.8181059126092e-322) instead of 0. The community thought this was a coercion issue, but fixes addressing this had no impact. Again, this only happens on Linux.
There can be differences in the way floating point numbers are handled on different platforms, but you wouldn't generally use a float for this purpose anyway (which you appear to have done); you'd want an integer. Maybe that's a Lua thing.

Last edited by CatKiller on 24 July 2021 at 10:09 am UTC
Samsai 24 Jul
I'll chime in on the floating point issue as well. You should never trust a floating point value to hit a specific number if you are dealing with fractions. As you make more and more calculations you start accumulating error and you could very well end up in a case where a value is very close but not quite zero. Equality operation on floating point fractions is basically almost gambling and some languages and linters will even scream at you if you do it. If you expect a value to get close to a whole number then do some floor() operation on it or do equality checks and whatnot against a range of acceptable values.
mirv 24 Jul
Are you able to share the iterator and loop logic? Stripped of other information as much as possible if that makes you comfortable. Might be able to offer something that can work just as effectively, while avoiding floating point pitfalls. It's going to depend on the language used of course.

Screen stretch is typically incorrect ratio calculated, or....ok, I started to type stuff that might be too technical, but the short version is that "render target texture" that's square and mappings from that to the screen might not be correct.
Liam hit the nail on the head for me in the very first post. I can't tell you how many times I have tried a Linux game, had it not even launch, and when I reported it to the developer was told that they couldn't actually test it as they didn't run Linux on any of their systems. Personally I really don't care which distro(s) you support so long as you support at least one. Myself I have been willing to install the distro the developer supports and test a game on it to make sure my issue wasn't distro specific. I think you should support whichever distro you yourself are most comfortable using. Be specific in that and stick to your guns. Be willing to help but don't feel you are required to try the game out in hundreds of possible configurations because you're not. I'm not a coder, just an everyday gamer so my point of view is that of a customer, albeit one that has worked various customer facing jobs enough to know to be polite and not the kind of customer I myself despise.

I would love to know which games you have made, you already seem like someone I want to support and buy games from.
8BitSkull 19 Aug
Hey everyone! Thanks for the comments, and sorry for not checking in on the thread for a while.

Samsai and mirv: You both raise good points, but I keep coming back to "why is this only happening on Linux?". There's thankfully a good resolution to this below!

PublicNuisance: Thanks for the support and your kind words. It's very daunting but I really ought to dip my toes into Linux if I wish to support it in the futures, hard to justify not doing it. The game I've made is called "Fates of Ort".

So - good news. It seems we have found a resolution. Speaking to the Defold devs, it surfaced that Linux builds were running on a different (older) version of LuaJIT to Windows builds. This is likely the culprit, which has been further confirmed by players that previously reported issues with the game now being able to play the newest build. I've updated the game on all platforms and keeping my fingers crossed it runs better for everyone.

Thanks for the support!
While you're here, please consider supporting GamingOnLinux on:

Patreon, Liberapay or PayPal Donation.

This ensures all of our main content remains totally free for everyone with no article paywalls. We also don't have tons of adverts, there's also no tracking and we respect your privacy. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register

Or login with...
Sign in with Steam Sign in with Twitter Sign in with Google
Social logins require cookies to stay logged in.

Livestreams & Videos
Community Livestreams