Hello,
I'm preparing the release of the next version of Omeganaut, and I’ve run into another issue.
It’s been bothering me for a while, but I wasn’t sure at first: the game seems to run faster on the phone than on PC.
Everything in the code is tied to App.Time or App.DeltaTime, so it should run at the same speed regardless of the platform.
However, playing Omeganaut on the phone really feels faster. Since this might just be a tunnel-vision effect caused by the smaller screen, I was wondering if there’s a reliable way to compare the speed on PC vs. Android and determine whether the game is actually running at the same speed.
Maybe a simple brute force loop of some sort with a timer?
Testing ZGE speed on PC VS Android
Moderator: Moderators
Re: Testing ZGE speed on PC VS Android
How about display the current FPS on screen to see if the PC and Android version is running at the same FPS?
Re: Testing ZGE speed on PC VS Android
164 FPS on the computer
60 FPS on the phone
On the computer, I have time to look outside the screen, kill every enemy whenever I want, and navigate around obstacles.
On the phone, I can't finish the first level without losing 90% of my HP, as I'm constantly overwhelmed by enemies and having a near-death experience with every obstacle I encounter.
That makes no sense…
I don't know. It might really be due to the screen size.
So I ran the game in debug mode on both devices and spawned different enemies and obstacles at the exact same time.
The game is effectively running at the exact same speed on both. I think I'm good for the ophthalmologist
60 FPS on the phone
On the computer, I have time to look outside the screen, kill every enemy whenever I want, and navigate around obstacles.
On the phone, I can't finish the first level without losing 90% of my HP, as I'm constantly overwhelmed by enemies and having a near-death experience with every obstacle I encounter.
That makes no sense…
I don't know. It might really be due to the screen size.
So I ran the game in debug mode on both devices and spawned different enemies and obstacles at the exact same time.
The game is effectively running at the exact same speed on both. I think I'm good for the ophthalmologist
Re: Testing ZGE speed on PC VS Android
Hi Ats,
Try limiting the PC build to 60fps ( and switching your monitor to 60Hz ) to see if there's still a difference in "difficulty". At 164fps input lag will probably be significantly lower than on your phone.
K
Try limiting the PC build to 60fps ( and switching your monitor to 60Hz ) to see if there's still a difference in "difficulty". At 164fps input lag will probably be significantly lower than on your phone.
K
Re: Testing ZGE speed on PC VS Android
It *maybe* is harder on PC at 60 FPS.
I have two possible causes that I'm going to look into:
First, I'm going to create a fake level that spawns the exact same objects at the exact same positions and verify whether the enemy/obstacle spawn rate is affected by the FPS.
Second, and I don't like this possibility, it might come from zgeBullet: lasers could pass through enemies without hitting them at lower fps...
Here's how I handle the zbtSetpSimulation.There are a bunch of comments I added during development…
I already tried a few things regarding zbtStepSimulation:
https://www.emix8.org/forum/viewtopic.p ... ion#p10900
I have two possible causes that I'm going to look into:
First, I'm going to create a fake level that spawns the exact same objects at the exact same positions and verify whether the enemy/obstacle spawn rate is affected by the FPS.
Second, and I don't like this possibility, it might come from zgeBullet: lasers could pass through enemies without hitting them at lower fps...
Here's how I handle the zbtSetpSimulation.There are a bunch of comments I added during development…
Code: Select all
float t = App.DeltaTime;
// Fixed time step for each substep
//zbtStepSimulation(t, 0, 0); // don't work on low framerate
zbtStepSimulation(t, 2, t);
/*
// The follow up doesn't work on android
// Define a fixed time step for substeps (1/60th of a second)
float fixedTimeStep = 1.0 / 60.0; // 60Hz
// Calculate the number of substeps needed
int maxSubSteps = (t / fixedTimeStep) + 1;
// Limit maxSubSteps to a reasonable number to avoid performance issues
if (maxSubSteps > 10) maxSubSteps = 10;
// Update the physics simulation
zbtStepSimulation(t, maxSubSteps, fixedTimeStep);
*/https://www.emix8.org/forum/viewtopic.p ... ion#p10900
Re: Testing ZGE speed on PC VS Android
I recorded a full level with the exact same object spawned through its length.
It's the exact same game at 60 and 164 fps.
Now, to the zgeBullet framerate...
It's the exact same game at 60 and 164 fps.
Now, to the zgeBullet framerate...