artybartfart, on 25 March 2022 - 01:11 AM, said:
Am I missing something?
Why are games not in MS, GNU Linux and Apple OS's ?
Are not compilers capable of compiling too both?
Are games companies terrified somebody will lift their code?
So many questions . . .
1. probibly
2. because cross compiling is its own can of worms, you must also either choose apis available to all platforms or write abstraction code to merge a bunch of different interfaces into a similar set of calls (usually with heavy use of preprocessor directives). a big problem is microsoft because almost every api they create was intended from the ground up to be a windows only thing. the lockout is real. in the olden days it was amazing what you could do with just sdl, opengl (or vulkan) and a couple other multiplatform libraries. in the day of rent an engine, the game engines actually support as many platforms as possible out of the box, but not all game companies want to pay for linux support because employees who know linux well are expensive (and the same goes with apple oses which are unix based).
3. gcc is. visual studio, maybe, idk. i prefer gcc so i dont have to deal with visual studio's crap. i think it can cross compile to windows, et all, provided there is support for the libraries you are using. the c++ version of my game engine can compile for either just fine. but im not using any proprietary or single platform libs.
4. yea probibly. they also have to defend their copywrites. in pgi's case the ip is owned by microsoft, and part of the arrangement to make games for the ip, pgi had to do windows only. this is more a legal department matter than a programming matter. i think pgi managed to convince ms to let mw5 be ported to consoles other than xbox, but ms platforms got priority. the mechwarrior franchise is really a thorn in my side keeping me from doing the hard switch to linux. most of my other games are in fact supported by linux. the big problem is everything i need has to work on the same distro/kernel version.
Edited by LordNothing, 25 March 2022 - 05:15 AM.