Continue reading Drawing animated shapes and text in Core Animation layers
Tag Archives: iPhone
Creating a physics-based OpenGL iOS app
With the success of iOS games like Angry Birds and its flocks of imitators, there are lots of people looking at creating physics-based games, so I decided to try and create a simple demo using OpenGL ES and the Bullet physics engine.
Continue reading Creating a physics-based OpenGL iOS app
Sneaky peek: Physics on iOS
I’ve recently been experimenting with the Bullet physics library on iOS. It’s a great way of adding 3d collision detection and realistic looking movement to your OpenGL apps and games. I’m working on a full blog post with all the details, but in the meantime, here’s a quick look at what I’ve been doing: a simple 2.5d ragdoll character running on the iPad simulator.
Continue reading Sneaky peek: Physics on iOS
Creating an iPad flip-clock with Core Animation
As part of the sliding puzzle game I’m developing for the iPhone and iPad (well, I can’t survive on the profits from BattleFingers forever), I looked for a way to represent a numeric score and time display in an interesting way. One of the nicer visual effects you could use for this is the “flip-card clock” style, where each number consists of a top and bottom part, and the top part flips down to reveal the next number. It’s been used in a few other places including the home screen in the HTC Diamond device, and its physical, realistic style fits well with the iPad, so I set about creating a version for the iPhone and iPad using the built-in Core Animation library. Read on for more details.
Continue reading Creating an iPad flip-clock with Core Animation
iPad – The rise of the naturalistic user interface
It was fascinating to see Apple unveiling its new iPad hardware recently, and one of the things that caught my eye were the interfaces of the various apps that were demonstrated. They look different from apps on other platforms, and even from the equivalent apps on the iPhone. It seems to me as if there’s been a change to a more naturalistic style of user interfaces. Why is this, and what is it about the iPad that makes it suited to this kind of UI?
Continue reading iPad – The rise of the naturalistic user interface
Why the Peggle mobile experience beats GTA
Continue reading Why the Peggle mobile experience beats GTA
BattleFingers is here!
Well, I’ve done it: I’ve got my first game live on the AppStore. It’s been an interesting journey. I’m terribly bad at getting my hands on devkits and SDKs, having a play with them and then not doing anything constructive. This dates way back to things like the Playstation NetYaroze, which was pretty expensive, and with which I failed to produce anything concrete. So this time around all the pieces were in place: shiny new “gaming” kit, interesting SDK, low cost of entry. I was determined to create!
I’ll be making a series of posts on the process and details of creating it, in the interest of sharing the fun. In the meantime, you can find out more about the game here.
Sound formats for iPhone development
Ahh, back to work today. It’s pretty tough getting back into the swing of things after what turned out to be a long break this year. While I was off I finally got to spend some time working on an iPhone game. After getting hold of the SDK a while back, it’s only now that I’ve gotten around to doing something with it.
One of the things that seemed a little odd about the SDK is it’s use of CAF-format audio files, detailed here. I got hold of a few very nice audio samples from the freesound site, but needed to convert them from WAVs to CAFs.
I thought ffmpeg might be up to the job, but the version I had didn’t list it as an avaliable output format using ffmpeg -formats
. However after a bit of digging I discovered that it is supported by libsndfile, so set about installing it using MacPorts:
sudo port install libsndfile
Then I used the included libsndfile-convert app to convert my file:
libsndfile-convert file.wav file.caf
The output format is inferred from the file extension, so you don’t have to specify it. However, when I rebuilt and ran my iPhone app using the new file, it didn’t play back. I suspected there may be something wrong with the format of the file, so I took a look to see what file reported. For the original WAV file I got
file.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 44100 Hz
Unfortunately file doesn’t work on .CAF files, but you can open them using QuickTime Player, and using the Movie Inspector window you can see that the file has the following format:
16-bit Integer (Big Endian), Mono, 44.100 kHz
So it looks like the problem may be libsndfile-convert changing the endian-ness of the file contents, from the x86-style little-endian to Motorola-ish (i.e. pre-x86 Mac) big-endian, which is a bit of a pain. According to the docs, the libsndfile API supports endian-ness manipulation, so it’s probably just the case that the helper app is doing the wrong thing automatically. I’ll look at putting together a small command line app to use the API directly and enable me to batch process .WAV files correctly.