GeekGameBoard — Getting closer to iPhone-ready
To encourage development, I’ve started an open source project based on the GeekGameBoard game-development sample code that Apple published last December (which, by a strange coincidence, I wrote.) I hope to have it ready for iPhone game development soon. It runs on iPhones, too!
You can browse or download the source code over at bitbucket.org. It’s BSD-licensed, and your contributions are of course welcome.
The changes since Apple’s original sample-code release are:
- It no longer requires garbage collection. I love GC, but it’s not supported on the iPhone, where I am definitely planning to use GGB.
- I fixed some memory leaks of CoreGraphics objects.
- I fixed an assertion-failure when kinging a checker.
What Is GeekGameBoard?
GeekGameBoard is a small Objective-C framework for implementing the user interface of a board or card game. Many games can be implemented in less than 150 lines of code.
It also demonstrates generally-useful Core Animation techniques like:
- Hit testing
- Dragging CALayers with the mouse
- Loading images from files and setting them as layer contents
- 3D “card-flip” animations
Framework classes include Bit, Piece, PlayingCard, HexGrid and more. It comes with sample games from Klondike solitaire to Checkers and even Tic-Tac-Toe. It’s all ready for you to add AI, network play, new game definitions…
GeekGameBoard runs on Mac OS X 10.5 or later. iPhone support is coming soon.


Pssst! Game Pieces!
Icon websites like IconFactory, InterfaceLift and DeviantArt are great places to get artwork for game pieces. (My personal favorite game pieces are Ginko’s Icons, shown on the right.) Just be aware that most icons, even if freeware, require you to get the copyright holder’s permission for anything other than personal use.
February 4th, 2010 at 8:35 AM
Thanks David and Jens! Fixing the quotes worked and I figured they probably went before the @end, but my limited understanding of Objective-C makes me question everything. Now to figure out how to get it on my phone!
February 4th, 2010 at 7:50 PM
I’m able to get it working on the simulator, but not my phone. After struggling with signing authorities and provisioning profiles for ever, I finally made some progress. Now I get an error in compiling dispenser.m that says, “error: property ‘bit’ attempting to use ivar ‘_bit’ declared in super class of ‘Dispenser’”…
Any ideas?
Sorry to be such a beginner!
February 9th, 2010 at 8:23 PM
I’m able to get it working on the simulator, but not my phone. After struggling with signing authorities and provisioning profiles for ever, I finally made some progress. Now I get an error in compiling dispenser.m that says, “error: property ‘bit’ attempting to use ivar ‘_bit’ declared in super class of ‘Dispenser’”…
Any ideas?
Sorry to be such a beginner!