Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Write once, REALLY deploy everywhere?

Author
Message
CumQuaT
AGK Master
14
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
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...

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
Mike Johnson
TGC Developer
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
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.
Neuro
21
Years of Service
User Offline
Joined: 17th Aug 2003
Location:
Posted: 12th Aug 2011 22:42
Quote: "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?
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 13th Aug 2011 00: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.

[b]
Mike Johnson
TGC Developer
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 13th Aug 2011 09: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.

Login to post a reply

Server time is: 2024-11-23 12:18:05
Your offset time is: 2024-11-23 12:18:05