Allegro Game Framework

Originally, I had the intentions of building my first game engine using objective-c and cocoa since I’m going to be targeting the Mac. I investigated several resources on objective-c programming and was pretty happy with what I was finding. There are two main catches to this decision.

  1. I don’t yet know Objective-C and Cocoa
  2. If I ever do decide to support other platforms, I’m stuck.

Now, the first issue isn’t a huge one. I do have experience in C and C++ development on Linux and Solaris, so learning Objective-C doesn’t look to be a long complicated task. The second issue didn’t initially bother me, but the more I thought about it the more it digs it’s talons into my side. I don’t have any current plans to support other platforms, but because I hate designing myself into a corner before I have to.

So before I commit to Objective-C and Cocoa as my development platform of choice, I’ve decided to take a detour and investigate other options first. I began by peforming a search on Google and found some interesting things.

PyGame is a game library for the cross platform development language Python. I don’t know python, but I’ve heard terrific things about it. I was also attracted to the fact that it’s cross platform. After some investigation I discovered that performance isn’t the greatest, though it would be fine for simple games. Also, players would need to install the Python interpreter before playing. This is the same reason I am not planning on using Java. So, this ruled out PyGame and Python.

Next, I found Allegro. Allegro is a cross platform game framework for C and C++. It supports dozens of platforms and because it is in C it should have good performance and can be included directly into the game package, so we don’t need to install anything extra. It supports DirectX on Windows and OpenGL through an add on library on Linux and Mac OS X. On top of all this, it is open source and gift-ware. This means no licensing cost or restrictions (check their license for further details).

This all sounds good, but what games have been built with this library that run on the Mac. I quickly found two games built with the library:

  1. Head Over Heels
  2. Alex the Allegator

A quick play through with each convinced me that the Allegro was at least worth a shot.

So I set out to install via the documentation found on the Allegro web site. Let me save you a ton of time and frustration. The stable version doesn’t build on Mac OS X. You need to get the latest cvs snapshot, then follow the directions here.

I’ll follow up in a later entry about how my testing is going.

5 thoughts on “Allegro Game Framework

  1. As you’re thinking about this you should probably also consider that most Mac games currently seem to be ported from Win. In my experience those games suck. They’re almost always unstable, look terrible, and generally feel unmacish. I could see using Objective-C and making a 100% mac based game as a big marketing advantage down the road. It will also probably let you do more cool Macish things like have automator actions in the game or whatever.

  2. I have been thinking along those same lines as well. I am still leaning heavily towards Objective-C, but I just want to explore my options before commiting.

    I also found a very intersting book on game progromming that uses this framework. I’ll be using the book as a means to evaluate the framework as well as bone up on some game specific things. I’ll have a review of the book when I’m done. By the end, I still expect that Objective-C may win out, but in the meantime I think it makes sense to explore this avenue and maybe learn a few new things in the process.

    Like you mentioned, designing games to be “macish” may give me an edge and I will keep that in mind.

  3. I used to use Allegro but never actually developed a full commercial game using it. I developed an experimental game as part of a university course which worked in both Linux and Windows.

    We used gcc on Linux and Microsoft VS6 on Windows for development. The impression I got from this exercise was that you need to develop simultaenously on both OS’s. There were all sorts of issues that arose, mostly due to using different compilers but I seem to remember a few minor Allegro issues too.

    Allegro seemed like a good library to me at the time and I agree that it is worth checking out. It will save some of the learning curve at the cost of some flexibility.

  4. Pingback: Make Mac Games » Blog Archive » Distinctly Mac

  5. Pingback: Make Mac Games » Blog Archive » Book Review: Game Programming All In One, 2nd Edition

Comments are closed.