Physics fps Increase on Touch

Hello all.

I’m running into a weird problem. This only happens on an actual Android device that I know of. I do not have an iPhone so I cannot test it and it does not happen in the simulator. I have tested with two Droid Incredibles with 2.2 and a Droid Eris with 2.1.

Whenever physics are enabled, if I touch the screen, it appears as if the frames per second increase.
I thought I might have a bug in my code causing this, but then I ran the ManyCrates example from the Sample Code. The same thing happened.

To elaborate a bit more using the ManyCrates example, when I start the app on my phone, all the crates start falling normally.
When I touch the screen they fall and animate much faster. When I touch and drag my finger across the screen constantly, they fall almost twice as fast as the normal. It doesn’t look like gravity is being altered or anything, just how fast objects animate.

Is this a bug or is there an Android setting I am missing?
Not sure if this has been brought up before, but I did not see anything in the forums about this.

If you need any more info, let me know.

Thanks,
Justin [import]uid: 8688 topic_id: 2401 reply_id: 302401[/import]

I have the opposite problem. I noticed that if I touch and move my finger on the screen while my game is playing, fps drops. I noticed that the garbage count increase a lot when I touch the screen. I do not have any Runtime listener for touch, I just have a button created with the ui library (obviously the problem happens when I do not touch the button but the other parts of the screen). This is on iPhone and iPod though :). [import]uid: 8486 topic_id: 2401 reply_id: 7195[/import]

I have the same issue!
On my Samsung Galaxy S, built for android 2.0 [import]uid: 9577 topic_id: 2401 reply_id: 7343[/import]

Has there been any updates on this?
We are nearing the completion of our first game and this will really set us back if there is no way to fix this since 90% of our game requires the user to touch and swipe across the screen.

Thanks. It’s been a pleasure using Corona so far!

Justin [import]uid: 8688 topic_id: 2401 reply_id: 8614[/import]

Hi,

on our HTC Legend Android 2.1 the whole physics slows down when a touch event is fired. On our Samsung Galaxy S Android 2.1 the physics speeds up when a touch event is fired. This is definetly something that needs to be fixed!

Thanks,

Michael [import]uid: 8121 topic_id: 2401 reply_id: 8845[/import]

Are you all sure its the physics that are speeding up / slowing down stuff?

I noticed that objects would speed up when the screen was touched, but I wasnt even using the physics system- I was just doing a simple frame-based animation of an object, so I excepted it to look messed up (although, I expected it to be slowed down not sped up).

Anyway, this is kind of worrying news for someone who has just decided to devote time to learning this SDK. I hope its just user error. :>

[import]uid: 9562 topic_id: 2401 reply_id: 8929[/import]

Has anyone heard anything or figured out anything about this? I am now using the physics system and seeing the problem… This is a deal breaker, has anyone solved this problem? What about the corona games already in the store/market? [import]uid: 9562 topic_id: 2401 reply_id: 9204[/import]

On HTC Dream (Google G1) with Android 1.6 the physics speed up on touch. [import]uid: 5712 topic_id: 2401 reply_id: 9210[/import]

I have not heard from Ansca yet regarding this issue.

I was able to test this on my iPod Touch and there are no issues. Definitely seems like an Android-only issue.

Does anybody know what the typical frame rate is for Android devices? Are we shooting for 30fps or 60fps? Upon running some more tests, it appears to be running at 30fps normally, and then jumps up to 60fps while touching.

I have built a few Android apps natively, but this is my first experience building a game. [import]uid: 8688 topic_id: 2401 reply_id: 9212[/import]

I dont know if anyone else already did, but I filed an issue about this. Does anyone have any corona games in the market currently?

http://developer.anscamobile.com/issues/3150

[import]uid: 9562 topic_id: 2401 reply_id: 9333[/import]

I just built bricky6 from the sample code and installed it to a droid x- it has the same problem of overall speed increasing on touch.

[import]uid: 9562 topic_id: 2401 reply_id: 9374[/import]

It is either increase or slow down. It depends on how fast you have set the physics rate. [import]uid: 5712 topic_id: 2401 reply_id: 9420[/import]

What do you mean MikeHart? Are you talking about setScale()?

The problem we are all describing is that when touch events occur (Android only), the speed of the game changes.

What setting would cause that behavior?
[import]uid: 9562 topic_id: 2401 reply_id: 9424[/import]

Yes, and the touch should not effect it. But to describe what I said… in my test when I set it to 30 fps, it speeds up during a touch. Setting it to 60 fps, it slows down on Android.
Definately something AM should look into. [import]uid: 5712 topic_id: 2401 reply_id: 9426[/import]

Ah, thanks for the clarification. [import]uid: 9562 topic_id: 2401 reply_id: 9428[/import]

Hi everyone,

This is first I’ve heard of the problem and will look into it. I assume this is happening the on latest released GE version?

Thanks,
-Tom [import]uid: 7559 topic_id: 2401 reply_id: 9748[/import]

Yes, actual release version with project build on Android 1.6 [import]uid: 5712 topic_id: 2401 reply_id: 9752[/import]

We were able to duplicate the problem and found that the issue is also present on the Corona SDK when building for Android devices.

Normally Display Objects are updated at 30 or 60 fps but when a touch occurs on Android, an update is performed sooner – speeding up the display world. You can see that same thing on the Fishies sample. If you touch and hold the screen, the fishies swim faster.

We will implement a fix in our next release.

Thanks,
Tom [import]uid: 7559 topic_id: 2401 reply_id: 9772[/import]

Hi,
I have kind of same problem with my movieClip when I build it on Android phone Samsung Galaxy S.

So I’ve tried the movieClip project, everything work fine on iPhone 3 & 4, but when I tried it on my device (I didn’t try it on other android device),
when I drag a movieclip (the spinning box) everything accelerate.
The box are spinning faster and the bounding box is moving faster.

i’m not sure I’ll be able to wait for the next release.Will it be ok if I use sprite sheet ?

Thanks

[import]uid: 10562 topic_id: 2401 reply_id: 10013[/import]

reazle, no it wont be ok until the fix is deployed. [import]uid: 9562 topic_id: 2401 reply_id: 10015[/import]