Posts Tagged ‘iPad’

Web Social Stats for SEO

Saturday, July 14th, 2012

Web Social Stats for SEO is an iPad app I’ve written which may be useful if you run a website. It allows you to quickly see how many Twitter Tweets, Facebook Likes, and Google +1s your own pages (or your competitor’s pages) are getting.

You can add pages by clicking the ‘+’ button and typing in the full web address, or by browsing to the pages you want and then adding them.

You can either add the original URL that you typed in, or you can add the URL which is currently shown on screen.

web social stats seo iphone app 1

Retults are shown in a table with one social service per column. The columns can be sorted in ascending or descending order.

The results are stored so you can view them offline.

web social stats seo iphone app 2

There is a second experimental way of adding URLs. You can pass in the address of a small sitemap.xml (up to 50 URLs) and the results for each URL will be retrieved. If there are more than 50 URLs in the sitemap.xml any additional URLs will be ignored.

I may increase the number of URLs that can be downloaded from the social services using a sitemap.xml in future released. Perhaps up to 100 in the next one.

Update: This app is not currently available on the App Store.

Technical Details

In case you like knowing these things…

I’m using operation queues to download the data in the background. The social stats are parsed using the JSONKit API. Results are stored in a SQLite database accessed using the FMDB wrapper.

Solar Balls game for iOS

Tuesday, May 8th, 2012

solar balls iphone
Today I released my first game for iOS. It is called Solar Balls, and is a simple arcade game where you have to flick coloured balls into the correctly coloured target. The game has:

* 16 mission levels
* 3 bonus levels which become unlocked when your score is high enough
* An arcade mode where you just have to get the highest score possible

The aim of the game is to save the Earth from the Solar Balls. They are heading towards our planet, and the only way to prevent them from destroying our planet is to fire them into the matching targets.

Game background and technical information

I wrote this game for fun, and to learn some iOS programming. It is built on top of the Cocos2D game framework. I tried first coding it using UIKit, but it was far too slow once I had more than 5 balls on screen at once.

solar balls ios 1

Cocos2D is built on top of OpenGL and was easily fast enough to run at 60FPS on my 2G iPod Touch even with 20+ balls on screen.

I did mix in a bit of UIKit for the menu buttons, and also to construct the sprites. Cocos2D has no easy way of drawing simple anti-aliased shapes such is circles, or dotted lines. I therefore drew these offscreen with UIKit and then imported the image data into a Cocos2D sprite.

solar balls 2

The physics is coded using Box2D. Originally I wrote the ball bouncing and collision code myself, but once I started adding angles and obstacles into the level it became obvious that I really should just use a physics engine to save me a lot of pain. As Box2D is written in C++ this has the knock on consequence that any parts of the game that interface with it also have to be written in C++ instead of Objective C.

I used the Particle Designer tool to make some of the explosion particle effects.

The game sounds use the OpenAL framework for low latency, and the background sounds use the simple AVAudioPlayer. I used the Finch wrapper to simplify using OpenAL, but had to customise it to handle automatically pausing/restarting the audio when necessary (e.g. if an incoming call occurs, or the game is backgrounded).

I found that the audio was the biggest user of memory. I had to re-convert many of the samples to lower bitrates to reduce the app size. Also I found that it was best to completely unload all audio and the audio framework if the game was backgrounded. I then reloaded all the audio again if the game was brought back to the front.

I’m not an audio or sound person so I made use of free images and sound effects. For the background I was able to make use of NASA great collection of copyright free images. As an extra touch I added information about each of the images to the start screen of each level (click on the level location at the bottom to see it).

It can be time consuming to produce multiple sets of images (original iOS screen resolution / retina display / menu buttons), so I wrote a script using ImageMagick to automatically convert each source image into the correct resolutions and to give them the correct names.

The sounds all come from This is a great resource for free game audio, but make sure you understand the licence terms for each sample. They have several different licences in use on the site.

XCode was really easy to use, as was debugging on hardware. In fact debugging on hardware is just as easy as debugging on the simulator which certainly encourages you to continually test on the real hardware.

Update: Solar Balls is not currently available on the App Store.