by ComputerGuru · 13y ago · 0 comments
There are many Windows-only games written in OpenGL, and the ones that are written with DirectX is not necessarily because DirectX is better but because there are more consumers for Windows.
The short and simple answer is that "real," modern games are ridiculously expensive projects. The highest percentage of PC-gamers can be found (at the moment) on Windows. Ergo, you will write Windows games and use libraries (OpenGL, DirectX, or otherwise) that are available on that platform.
Humanity is better for this exchange on Stackoverflow - we need more discussions like this.
Outstanding. Made me smile. I appreciate the level of grandeur you are attempting to bring to bear on this discussion, but this is a discussion about Game Development by the way.
http://demonstrations.wolfram.com/FeynmansWobblingPlate/
The "amazing" part of the OP's discussion is not the immediate topic at hand, but that someone took the time to go past the pat answers ("because Windows has more users, etc") and consider all the other factors that have led to things being the way they are. If only more important fields -- education, medicine, politics, justice -- had more people willing to spend a summer hour examining their deeply-held assumptions.
I would have expected it would be quite minimal compared to the work involved in developing the game itself, but I guess I must be wrong if there are "many" Windows-only OpenGL games.
Networking: Most folks building a bespoke networking layer seem to go with ENET, which is cross-platform.
Async file I/O: yup.
Threading libraries: something wrong with Boost Thread? (Boost gets coroutines, too, in 1.53, which I'm pretty excited about.)
Honestly, the biggest problem I see in writing a cross-platform game is device input. Trying to build a joystick/gamepad-based game for Linux and OS X are pretty painful. Fortunately I've lucked onto GLFW as a windowing toolkit, which handles the HID Manager boilerplate and other badness for them.
It also supports Android, so in theory you could almost have one code base with only a UI and input revamp for Android target every PC os.
Or maybe you decided to write the whole thing using multi-platform libraries like Qt in the first place, so that you don't have to change hardly anything. Or maybe you wrote it in Visual Studio using .NET heavily and you have to practically rewrite everything from scratch. It's totally dependent on the decisions you made when writing the original program.
So when you change platforms from, say, the Xbox 360 to the PS3, those assumptions you made about the OS, the CPU, the chipset, and other minute details are suddenly completely, horribly wrong. So the guy who wrote all of that highly optimized code has to write it again to optimize against a completely different set of quirks.
What's interesting to me is the fact that makers of indie and notgames, that do not require the enormous scale and pushing the hardware and programmers to their limits - they often make them for Windows, too!
Indie game developers want to reach the largest audience as well, so I don't see the difference. Additionally, the fact that Windows has such a high marketshare among consumers means that it likely has a high marketshare among indie game developers from the get go.