As part of our super top secret new startup we’ve been making some educational games, and for fun (in my spare time) I tried porting one to my iPhone. It’s a simple maths game which I thought would work well with a touch-interface. If you have an iPhone, you can get it here:
(this is a bit of an experiment – if enough people like the game, I’ll take the time to plug it in to some serverside stuff we’re doing which will add a bunch of feedback/stats/scores features for anyone who’s got the game)
Here’s some screenshots (note: it’s specifically designed for people with big fingers/thumbs … like me … hence the big buttons :))
You have to drag your finger over numbers to select a group that adds up to the TARGET, and try to clear the board against a time-limit. You can select in any direction, and jump across gaps (HINT: it’s a good idea to select a bunch of numbers in the middle early on to give you more options later).
NB: if you do buy the game, feel free to comment here with wishes/suggestions. I’ll be making some small improvements over the coming weeks (once you have the game, the updates are semi-automatic and free) – although I fit this in to my spare time. I’ll definitely fix any bugs.
Also, I thought it might be interesting to include the Backlog I used when making this game. If you don’t know what a Backlog is, go read the main reference for Scrum (it’s an easy read and hugely valuable – Amazon link on the right). All items are recorded in chronological order of when they were COMPLETED (several of these items were only added halfway through implementing other items, but were completed first).
- get touch working to move arbitrary images and alter logic-states
- get a grid of numerals on screen
- get touch detection for each numeral to know its been touched
- make nice graphics for each numeral
- chop the images into 8 separates: 1,2,3,4 + green versions
- keep a list of which array-indexes are “currently selected”
- add touch-stopped logic to reset all green images to grey by iterating over the list of currently-selected when let go
- add an array of the number values
- use the correct images for each number
- change the image-changing code to change the images to green versions
- add a target number label at bottom of screen
- add touch-stopped logic to calculate whether sum == target
- add a label at bottom of screen of score
- update score with += (10 * correct sum / time in seconds taken to get it)
- fix allImages to be fully dynamic array
- resize the images (imagemagick? or in an on-the-fly way) to fit 4 across and 4 down
- add icon image for app
- need to call “set menu bar dispay == false”
- selected numbers are removed and unselectable once a correct sum is given
- -== MARK this is where I switched from alpha to beta (new Xcode project) ==-
- make background black!
- make the clear-screen-gives-bonus-resets work, see if its fun
- make the TARGET much more prominent, huge even, at top of screen
- add a RESTART button for when player cant continue
- track the highest score so far in the current play-session
- move all source graphics into a safe place
- fix artifacts on numeral graphics
- FIXED – check the touch bounds – I think its 320×320 by accident somehow
- FIXED – can select the first item of next row by clicking off RHS edge of last col
- FIXED – graphic for number 3 is missing RH final pixel column (possibly)
- get Quartz primitives working at the same time as sprites
- add a timer progressbar style
- increase the timer each time the player gets one right
- add initial popover: HELP or PLAY ?
- make touchesBegan modal to handle initial HELP/PLAY dialogue
- make HELP switch-view to a help screen, with BACK button
- add HELP screen that explains how to play (probably one big static image?)
- if num-selected == 1, popup message: must select more than one number at once
- if no score after 10 seconds, popup help message on how to play
- add app description stuff for iStore
- submit to apple store!
Pending Items: (not sure if I want to add these yet; still playtesting them)
- if no correct sets left, popup message: stuck! game over
- remove the possibility of “impossible” boards (still possible to kill yourself through bad choices!)
- make the timer get faster and faster so that you cannot “play forever” and get an infinite score
- vibrate each time the player gets one wrong
- add an animation cycle for wrong answers that temporarily paints them in a red colour
Rejected Items: (features that I thought of originally but later decided it was more fun without them)
- add touch-accept logic to refuse the additional selection based on context
- change the background colour – black through to red – as timer ticks down
- if incorrects in a row > 2, hilight a correct set
- randomly pick target using LEGAL options, and change when correct
Remaining Bugs: (due to be fixed in next update)
- change last line of cells to pick not “average” but “smallest viable” first to reduce number of impossible boards
- NB: the way the board algorithm works, the first 3 rows are completely random, and the final row is carefully picked to make sure the whole board is a multiple of the TARGET number;
Coding for the iPhone has been a fascinating experience, and I’ve been taking lots of notes as I went along. Expect a veritable PLAGUE of iPhone development blog posts soon ;). The ultra-quick summary would be something like:
1. Programming for the iPhone is great fun.
2. Objective-C is a poor language, and lets the phone down.
3. The frameworks / libraries that come with the iPhone are *mostly* very good – about as good as the better standard-libs from Java (J2SE, not J2ME!)
4. the IDE is about 99% working, but is missing perhaps as much as 50% of the functionality of today’s standard IDE’s (!)
5. the dev/distribution system is about 90% working, and the other 10% can easily take you many days just to “upload a binary” (!)
It took me a bit longer than 2 hours and 40 minutes to make, and *days* to workaround the problems and bugs in Apple’s systems, but once I’ve learnt the rest of the libraries (I haven’t worked out sound, video, web, networking, complex animation yet) I reckon I’ll be able to make new games quicker than in java but not as quickly as in Flash.