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 / WHY does this give a different result on android than it does on pc

Author
Message
micky4fun
10
Years of Service
User Offline
Joined: 15th Sep 2013
Location: uk essex
Posted: 6th May 2014 05:24 Edited at: 6th May 2014 05:25
Hi all

just wondering if someone can explain why this code give a stable result on a pc but a varied results on android using android player or converting to an apk , the ball ends up at random places on android , but same place on pc , press space to fire cannon



thanks
mick
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 6th May 2014 05:31
It's all to do with sync rate / dropped frames.
Paul's elegant method to help this is like so:


Just put that in your loop and it should be all good unless there are errors elsewhere. I use this and the sprite falls in the same location every time on multiple different devices.

micky4fun
10
Years of Service
User Offline
Joined: 15th Sep 2013
Location: uk essex
Posted: 6th May 2014 05:55
Hi All

Thanks Naphier for your quick reply , but I have just tried the code snippet in my main loop but still gets the same results , can you show the code snippet inserted into my code so I can see how you have done it

thanks
mick:
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th May 2014 06:06
Also, you don't use SetDisplayAspect and SetVirtualResolution together. The first command is meant for use in the Percentage display mode.

That might be causing some issues.

Cheers,
Ancient Lady
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 6th May 2014 06:27 Edited at: 6th May 2014 06:33


EDIT I think I forgot something...
Forgot to add what you want the physicsstep# to be... sorry about that!
Ugh I also forgot if (count >=4 ) then time# = timer() and the initilization of timer# outside of the loop... Sorry for the mess

micky4fun
10
Years of Service
User Offline
Joined: 15th Sep 2013
Location: uk essex
Posted: 6th May 2014 15:46
hi all

Thanks Naphier for the speedy update , thought it was me , usually is , works a treat now also thanks for the heads up Ancient lady , will make sure only to use setvirtualresolution from now on

thanks again for both your speedy responses and time

mick

Login to post a reply

Server time is: 2024-05-02 17:40:46
Your offset time is: 2024-05-02 17:40:46