Subscribe to WolfCoder's Kawaii Column        RSS Feed

Linux Game Engine Revolution

Icon Leave Comment
I know, I know! I should continue my newer series of Linux game programming tutorials, but I'm here to point out how having a game engine that works on Linux is actually worth the time these days.

About six years ago when I wrote my first set of tutorials, Windows was pretty much the thing you got when you wanted to play PC games. Your average PC user wasn't going to cripple their machine in an attempt to get WINE to work and the infrastructure for Linux games just wasn't there. I've even personally had a couple of machines with completely unusable OpenGL support in the video card drivers (they were ATI, by the way). DirectX was also the thing you had to learn to write your PC games which ran on Windows- an API that you never get used to and frustrates you with all these edge cases and exceptional situations for every single method call (many of which are documented only by confused user comments at the bottom of the matching MSDN page). Yes, the unexpected behavior of the Berkley Sockets send function in WINAPI will drive you insane!

Microsoft's long series of blunders invoking fan backlash was probably the best thing that could happen for games on Linux. Now there's actual large infrastructure to support developers who want to create and publish their Linux games without having to deal with the usual lack of central standard authority themselves. Considering the direction Windows is going, this whole Linux game development thing doesn't seem so pointless after all.

Having a multi-platform engine also has the advantage of being able to run games on special and portable devices that have become popular. You can easily adapt your engine to fit more devices when you use libraries that already have multiple versions (like SDL, OpenGL, etc.). It becomes easy to target even niche devices like the Raspberry Pi.

Since I eventually scrapped the old top-down 2D model of LandTraveller for an orbiting hovering camera in a 3D environment, I decided to write this new engine for multiple platforms already. The results have been great, I've got 3D drawing of models I made in Blender (export to Wavefront .obj) working on both Windows and Linux (the source code is updated in a public SVN here). The only problem I expect is getting more platform independent drawing of real fonts- not bitmapped ones. This is because I want my engine to be capable of Japanese input/output. I'll be sure to post my solution when I find one, but I expect it will be to create a system memory bitmap (HBITMAP in WIN32 and probably a wx bitmap in Linux X-Windows), draw the text into it, and then copy the pixels to an OpenGL texture for rendering like it's a label maker.

Of course, that good feeling you get when you do the extra work to make things more open and free has always been there~

0 Comments On This Entry


June 2018

24 25 2627282930