motion linear velocity differs on different devices

IceboxIcebox Member Posts: 1,485

Hello guys , I noticed in my platformer game that every actor moves according to the framerate of the device, Iv been testing my game on 10 different devices, 6 have the same results and are all newer devices but 4 older devices are different , and each of them hold different result than the other one.

For example, if i move 2 actors together at the same velocity and are parallel to each other, if the game lags a bit or slows down, one of the actors moves slower and the other one maintains the same speed , the result becomes different , I cant time my obstacles to match on all devices , but that is only when I use motion linear velocity , if I use interpolate position it gives me the exact result on all devices. The problem is I need to use velocity instead of changing position in some cases.

The same thing happens with constraining an actor to another , I am constraining a hitbox to the main hero actor, the hit box is attached on the hero's head and uppper body , i set it to be visible to see the result, sometimes if i jump from a high spot and land on an enemy I get hit ,even though it shouldnt hit the hero actor it should destroy the enemy but the hit box doesnt keep up with the velocity of the actor attached to it, so it collides with the enemy causing damage.

Both of these problems appear on older devices , samsung galaxy s4 and samsung galaxy tab 3 , and samsung grand prime. I figured that this happens cause of the framerate ( not sure though ). I even thought that the problem is from the device , but I have tested popular games of the same genre to compare the results , even if it runs slower on the device their results are always the same , the obstacles, enemies , etc. always move according to how it was programmed to move , and not according to framerate of the device. But I thought again maybe they used different methods to avoid this problem from happening. Anyone had this problem with their games ? Is there a good alternative that I can test out ?

Thanks

Comments

Sign In or Register to comment.