3D Pixel Editor for iPad with source code
After a year doing mostly C++/OpenGL for client (installations and iPad games) I decided it was time to release my own app. Its a 3D pixel editor for the iPad!
Check out the free 3D pixel art iPad app
Watch the video to see it in action:
How did I make it…
From scratch, no Flash, Unity, Cocos2D or some other framework (beside some matrix classes I borrowed form Open Frameworks). Although there is some Objective C in the mix,the main part is done in C++/ OpenGL ES2. Does it make sense to do it like that? Probably not, but hey, you learn a lot by doing it that way and it is pretty fun to do, and in the end I hopefully have some performance advantages.
For the main part of the 2D interface I use a Flash like displaylist I made (OpenGL ES2/ bitmap based) . Which give me the freedom to create cool interactive interfaces like in Flash and I still have the performance of C++.
Of course you have UIkit and cocos2D etc for i-devices. But the main reason I made it is that it also runs on native mac and windows and can be implemented in Open Frameworks and Cinder etc . Open Frameworks en Cinder are both nice for quick prototyping, they really lack the ability to create pretty interfaces without to much work.
And because you eat your own dog-food, I also use it on I-devices. On the plus side, its OpenglES2, so it can be nicely integrated with high performance 3D content in IOS + if I ever want to port it to a non IOS OS, it shouldn’t be to much of a problem.
If you have done ActionScript, you probably recognize the classes, like npDisplayObject, npBitmapSprite, npBitmapMovieClip, npEventdispatcher, npEvent, npTouchEvent, npTweener etc. Its far from complete/finished. But I already used it in several commercial projects. And I implement and optimise things as I need them.
Both the interface and the 3D are rendered first in there own frame buffer object, This gives the main advantage that in most cases, you only have to render one of the two at the same time, + the cubes are rendered in a multi sample buffer (on iPad 2), with isn’t necessary for the interface . Sadly Al those frame buffers slows it a little bit down on the Ipad 1 if you have a few cubes. But if you you use a certain amount of cubes, it also becomes an advantage there.
Yes it’s a paid app, but… It was a tuff decision for me to make, I always loved to give things away for free. But hey, maybe some of the time I put in it can be paid back this way. So I can make more apps in the future.
Screw it, its free !
But no worries, even if its a paid app in the app store , I still decided to open source it. And if you read my blog and have an iPad, you probably can figure out how to build it (it’s a complete xcode project)
You get the source code here (Of course, buying a copy would be appreciated )