Sunday, October 17, 2010

iPhone Port kicking!

I created an iPhone port for the Shoot engine. Here are the steps I took:

- I bought a mac mini and joined the Apple developer program
- I first created a C++ static library project under XCode that contains all the engine code
- I implemented an OpenGL ES version of the graphics driver
- I had problems using SDL from whiting the static library so I completely removed it and used a modified SOIL library for loading textures.
- I implemented a cross platform File access class that is transparently used to read resources (xml, images, meshes, etc.) on both iPhone and Windows platforms.
- I created an OpenGL ES application and invoked the engine from it

Generally speaking things went smoothly, but not as much as I would have wanted. It was painful to get rid of SDL for which I relied on for loading textures, but on the other hand it was a great experience to integrate texture loading code straight into the engine. Now Shoot has native support for .bmp, .jpg, and .tga formats on both Windows and iPhone platforms!

On a personal note, I do not like developing on mac a lot. I find the environment cute but not very functional and sometimes frustrating. But this is coming from a first time mac user.

No comments:

Post a Comment