So you want to make a 2D game full of real 80s technology: sprites, tiled backgrounds, parallax scrolling, and all that goodness. The last console you played a 2D RPG game in, back when you had hair, is long lost in the rat’s nest behind your TV stand. Your iPhone’s processor can run circles around that old console but you wonder… how do I do it?
Now, if you were that kind of person, you would go to the platform’s documentation site for answers. But instead you check with Google, and after a few visits to random websites and auto–cloning forums you reach the following consensus with the rest of the internets:
- You need to use OpenGL for the ultimate in both power and beginner’s frustration.
- Or better, use one of those open source frameworks that will make your transition from ActionScript a breeze. Their forums hopefully will answer any questions that the non–existent documentation cannot. Cocos2D seems popular.
- The losers that read documentation keep asking about something called Core Animation, but wiser and more anonymous users know better than to trust Apple “technologies”. Core Animation is slow, buggy, and inappropriate for anything harder than a match–3 game.
I say, not so fast. You see, I have a problem with thesis that are never proved. I especially don’t get what in that screenshot you sent me of three bats, a rat, and a stick figure is so sophisticated that requires low–level access to the hardware. So let me present you a different thesis, and then let’s try to prove it:
Thesis A: Core Animation is just fine for most 2D games.
Before we begin: no, I have no idea if thesis A is true or not. I am making it up as I go, so consider it an exploration of the capabilities and limitations of Core Animation and related technologies. If we don’t end up with a whole game, at the very least we will gain some insight into how this fundamental part of any iPhone app actually works.
It took me a while this year to go through the dozens of Thin Mints, Do-Si-Dos, and Samoas I secured last spring. I remember how hard I fought with empty promises and unconvincing pouts for just “one more box”, how I pleaded and bargained with those little evil cookie-keeper brats and their greedy families. I even stashed my very favorite Tagalongs in various hidden locations around the house so they would last longer. I was not letting anybody else, at least willingly, participate on that forbidden pleasure of licking layer after layer of sugary goodness.
You turn the iPhone off (for some reason is always running out of battery lately), and go after your friend see what’s up with all the laughing. What the…! Is that a gal wearing a mask that says “Evil”? Oh gosh, they are