Posts Tagged ‘iPhone’

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 freesound.org. 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.



iPhone apps for learning Japanese

Thursday, December 17th, 2009

There are many different ways you can learn a foreign language such as Japanese. There are classes, textbooks, CDs, applications for your PC or Mac, podcasts, language exchanges etc. Now you can learn Japanese on your iPhone and iPod Touch as well.

I’ve tried many different iPhone Japanese learning apps and am going to review the five apps that are still installed on my iPod Touch! In other words the apps that I found useful enough to keep.

Human Japanese – Version 2.0

Human Japanese is a bit like an interactive textbook. It has chapters covering loads of topics such as verbs, questions, numbers, kana (hiragana / katakana) and particles. In the current version there are 40 chapters dedicated to learning Japanese and another 6 chapters of cultural information about Japan.

human japanese iphone

Human Japanese works you through the various chapters starting from complete beginner level. As well as reading the Japanese words, each word or phrase can be clicked on to allow you to hear how a Japanese person would pronounce it – very useful.

To help cement what you have learnt many of the chapters have multiple-choice quizzes where you can test your English to Japanese and Japanese to English skills.

This is a very well put together application. There is a free version available to download from the app store with a limited number of lessons. If you like it you can buy the full version.

Download from iTunes: Human Japanese – Brak Software

Kotoba Japanese Dictionary

If you are learning Japanese then you’ll definitely need a dictionary. Paper dictionaries can be slow to use and are bulky to carry around.

To solve these problems you can get Kotaba – it is a full Japanese dictionary for free!

As you’d expect there is a search facility where you can type in an English word and you’ll get a list of results in a few seconds. You can also type in the Romanised version of the Japanese word (e.g. watashi, chika) and you’ll get the Japanese words that match.

Kotoba Japanese dictionary iphone

For Japanese words Kotoba will give you the Kana version (in either Hiragana or Katakana), the Romanised version (useful if you haven’t yet learnt the kana) and the Kanji. For words that are composed of multiple Kanji the dictionary will break the Kanji down into their component parts.

For each Kanji Kotaba gives you a whole list of supplemental information which can be useful if you want to look the Kanji up in a textbook.

If you want to save a word for later then you can add it to your ‘favourites’ list – a great feature when you are trying to learn the language. There is also a history list that shows you which words you have recently viewed.

I have just one suggestion for a future version – that is to allow the favourites list to be exported or saved – I’d find it quite handy to be able to save the list to my laptop or print it out.

I can’t fault this iPhone Japanese dictionary – it is free and extremely useful.

Download from iTunes: Kotoba! (Japanese dictionary) – Pierre-Phi di Costanzo

Japanese Pod 101 – Newbie Lessons 1-25

This iPhone / iPod Touch app comes from the people at Japanese Pod 101 who do great podcasts for learning Japanese. They have loads of podcasts available to download for free and more learning material available for people who subscribe.

They have released some of their more structured lessons in the form of iPhone applications.

If you do a search for these applications it is a bit confusing to work out which app to get. There are a whole series of applications from them with very similar sounding names and very little description as to the content. For example some of the apps are listed as ‘begginner’ and others as ‘newbie’. Is one of these supposed to be more advanced than the other? I’ve no idea – but I took a chance with the Newbie lessons 1-25.

This has 25 different audio lessons – each is about 6-8 minutes long. You are meant to follow the lessons from the beginning. For each lesson you can listed to the audio as a single track or you can play it line by line. There is also a brief write up for each lesson, vocabulary lists, flashcards and grammar points. Words that you have trouble with can be saved to the Word Bank to look at later.

japanesepod101 newbie 1-25 iphone

As with all the learning material from japanesepod101 this is a good course to help your learn Japanese. The audio has been put together very professionally.

There are a few suggestions that I have for the makers to make this better.

  • Make it easier to distinguish between the many apps with very similar names. It is confusing working out which one to buy in the app store.
  • The audio lessons are very professional with proper voice actors and good sound quality. However the lesson write-ups look like they have been done in Notepad. They could do with some formatting to make them look better.
  • The 25 lessons don’t have proper names – they are just called ‘Lesson 1’, ‘Lesson 2’ etc. They should have names that indicate the topic of the lesson to make it easier to find the one you want when you go back through them later.
  • As the audio is in an app rather than as an MP3 playing through the normal iPod music player you have to keep the iPhone/iPod Touch screen on to listen to it. It you press the power button to switch the screen off (as you would when listening to music) the audio stops. I imagine that there is nothing that can be done to fix this as I don’t think Apple allow apps to run when the screen is switched off. However I’ve found that it is still possible to listen to the podcasts when my iPod is in my pocket as fortunately the play/pause button is very small.

Overall this is a good set of Japanese lessons – but a few tweaks to the app could make it much better.

Download from iTunes: Pocket Japanese – Newbie I (1-25) – Innovative Language Learning, LLC

Japanese Essentials by AccelaStudy

There are different ways of remembering foreign language vocabulary. One way is to use flashcards that show you a Japanese or English word. You have to then recall the translation.

This is what Japanese Essentials does. It has categories of word lists that you can choose from (shopping, colours, numbers, etc). You can choose which ones to revise and test yourself on them.

accelastudy japanese learning iphone

Japanese audio for each word is provided so you can hear how the words are pronounced.

You can choose to study the flashcards one by one, do spaced repetition and do a quiz.

This is a very simple application but does what it does well. There is a free version with a limited number of words and categories, and a full (paid version) with 2100 words in 65 categories.

Download from iTunes: AccelaStudy® Japanese | English – Renkara Media Group, Inc.

Beginning Japanese Words & Phrases

Japanese Words and Phrases is an interesting app which allows you to learn in several ways.

There are many categories containing lists of words. You can look at the whole list, or learn the list one by one using flash cards. Japanese audio for each word or phrase is provided. Words can be saved to the Study Bank for later. When you have learnt the words you can test yourself using the built in quizes.

japanese words and phrases iphone

As well as the words and phrases you can work through the built in lessons on a number of topics.

There are lessons on the Hiragana and Katakana phonetic alphabets which if you are serious about Japanese you’ll definitely need to learn.

Then there is a Grammar Fast Track 100 containing 100 pages of information, each one about a particular grammar point. For example one is about verb forms and another is about counters.

There is a lesson that gives an introduction to a small number of Kanji, and there are some miscellaneous lessons on family words and polite Japanese amongst others.

I don’t find I use the flashcards much but I have been finding the grammar lessons interesting – Japanese grammar can be tricky!

There is a free version of this app available with a limited subset of features and the full version has everything described above. Another recommended app for your iPhone if you want to learn Japanese.

Download from iTunes: Japanese Phrases & Lessons – TheJapanesePage.com