Posted: 12th Aug 2011 13:13
Quick question... If I write up my game in C++ using the Tier 2 architecture in a Windows environment, can I still compile my game across say, an Apple computer, an iPhone and a Windows PC all at once?
I've been reading places that I'll still need to use Apple's XCode editor to compile the game for iOS, but will I be able to cut and paste the code out of Windows and into iOS and run it, or will I need to re-write parts of it? I just would like to know if it really will be a write once, deploy everywhere environment like they say...
Posted: 12th Aug 2011 14:23
When using Tier 2 you may choose to start your development on any of the supported platforms, for example, Windows using Visual Studio. At this point your project will only run on Windows. If you want to run this on iOS you will need to use Xcode, set up a project using one of our templates, copy your code in, your media and then compile and run. This process will need to be repeated for other platforms. There is no need to make any other changes.

A few days ago I had to handle this for all the Tier 2 examples, which were originally set up in Visual Studio. For each platform I made new projects, copied the code and media in and was ready to launch.
Posted: 12th Aug 2011 22:42
If you want to run this on iOS you will need to use Xcode, set up a project using one of our templates, copy your code in, your media and then compile and run. This process will need to be repeated for other platforms.


I'm trying to follow this correctly but you're saying that if we can write the code out in Xcode, then copy that exact code out and put it in Visual Studio, it will still run just fine?
Posted: 13th Aug 2011 0:26
It's rarely the case that it will compile straight away, but if you make sure you don't use any platform or compiler specific features, just standard C++, you should only have to deal with minor changes.
Posted: 13th Aug 2011 9:12
I just used regular C / C++ code along with AppGameKit function calls in the examples. No changes were needed when I moved the code to other platforms.

As Diggsey mentions don't use any platform or compiler specific features. If you follow that you should be okay.