Hi, my game runs a lot faster on android then on ios, anyone had this issue before?
What do you mean by run faster. Does it run smoother or does the game's timing seem off?
timing is way off, I have a 30s timer that just count faster then the real time, I'm not using timers, I use constrains, but even where I use self time in a rule it runs faster then it should.
On Ios it's all normal.
I will try a test buld with a timer to see, will report back
Can you also let us know what device you're using?
@adent42 sure, I'm using pixel 4.
I did a test build now,
one actor with timer (every 1s change attribute to attribute +1 and display attribute)
and one actor with a constrain (constrain attribute to attribute + 12 and display attribute /720)
both run faster then they should...
Around 1.5 faster, for every 30 real world seconds they get to 45 on the display.
So I guess something in the engine?
as much as i enjoyed relearning concepts of programming logic using gs, one of its limitations i found was what seems to be an inconsistent frame rate/processing speed across several different devices.
also, someone a while ago brought up the inconsistent clock speed using interpolate compared to timer. not sure if that’s still a thing now though.
Well 50% faster is really noticeable and not a tiny difference so it will affect all games.
I'm not sure if that's what you meant but it's defiantly affect interpolate the same way, I'm not using animation but my guess that it will be the same problem.
@adent42 Hi, did you mange to check the issue?
I'm using pixel 4 XL android version 12
Not yet, gonna take a look this weekend after a few other task.
Ok thank you, please update as soon as you can, this is the only problem that keep me from publish.
I checked it and I see the problem its fester then the timer behavior - I hope adent42 will fix it..
but I have to ask you, why you are using constrain instead of timer? I know timer is more "heavy" but I don't think by that much..
@nir3112 can you explain what did you checked? as for me timer is faster as well, 50% faster then the time in the real world.
as for your question, constrain runs 60 times per second (once every one code cycles), timer runs 30 times per second (once every two code cycles).
I created an actor with timer behavior -- every 1 sec -- change attribute timer to timer+1
and another attribute called TimerCon and I added to the same actor constrain attribute TimerCon to TimerCon+12
then i displayed these two attributes like this -- game.timer.."/"..game.TimerCon/720
the results I got is that the constrain timer runs faster then the regular timer behavior..something like 1.2 sec to 1 sec on the regular timer.
About my question, so you say that if I have 10 timers it will effect the performance of my app more then if I use 10 timers with constrain?
and if I use constrains instead of timers I will need attribute to change so I'll need a lot of timer and then the game will need to load more attributes no?
So for me both timers and constrains are 1.5X faster on pixel 4, what device did you test with?
I'm not sure I understand your question, me choosing constrain over timers regarding your original question is mainly because constrain runs 60 times per second and timers when set to "every 0s" runs 30 times per second.
I'm not sure what is better to use for best performance.
I checked it on galaxy s9+
I see, I hope @adent42 will give us an update on this issue, as on pixel 4 it's not something that can be ignored.
Finally had a chance to look at this some and I can't see an obvious reason in the code for this, so it will take a bit of work to figure out. I'll keep the thread updated.
Ok Thanks @adent42 , I'm not sure if it will help but sounds and music seems to run at a normal speed (music for sure).
Hi @adent42 So after someone showed me the smooth display option, I set it to 60hz and it runs normal.
But isn't that something the device should do automatically going 60hz for the game, unless the game state otherwise?
Thanks for that pointer. That will help narrow down where I look!
I haven't looked into it yet (on something else), but thinking about it here's what should happen:
Since things are moving faster, which should not happen, we'll need to look into it. Our engine is using a time delta to calculate each step, so there might be a small difference between high refresh phones and a 60hz phones (due to the extra loop work being done), but there shouldn't be a 4x difference, so there's definitely something we need to look at.
For me the difference was 1.5x when testing with the pixel 4 xl setting to 90hz, I did a test today putting device time and self time on display.
What device got 4x difference? or I didn't understand you correctly ?
Wonder if its also affects iPhone 13 or any other 120hz devices?