> Is it that difficult for them to write their code once and compile it separately for each platform?
Yes if you start out writing it in "Visual C++" targeting Direct3D. Less so (but still somewhat painful I imagine) if you start out compiling with GCC and targeting OpenGL.
In theory, these days C++ compilers are cross-platform, OpenGL is cross-platform, windowing-integration libs like SDL/GLFW/etc. are cross-platform... but the best engines for one target primarily Direct3D and their OpenGL path might be non-existent and/or sub-standard.
I think people starting from scratch today probably look around, notice OpenGL runs anywhere in some form, and start learning this path. But until just a few years ago, OSX and Linux were much more fringe, Windows was the only realistic place to be, and back then, OpenGL on Windows was a really vastly inferior option to D3D. The game-devs who started out learning their craft back them, I think, come from that background.
If you start from scratch today, cross-platform support is quite a lot easier than it used to be and you don't need the JVM to "write once run anywhere".
Trouble is, though, if you were to start from scratch today, then you're also probably not gonna launch a big title this year or next...
Yes if you start out writing it in "Visual C++" targeting Direct3D. Less so (but still somewhat painful I imagine) if you start out compiling with GCC and targeting OpenGL.
In theory, these days C++ compilers are cross-platform, OpenGL is cross-platform, windowing-integration libs like SDL/GLFW/etc. are cross-platform... but the best engines for one target primarily Direct3D and their OpenGL path might be non-existent and/or sub-standard.
I think people starting from scratch today probably look around, notice OpenGL runs anywhere in some form, and start learning this path. But until just a few years ago, OSX and Linux were much more fringe, Windows was the only realistic place to be, and back then, OpenGL on Windows was a really vastly inferior option to D3D. The game-devs who started out learning their craft back them, I think, come from that background.
If you start from scratch today, cross-platform support is quite a lot easier than it used to be and you don't need the JVM to "write once run anywhere".
Trouble is, though, if you were to start from scratch today, then you're also probably not gonna launch a big title this year or next...