Well, I’ve mostly finished up some mysterious projects and am hoping to have more time to do random junk like post here.
One of the secret missions was an iPhone port of a popular PC 3D shooter. The reason this went so smoothly is… I didn’t write it on a mac!
Why write iPhone stuff on a PC?
Two words: Visual Studio.
I don’t really have anything (major) against Apple’s Xcode, but hey, I’m just more productive with the IDE I spent the last ten years with.
My handy-dandy Win/iPhone cross-platform development kit
I’ve had a few questions about my setup, so I’ve put together a basic framework showing how you can cleanly develop in a cross-platform way.
If you are writing a GL ES game, don’t need much in the way of the iPhone UI frameworks, and want to keep your code portable this can work out great.
Keep in mind you can basically use any C++ library out there on the iPhone with a little tweaking.
Here is the simplest GL ES project you can imagine, ready to run under VS and Xcode/iPhone – you just need to share the drive it resides on with your OSX box or vice-versa.
Here is the Programmer Readme.txt it comes with:
** Seth’s basic framework for cross-platform iPhone development **
This barebones framework gets you started by:
* Processes multi-touch input using the MessageManager from both OSX/iPhone and Windows (there is no GUI or anything, so you can only see
it is even doing anything by watching the debug messages)
* Sets up GLES for direct, fast rendering
* Handles coordinate and GL rotation when the phone is rotated (or L and P on Windows)
* Same source runs on windows, OSX/iPhone, only a small amount of platform specific “glue” is used, and is isolated
* Clean separation between shared files and app-level files, shows the organization I usually use
* Because we link to the PowerVR emulator library, we can also handle PVR compressed textures, exactly like an iPhone does
* Some helpful batch files including in RTApp/scripts to handle some boring tasks
To run included windows .exe: Double click RTApp/bin/winRTApp.exe
To compile on windows: Open the RTApp/windows/RTApp.sln file with Visual Studio 2005 or newer. You might have to set the “start in” directory to ../bin when running from VS.
To compile on iPhone or OSX: Use XCode to open the RTApp.xcodeproj file.
A requirement to run on windows is to install the PowerVR GLES1.1 emulation SDK.
After installing, copy the contents of the PowerVR_EMU/Builds into shared/win/PowerVR. (You will need to make that directory..) After that, the windows version
should compile and run. Alternatively, just tweak the VS project settings to use your PowerVR paths.
You should probably also locate the libgles_cm.dll and update the one I have in RTApp/bin with it as well.
For hassle free cross platform sound, I used FMOD (not in this starter kit).