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 / Detecting platform

Author
Message
Dundarack
7
Years of Service
User Offline
Joined: 22nd Mar 2017
Location:
Posted: 25th Mar 2017 13:24
Tier 1 - what's the best way to detect the current platform code is running on?

Also can you do conditional compilation that is platform specific?

In general do multiplayform projects just work ok or do you need to customise slightly within your code for each platform?

Interested in people's responses to this..

I'm coming over from GLBasic and it was possible on that to do this..

Regards

Dundy
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 25th Mar 2017 16:15 Edited at: 25th Mar 2017 16:16
GetDeviceBaseName
Returns a string containing the name of the current platform. This will only refer to the base platform, i.e. "windows", "ios", "android", "mac", or "blackberry". Use GetDeviceType to get more information about the specific device. This string will always be lower case.

If the command doesn't contain "Raw" then it should work on all platforms.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Dundarack
7
Years of Service
User Offline
Joined: 22nd Mar 2017
Location:
Posted: 25th Mar 2017 23:22
Thanks for that reply .
tmu
7
Years of Service
User Offline
Joined: 2nd Feb 2017
Location:
Posted: 26th Mar 2017 19:50
What Batvink said. Generally most commands are fine, you know when you go do weird stuff something might need extra testing but generally it has been fine for me.

One thing where you need to customize per platform is the GameCenter configurations. So if you set achievements, leaderboards, etc.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 26th Mar 2017 20:26
Another thing you will need to do specifically for Android is to download a zip file for all your assets.
Google Play only allows apps that are under 100mb. Once your app starts you need to download your
assets in a zip file and unzip them.
The coffee is lovely dark and deep,and I have code to write before I sleep.

Login to post a reply

Server time is: 2024-04-23 13:43:20
Your offset time is: 2024-04-23 13:43:20