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 / Tier 2 cross platform?

Author
Message
NickJE
9
Years of Service
User Offline
Joined: 10th Jan 2015
Location:
Posted: 10th Jan 2015 14:12
Hi all

I recently purchased AppGameKit on Steam and started coding with Visual Studio. However, I just noticed this on the website:
"Providing you stick with the AppGameKit command set, your working source code is guaranteed to compile across all the platforms we support." - http://www.appgamekit.com/go-native.php

I'm a bit confused. Can I use data types in C++, such as integers and characters? How about arrays? Or should I be using the AppGameKit commend set for everything if I wish to keep it cross-platform?

Thanks
Nick
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 10th Jan 2015 17:38 Edited at: 10th Jan 2015 17:39
Welcome NickJE,

Im not using Tier2, but im 100% sure you can use data types in C++, such as integers and characters and build cross-platform app's.

In c++ you can use other libraries too and in Tier1 you can only use the build in commands (for now i hope)
I think, they mean that, you must make sure yourself that the "extra" library is also "cross-platform able".

Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 10th Jan 2015 17:43
janbo's right. It's also worth considering that not all platforms may have the same support for modern C++ (C++11 & C++14) so it might be worth steering clear of new features unless you're sure they're supported on all your platforms.

NickJE
9
Years of Service
User Offline
Joined: 10th Jan 2015
Location:
Posted: 10th Jan 2015 17:45
Exactly what I wanted to know. Thanks for your help guys.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 11th Jan 2015 01:13
I use the same 40+ .cpp/.h files for all platforms without any issues.

And lots of OOP and custom structures and such and all work fine.

Due to Android limitations (doesn't apply to any other platform), objects/functions that are defined in C++ 11 do NOT work.

I repeat, this is an Android limitiation, not an AppGameKit one. At least, that was my experience.

Cheers,
Ancient Lady
Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 11th Jan 2015 10:01 Edited at: 11th Jan 2015 10:01
Quote: "Due to Android limitations (doesn't apply to any other platform), objects/functions that are defined in C++ 11 do NOT work."

Really? I thought you could get these features simply by adding

to Application.mk. I can't say I've tried it in production code though.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 11th Jan 2015 20:51
I tried that as well. But attempts to use std::map (a C++ 11 object) failed on Android.

I also tried using a different Android NDK that does support C++ 11 (I can't remember the name at the moment), but it was not compatible with AGK.

This is all based on work I did in AppGameKit V1.

A quick google shows me that maybe the newer Android NDK might not have the same issue.

It is something that I need to investigate.

Cheers,
Ancient Lady
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 16th Jan 2015 01:34
I confirm what Ancient Lady said.
This is one of some reason i don't release for Android.
C++ don't work as expected. NDK builder is the main problem, after Java

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 17th Jan 2015 19:46
Quote: "C++ don't work as expected."

Mostly it does. As long as you don't go with C++ 11 or 'newer'.

I haven't worked with AGK2 in Android, yet. But AGK1 and Android worked fairly well for me.

Cheers,
Ancient Lady
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 19th Jan 2015 00:12
Same here never had problems with AGK1 and Android, all my C++ code worked fine and compiled without any major changes
Miguel Melo
18
Years of Service
User Offline
Joined: 8th Aug 2005
Location:
Posted: 19th Jan 2015 19:55
So, what other stacks does C++11 work well with? iOS and OSX?

Cheers,

I have vague plans for World Domination
Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 19th Jan 2015 21:27
I'm curious that you guys have had such trouble with C++11 on Android. And I'm especially curious about your problems with std::map AL, because that's not even C++11! Like I say, I can't claim to have used C++11 in any of my shipped Android apps, but I just tested std::unordered_map and lambdas using AppGameKit V1 and they compiled and ran fine. Which particular C++11 features have you had trouble with?

Quote: "So, what other stacks does C++11 work well with? iOS and OSX?"

I've got no experience with iOS or OSX so I can't say on them. Like I say, Android is working fine for me at the moment. I've also found VC++2013 to be pretty good on C++11. It falls down on some more modern TMP features, but other than that, I've found it to be fairly solid.

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 20th Jan 2015 17:39
On Android i confirm that C++ don't work as expected!!!
This is why i don't use Android but only iOS/MAC.

Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 20th Jan 2015 21:24
Quote: "On Android i confirm that C++ don't work as expected!!!"

How do you mean? Are we talking about compiler issues here or runtime errors?

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 21st Jan 2015 03:15
Lucas, it wasn't std::map by itself. There are some methods that are C++ 11. It was either one of them I couldn't use or it was one of the other container types. I thought it was std::map, but it might have been another one.

But, I know that I finally came to the conclusion that C++ 11 stuff didn't work right somewhere between AppGameKit and Android.

Cheers,
Ancient Lady

Login to post a reply

Server time is: 2024-05-05 05:38:12
Your offset time is: 2024-05-05 05:38:12