The biggest challenges of the port so far have been:
I needed to convert all my shaders from cg/hlsl to glsl. This is required when going from DirectX (Windows) to OpenGL (Linux).
2. New Development Environment
In windows, I used Visual Studio. In linux, I use KDevelop. I also needed to switch over to a makefile / CMake build system (visual studio projects don't work on linux).
Also, there's a ton of little peripheral tools and apps I'm used to using on windows that don't exist on linux, and vice versa.
Linux had the really annoying habit of never giving me back my mouse pointer when my program hit a breakpoint, which was a pain to deal with. Also, going from visual studio's debugger to gdb is a pretty big culture shock.
3. (Re)building Middleware
I needed to rebuild all the open source middleware libraries I use. This isn't super painful, but I was a little out of practice doing this sort of stuff on linux.
4. OS differences.
For example, dealing with the location of configuration and save files. Also, linux filename case-sensitivity is a pain when coming from a windows (case-insensitive) environment.
5. Compiler differences.
Even though g++ and VC++ are both c++, there's still a ton of little differences and quirks between the two compilers that either lead to compile/link errors (easy fixes) or subtle bugs (hard fixes).
Example i) the abs() function.
In VC++, abs() works for floats.
- Code: Select all
abs( -1.37f ) equals 1.37f
In linux, the abs() function is defined for integers only.
- Code: Select all
abs( -1.37f ) equals 1
You need to use fabs if you want to operate on floats.
Example ii) unicode handling
There are a bunch of Visual Studio specific functions for dealing with unicode that don't exist on linux.
6. Middleware cross-platform bugs
I've had to change stuff in CEGUI (user interface library), OIS (input library), and OGRE (graphics library) to get everything working properly on linux. At least I have open source stuff to work with - phew!
7. Building an Installer
Totally different deal on linux and windows.
There's different concerns and different flavors of "dll hell" between both linux and windows.
On windows you have Win8, Win7, Vista, XP.
On linux, you have a bunch of different distros.
Each needs to be tested, preferably in combination with different hardware (especially AMD vs NVIDIA graphics cards).
This is the biggest PITA when making PC games, and you're starting from scratch when you switch over to a linux port. You wouldn't believe how many times I've played through the game. Next time around, I really need a better solution than being my own QA department.