Retina Resolution

iOS Snow GlobeWhile working on an app to release at Christmas, I realised that I hadn’t been using the correct resolution when I took a screen and it was still the ordinary non-retina size.

At first I thought it was something to do with multisampling, but it turns out that the EAGL layer does not automagically resize itself to the correct size when using the iPhone4.

To get it to do this, you just need to set the contentScaleFactor on the UIView that holds the EAGLView.

//eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
//                                [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking,
//                                kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat,
//                                nil];
if( [[UIScreen mainScreen] respondsToSelector:@selector(scale)] )
{
	self.contentScaleFactor = [[UIScreen mainScreen] scale];
}

The scale factor can be gotten from the UIScreen, however the scale factor doesn’t exist on older SDKs, so if you want to maintain backwards compatibility, wrap it in a respondsToSelector.

I’m Batman

This was an idea of a friend of mine that I prototyped the basic controls to see if it would work.

You play a character on a zip line, and must move the zipline to gain enough momentum to get over obstacles.

Something about it made me think of Batman, so I called it I’m Batman. I didn’t pursue it much further after a game was released later in 2010 called Finger Balance which was the same idea.

(GPS) Tower Point Defense

I use to work in a building called Tower Point in Brighton. While working there I got into Tower Defense games, and came up with the idea of Tower Point Defense.

Using Google Maps, it would find routes to Tower Point, and the enemies would follow those routes to get to Tower Point, and you needed to build turrets to prevent them from destroying it.

The limitation that prevented me from polishing and then releasing it however was the number of requests that can be done through the Google Maps API per day. There probably is a way around it, such as caching or talking to Google about a higher limit if needed.

After prototyping it, I decided to allow any post code GPS coordinate to be used, and thus Tower Point Defense was created. I came up with some ideas for variations of it, one being a train defense.

Train Defense works in a similar way, only you are constantly moving and needing to defend multiple carriages rather than a single point. Though I never got around to prototyping this idea, I would like to do it some day.

Talking in the pub with some friends about it, we thought it would be great if it could have a Facebook component, where you could capture areas of the world, and would need to defend against others taking over.

Catalyst

Catalyst Title Screen

Whilst working on animation support for Athena for Courage, I began working on a game for the iPhone called Catalyst last weekend.

I was thinking about a game I had played about a month or two before called Polygonal Fury, and realised it would port nicely onto the iPhone.

Catalyst - A circle explodesSo I started a OpenGL ES project (and discovered the new version of the iPhone supports shaders), and started with just making some circles bounce around.

Since the collision of a circle is easy, they seems the easiest to setup for interaction with touching the screen.

Catalyst - A chain reactionInitially I just made them “die” if tapped, but later I added the ability of shapes to spawn reactions.

All sprites within the game are triangle fans, but I will probably change them to quads with a texture due to the break that occasionally appears in the geometry, and alpha glow around the edge.

Catalyst - Still three "clicks" leftIt is not much, but it is a start, I plan to add some more particle types, and maybe a few different upgrades than the ones giving in the Flash version.

The background needs changing, I was thinking of something going on in the background like in another Flash game I played, Spewer, with maybe cut scenes like the Nintendo DS game Contact had.