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.
- I don’t yet know Objective-C and Cocoa
- 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:
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 responses to “Allegro Game Framework”
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.
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.
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.
[…] So, I’ve changed my focus, or rather I’ve widened my focus to try and include features that I have not seen before. I’m now looking for features that are very much Mac centric, I’m now trying to embrace the Mac feel and the Mac experience. As Ian pointed out in a comment on my Allegro Framework entry, a game played on a Mac should feel like it’s being played on a Mac, not like it was ported or copied from another platform as a second thought. […]
[…] Before starting this book, I had partially read at least half a dozen game programming books over the past ten years. They covered topics ranging from simple game programming to 3D engines mostly for Windows on the PC. Since my switch to the Mac shortly after Mac OS X Jaguar was released, I’ve been looking for resources on game programming that would target the Mac, or at least not be so directly tied to Microsoft’s DirectX framework. Finally, this book was what I was looking for. Basic 2D game development using the cross-platform game framework, Allegro. […]