I have an idea for a kids’ game (though there’s quite a bit of competition out there on the App Store!). The question I’m debating is whether I should implement it as a 2D game or a 3D game. It would only have a fixed camera position, but I’d like some depth to the world, so that characters going up the screen go into the distance, and can then go behind other characters or objects. From Wikipedia’s 2.5D entry, this could be considered “scaling along the z-axis”. I actually haven’t found any games with that sort of view, perhaps because a 2D model looks dodgy (see below), and by the time you have a 3D model, there are so many cooler things you can do with one. Here are the options I’m considering:
This basically comes down to Cocos2D. I put some code together using Cocos2D for iOS, based on Ray Wenderlich’s tutorial for an animated bear, and made the bear smaller if it goes up the screen and bigger if it comes to the front. This looks pretty good and is quite simple to do, as long as the bear is not going mostly up or down the screen. In that case you’d need more animation sequences so the bear faces towards or away from you. But what if you go on a diagonal away from you or towards you? I think you’d need those sequences too. That’s quite a few sequences, and of course whereas any walking angle would be allowed, graphically it would have to snap to one of the 8 available animations. So the problems with this approach are:
- I couldn’t use freely available art (like Vicki Wenderlich has available)
- It won’t look awesome – and I’m not sure it will even look good enough.
Also, no 2D physics engines (like those that come with Cocos2D) would work, since the gameplay is not actually 2D. In my case I don’t plan to have any complex physics, so I can make my own. Potentially though I could use a 3D physics library like Bullet.
I think this basically comes down to Unity3D (and perhaps Unreal, but I can’t use this on a Mac so it is less appealing), although there are a few other related options out there too. Unity3D is amazing, there are lots of 3D graphical assets available on their asset store, and compiles cross-platform to boot. I have succeeded in building my own terrain in its editor, putting in an eerie sky and swaying grass, and can compile a game to my iPad which lets me look around it (in a first person view). I followed a youTube demo for this from TechZone. I have also read about ways to layer native iOS elements on top of this – Millipede gives a good explanation of this here, and their Navy Sink’Em game is the best example I’ve found of the camera angle I want, though I didn’t intend that level of realism. Adding a iOS front-end to a Unity project is also covered by this Blurst post. The problems with a Unity3D approach are:
- Troubleshooting how to do things in Unity is probably harder than I’m used to with Cocoa.
- Will take some learning how to communicate between Unity and iOS.
- I can imagine the project flow getting quite complex as I want the player to be able to add assets to the scene, and associate scripts with them. I probably want an iOS interface to do this, which would need to display Unity assets.
- Costs a bit.
- I don’t like being forced to use a new development environment, and being locked into Unity’s world.
The other 3D options include:
Cocos3D. There is very little online about this – no tutorials. It also comes with the caveat that it “is not yet compatible with cocos2d 2.x. Please use cocos2d 1.x.”
SIO2. I have just come across this here. It looks promising, as it does not force you into a particular SDK. I have not investigated this in detail.
I think I’m biting off more than I can chew right now if I try to make a grand 3D game. So I will adopt the 2D framework for now and try to get a good game logic happening. Perhaps even give up and modify the game flow so that it is a true 2D game (with parallax of course… I always loved Moon Patrol). Then, if that doesn’t look good enough to release, come back to Unity.