GameLib Home

"Call immediately. Time is running out. We both need to do something monstrous before we die." -- Message from Ralph Steadman to Hunter Thompson

GameLib

Introduction | History | Design | Download

Introduction

GameLib is intended to be a library for the development of cross-platform game/multimedia applications.

History

The inception - I began working on the first version of the GameLib library in 1996 or 1997. At that time, I still did most of my programming under DOS. My goal was to provide a library that I could use to develop my applications and that would allow easy porting to Windows in the future. I developed them as two separate trees with the same API in C++. At that time, my C++ skill was in its infancy, and the project was a great learning experience, but the library very much resembled a C library. The DOS code was written in assembly and C++, and eventually started falling behind the Windows version in functionality, particularly in the area of sound support. I was using modified versions of many libraries, including the MIDAS sound system and zlib. I C++-ized the various libraries and modified them to support the programming paradigm I wanted, but maintenance was a mess.

My second try - Eventually, I realized that supporting DOS would become too difficult, as DirectX, DirectMedia, and Windows Scripting Host made possible many things that I would have had to implement myself in DOS. And, I didn't use DOS that much anymore, anyway. I decided to rewrite the entire thing with my improved knowledge of C++ and focus on providing a useful Windows-only library. To that end, I think I succeeded, but I still relied upon customized versions of libraries and struggled to keep my versions of the libraries in sync with the latest releases. When I left this project, I had decided to rip out all the audio/streaming code and rewrite it in COM using Windows Media, so that I could handle any type of video or audio source for which a decoder existed on the system. There was a show-stopping bug that I could never fix, though, due to the closed-source nature of the Microsoft libraries ("Why is this function returning an error???") and my inexperience with DirectMedia programming.

The third incarnation - In the time between the end of the second version and now, many things happened, including a successful transition to the GNU operating system. I decided to take my greatly improved C++ knowledge and create a third version that was cross-platform among Windows, Mac, and *nix in a single source tree, using unmodified GPL libraries to provide additional support, while maintaining very clean and interoperable code. For instance, I wanted nothing to be dumped into the global namespace, and nothing unnecessary in any other public namespace, and I wanted to make full use of the object oriented capabilities of C++. I succeeded. My functionality goal was to completely abstract away the operating system and provide a platform-independent interface to various services. It was coming along nicely, with threads, an object oriented file system, streams, pipes, processes, etc implemented. I developed a number of console programs and regression tests that compiled under Linux and Windows with the exact same code, without the traditional #ifdef magic. However, even with all that done, it was still a huge project and far from complete, and I eventually lost motivation.

The current version - I consider the current version to be the third and a half iteration, because it's basically a continuation of the goals for the third version, but using the .NET framework to handle much of the mundane stuff. The main reason I moved the project from C++ to the .NET framework is that the result would be language-agnostic, but it also reduced the amount of work I had to do to implement it and the amount of learning a potential user would have to do to use it. With mono coming along so nicely, it's still cross-platform. It seems like an all-around win. Unfortunately, it means I've scrapped all the work I did for the C++ version.

Design

With the .NET framework handling most of the OS abstraction and the primitive types (strings, etc), much of the old design is no longer valid, so this section is under reconstruction.

Download

The latest version of GameLib can be downloaded here. Alternately, if you can't figure out how to build it from source but still want to try it out, feel free to contact me.

The project was hosted on SourceForge, but I'm no longer updating it there and whatever files are available are seriously out of date.