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.

Android / Physics behaving differently on android player compared to windows

Author
Message
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 8th Oct 2012 14:00
Yes, put it all in topic I guess. I'm working on a game that involves controlling a fish in sideview swimming about.

The issue:
I'm using dampening and changed gravity (to something higher than I've ever tried) to 3.9, this seems to emulate water pretty well for my model and it works great trying it on windows. But trying it with the latest android player on my S3 the fish sinks much faster than it should. Also some sprites weren't showing and the text was very strange. Oh and some particles weren't showing up (using the same image as another particle that DID show up)

Anyone know what the problem is?

My hovercraft is full of eels
MarcoBruti
12
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 8th Oct 2012 14:59
I had the same problem with gravity for my physics platformer Mr Otto Beat. I patched the issue with these few lines of code:


The code detects if the platform is a Windows PC, and, if yes, diminishes the gravity value. On Android gravity seems less effective than on Windows, so we have to set an higher value to prevent the character from jumping too high.

Of course a long term solution, i.e. understand exactly how to tune the physics parameters, would be good, but I had few time to investigate in forum or by myself. Anyone has got any idea?
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 8th Oct 2012 16:00
That's interesting. But my problem is that the gravity is stronger on android. This makes me wonder if the issue is the mass of the objects are different on the different platforms and not the gravity.

My hovercraft is full of eels
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 8th Oct 2012 21:54
Have you checked the frame rate on the droid device?

But its true that there seams to be an android bugg on box 2d.

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz
MarcoBruti
12
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 8th Oct 2012 22:54
the big problem is that the same game may be unplayable depending on the particular Android platform. Anyway on my game FPS was 60fps, maybe @lilpissywilly (!) could check, but I suspect that it does not depend on fps.
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 9th Oct 2012 06:40
Yeah I had 60fps too. Anyone know if these things are being worked on? I'm all for getting 3d to agk but what's the point if what's already implemented doesn't work right. If I just wanted to deploy on windows I would use DBP

My hovercraft is full of eels

Login to post a reply

Server time is: 2024-04-26 14:01:48
Your offset time is: 2024-04-26 14:01:48