Archive for Game

Phage v1.0 teaser

Having primarily written libraries and back-end code so far in my career, I’ve decided to knuckle down and learn how to create decent GUIs.

I enjoy mucking about with games so revisiting Phage, an abstract strategy game I wrote last year, seems an apt exercise. It’s only at version 0.2.1 and the low version number reflects the clunkiness of the UI. I’m going to give this game a complete overhaul for version 1.0, and this time I’m not taking UI short-cuts. Here’s a screen shot of the work in progress:

Picture 5.png

I’m using Core Animation to do the visual elements of the game. It took some time before I managed to wrap my head around how to make a re-sizeable grid of CALayer instances, but once I finally did the rest has been pretty smooth sailing. It’s really satisfying resizing the window and see the graphics smoothly scale up or down!

Looking at the source of the GeekGameBoard example project from Apple has been a huge help. It’s a bit hard to follow sometimes as it actually implements five quite diverse games but it is full of gold nuggets. I don’t like its tight coupling between the UI and the game logic, however, and I’m currently working on cleanly marrying my shiny CALayer based View to my Model classes.

Psst: I’m planning to also release this on the iPhone. I’ll announce it here when I do, so if you’re interested: keep checking back!

Comments (1)

Follow

Get every new post delivered to your Inbox.