Timers not accurate (online game)

Hi,
I am making a online game with the canvas component and a extension ComponentTools. The game works and online is almost done.

but I run into something. When I give the sprite a speed between1-5 and an interval of 1, the sprite on one phone is faster at the end of the canvas than on the other phone.

After long testing I found out that the real timer interval are very different on both phones.

Does anyone have tips how to give a fixed interval to the sprite or a fixed distance that it runs with at least an interval of 1? Or have a extension that would solve my timer problem?

2 Likes

Increase the interval as some phones literally cannot compute that fast.

I also faced the same issue and what I observed was devices with good processing power will be more accurate with smooth movements and for a low processing device, it will be the opposite.

This is really a well-known (very old) problem that has been discussed extensively in all App Inventor forums since 2014.

So search the forums … there are a number of solutions …

Here is one of the first approaches (early 2014):

Also see here (to compare the accuracy of the clock component with a real-time timer extension):

2 Likes