Game Plan Update

This weekend I worked on Section 1 of my Game Plan. While seemingly not a huge step in the process, it is step one. I certainly can’t reach the last step without taking the first one.

Taking a look back, this is what my game plan had for the first step:

  1. Setup Development Workstation and Environment

    1. Select and install a Version Control System
    2. Select and install a reliable backup system
    3. Select and install development tools (compiler, editor, tools)

I was able to complete the first two sub-tasks and make a great start on completing the last. For the version control system I selected Subversion. I have used cvs for quite some time and nearly continued in the same direction, but given the current strong trend of migration from cvs to Subversion and that Apple’s XCode now has built in support (though somewhat buggy), it was time to adopt the newer tool. I installed Subversion using fink and created some sample projects to test it out and it seems to work wonderfully.

The second task, setting up a backup system was taken care of with two purchases: Two external 250GB Hard disks and Dantz Retrospect. I setup the external drives as a Mirrored RAID in Apple’s Disk Utility and setup Retrospect to do nightly backups of all my files to the external RAID. So this gives me two internal hard disks in my PowerMac G5, one is the system drive where I have OS X and all applications installed, the second is my Users or Home volume. This is were I check my code out to and actually do my development as well as all my other day to day work. I also have a single external drive where my existing cvs repositories and my new subversion repository live. And now my external RAID which stores my backup images. This gives me several layers of redundancy and makes me feel a bit more secure going forward and has been accomplised within a reasonable budget.

Finally, the third task of selecting the development tools. The obvious choice was to go with XCode and this is exactly what I’m going to use. It’s free, supports multiple languages, and seems to be under pretty aggressive ongoing development and improvement over at Apple. The reason I can’t mark this item complete yet is because I have not decided upon a programming language or framework. As I mentioned in my previous entry, Allegro Game Framework, I’m still exploring my options. What are the advantages of using a cross platform game framework written in C vs. using Objective-C? Hopefully, I can work this out in the next few weeks and feel comfortable with the direction I take.

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.

Installing Darwin Ports

DarwinPorts provides an easy and very powerful toolset for installing cross-platform UNIX software through an easy to use interface via the terminal (command line).

Where to get it: http://darwinports.org/getdp/

Installation:

  1. Uncompress the installation package using Stuffit Expander
  2. Double-Click on the DarwinPorts.mpkg icon inside the DarwinPorts disk image.
  3. Open the Terminal.app
  4. You’ll need to add the following to your $PATH environment variable:
    /opt/local/bin
  5. If you are using Panther or newer (I’m using Tiger), you can add it to your .profile file using your favorite text editor (I used vi) by adding this line:
    export PATH=$PATH:/opt/local/bin
    You may need to create a new .profile text file if it doesn’t already exist in your home directory.

  6. Open a new Terminal.app window and type the following at the prompt:
    port
  7. If your path and DarwinPorts is installed correctly you should see the following:

    $ port
    Usage: port [-vdqfonausbck] [-D portdir] target [flags] [portname] [options] [variants]

  8. Make sure DarwinPorts is up to date:
    sudo port -d selfupdate

Now you are ready to install all kinds of useful software, simply by typing the following at the Terminal.app prompt:
port install [portname]

You can search for a program by typing the following command:
port search [portname]

To see a list of available programs you can use:
port list
or you can visit: http://darwinports.org/ports/