Closed 1000101 closed 2 years ago
Please explain why multiplayer is not available on arm processors using the enet library.
I mean this. Wouldn't dropping 387
make it impossible to play multiplayer on 32-bit x86 but could enable building multiplayer for all 64-bit archs with newer instruction sets? If I got this right, multiplayer is not possible because of different math operations. Dropping 387
instructions could make multiplayer available for all 64-bit archs. Or is that not the case here?
Ok. This is not really a question on enabling 64-bit architectures. The game is being compiled for 64-bit architectures just fine, and is working in mixed environments now. The issue at hand here is the game requiring deterministic math vs an optimizing compiler. You see, there are several FP options in modern CPU, and an optimizing compiler can pick whatever implementation is supposed to be the best per the compiler implementation (which they optimize for speed, not compatibility). When -mfpmath=387 is picked in GCC/Clang, now we have a baseline that is deterministic, one which the game used anyway back in the day, so it makes sense.
So no, we are not dropping this flag or 32bit support, because we will not gain more compatibility, but loosing out. This is really a GCC question, which flags are needed for those on ARM. So what is the best baseline to match x86? But this isn't really even the whole story when it comes to running on ARM. No one has really tested it yet, so I think making a decision here is a bit too soon.
Oh, my bad! Going through the code, I initially thought it was a limitation of enet. Then I saw that piece of code and though it might be as simple as picking the right option. Of course it's never that easy, right? :). Too bad I don't have ARM so I can't fiddle with it some more.
Anyway, thanks for the awesome project, I discovered it only recently but I do greatly appreciate your work and I thoroughly enjoy it. Cheers!
In terms of ARM (which there are several possibilities), there are a few things that first need to get done before we can understand the status of multiplayer for floating point math. I'm working on another project that will run on ARM and SDL, so I might learn enough there to bring back to 7k, to at least have a port. When that happens, then I will be able to properly test at least one ARM platform in multiplayer. But until then, I have no idea, and the game probably doesn't work, which is why I say we don't support it.
But before I really want to support ARM, I want to overhaul the video code, because ARM is mostly mobile and battery powered, and we are quite inefficient there, to the point the game probably won't run nice anyway, and people would likely complain ;) They already do on x86 so... anyway, video code is my next target.
Would you consider dropping 32bit support in favor of newer processors? If I understand this correctly, the library used for networking either works for x86 processors with compatibility or it can be compiled for 64bit processors, which would make multiplayer available for arm processors, too (but would make the game unavailable for x86 32bit processors).