February 13, 2010

You should have seen it coming! EpicGame on iPhone!

Well, after a few days of learning the ins and outs of UIView and the CGContext classes in Objective C, I went to work porting the classes from the original VB EpicGame to iPhone friendly Objective C classes. This was rather straight forward and other than changing the method formatting almost all the logic was still sound. The big difference that did require some tweaking was that Quartz or CoreImage uses a diffrent orgin point, it is the bottom left, not top left as almost everything else. Oddly enough all the images just needed to be flipped in PhotoShop and all was fine, with little to no code change.

What is different is that there are no keys, you move left and right by holding the left or right edges of the screen. A tap will shoot, and a swipe up makes epic box jump. Pritty niffty I must say.

I quickly found out that the drawing class CGContext was annoying near the end, as you are forced to rely of the Touch OS to draw when it is ready, vs forcing a redraw when needed as I am used to. This takes a huge hit on speed, but I am lazy and do not want to spend an entire extra week of studying just to use OpenGL ES instead. It is large complex and annoying, plus way too much for a simple game like this. Oh, and thanks Apple for not making the iPhone simulator actually match the real speed of an iPhone, for others as a warning, the simulator runs graphic calls around 100 times faster than a real iPod 1G, don't be fooled!

You can grab a copy here, sorry non JailBreakers no portable EpicGame for you, as I am not paying $99 to Apple to distribute a free app, plus the music would most likely prevent it from being approved anyway, as it is used without permission, but without it, it just would not be the same.

Other then the code and the can monster art, I claim no ownership of the rest of the art and music, and as such I am posting the App as free for use as is, enjoy.

No comments: