Hacker News new | ask | show | jobs
by SeoxyS 4786 days ago
This is an admirable effort, but I would not recommend ever using this in practice. I am saying this from experience: I wrote a game engine on top of UIKit, which I spent months trying to fine-tune before finally ditching it and re-writing everything to use Cocos2d.

The performance aspect is just not there. Once you get to a game with a large number of sprites and animations, animations will jitter and glitch. You're really going to be stretching what Core Animation can handle.

What I usually recommend these days is to use Cocos2d for your main game view, but using UIKit for the rest of the interface (menus, score screens, etc.).

2 comments

The performance of MBTileParser is fantastic. I've profiled map loading to take under 300 milliseconds. I wouldn't necessarily use this for an action game, but for RPGs, this is more than sufficient.

With a UIKit engine, you don't have to deal with OpenGL and UIKit fighting for performance.

Yeah, I wonder why you would even try this when something like Cocos2d already exists and is awesome.
Cocos2d (at least when I was using it) engendered some really bad anti-patterns in regards to memory management and architecture. MBTileParser doesn't just offer a way to show graphics onscreen, but it considers the MVC architecture in a way that cocos2d doesn't. (When I started, cocos2d was somewhere between 0.9 and 1.1. The state of the engine has very likely improved since, but that's why I wrote this.) Cocos2d didn't even support ARC back then.