Game runs "differently" on different systems.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CynicalKazu

So, I was working on my 2d Platformer game project. I built an executable file to test it on my laptop. It works as expected with no issues on the computer I made the game on, but on the laptop I ran into various issues. First of all, the player seemed to be moving slower and his jump height was a bit lower as well. I have all my movement code in “func _process(delta):” (Tell me if I need to change that). Secondly, there were several visual stutters that only occur on the laptop. My laptop’s specs are half-decent with an i3-7007u and Intel HD 620 Graphics and I’m not really sure what’s up with all the lag and physics problems. Third problem is the “gravity” for the player that I programmed. It’s a constant, that is multiplied by delta, and then added to the vertical speed variable. The horizontal and vertical speed variables together make up the Vector2 “velocity” that is used in the function “move_and_slide()” for movement. There is a vertical speed clamp that clamps it between “speedY” and “MAX_FALL_SPEED”. Again this works correctly on my desktop PC, but on my laptop, sometimes the vertical speed becomes greater than the MAX_FALL_SPEED.

Sorry for this long-ass post. I’m a Godot newbie and I’m desperate to finish my first big project. Any help will be greatly appreciated.

(PC: i5-3470 and GTX 750 Ti)
(Laptop: i3-7007u and HD 620)

It could be down to framerate, have you set a target framerate in project settings > force fps?

Magso | 2019-08-20 20:32

Will definitely try that tomorrow. It’s night time for me.

CynicalKazu | 2019-08-20 20:34

Thanks! It works now!

CynicalKazu | 2019-08-21 12:40

:bust_in_silhouette: Reply From: CynicalKazu

I found the issue, thanks to the comment by Magso. I set the fps limit to 60 and then tweaked my game’s movement mechanics and physics according to it. Now it’s working awesomely on every machine.