Made the same "2.5D" endless runner in Godot and Unity, Godot exported game stutters/jitters

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

Hey guys, let’s get straight to the point. I implemented pretty much the same project on both engines (see the screenshots). As far as I enjoyed working with Godot much more (it feels so fast and smooth) I am a bit sad that end result comes off better from Unity. I don’t think it is Godot’s fault, maybe it just needs some settings tweaking that I am not aware of. Therefore I am coming here for help.

No matter how I export the project from Unity (shadows ON, MSAA x8 etc.) it runs smooth on my setup (I have a weak ass laptop like 6 yrs old DELL INSPIRON 5559 if anyone cares to see the specs). Godot however runs smooth only if I export the game with MSAA turned off, shadows turned off etc. The projects are implemented (script-wise) in the very same way EXCEPT in Unity I do object pooling for all objects in game (platforms, coins, trees) and in Godot I don’t (I just instanciate things randomly and then them when they are out of sight). Also both projects have VSYNC ON, I tried to turn it off, but for Godot project it only made things worse.

In Godot I also tried to enable multi-thread in project-settings but I did not notice any difference.
In Godot’s debugger I get 2 get_node and get_meta related errors, but they don’t ruin the game so I did not deal with them. Maybe these, could be the issue? (see screenshots attached)

If needed, I can provide scripts if anyone wants to dig into it. I think it is quite rare to have two same projects done in two engines.

Hope you are all well.


You’re not imagining things. My experience has been one of uncovering many performance problems and feature limitations in Godot that don’t exist in Unity, and that range from mildly annoying to irreconcilably deal breaking. I have had to abandon a few projects because Godot was simply incapable of handling them, despite having a suitable API.

That being said, I stick with Godot rather than using Unity because I am confident that Godot’s bugs will be fixed before Unity’s licensing will become acceptable. Some projects will just have to wait until then, but I have a whole parade of ideas for which Godot is suitable until that time.

stormreaver | 2021-02-15 19:05

I see. Today I tried to have some more fun with it, tried more settings changes. Tried changing camera script (thought that might be the issue). Tried fixing the errors I noted, tried the recommended smoothing addon, capping FPS, checking my monitor refresh rate settings etc. I also checked the profiler data and I saw that idle time value per frame is at 99 % every second frame. Did a lot of googling on what could be the cause of this, but no luck. I am pretty much out of ideas :D.

pavkoccino | 2021-02-15 19:15

:bust_in_silhouette: Reply From: Calinou

Try following the advice outlined in the Fixing jitter and stutter documentation. Most importantly, give lawnjelly’s smoothing-addon a try by installing it, enabling it and configuring it in your project using the Smoothing3D node.

Thanks for the response. I did follow the documentation and I should note that I am running Windows. The game is set to fullscreen, so it should have high priority. I also plan to test it on some other computer, so I can make sure it is not HW related issue.

Thanks for the smoothing addon tip, will test it out and come back with results.

pavkoccino | 2021-02-14 21:27

UPDATE: Smoothing addon did not help.

pavkoccino | 2021-02-15 12:25

:bust_in_silhouette: Reply From: pavkoccino

Today I tested the game on 2 other computers. Both windows, one desktop, one laptop. Both of them ran the game fine without any stutter so I conclude there is some issue between Godot and my laptop. :smiley: Thank you all for kind answers.

Loading on demand with Godot will incur a slight penalty that will usually manifest as a slight hiccup during game play. You can reduce it somewhat by preloading your assets in your main scene.

In some cases, preloading can eliminate the hiccup entirely, while it will have no noticeable effect in other cases. In yet other cases, it can make the hiccup worse, as Godot will come to a complete halt for the moment in which the scene is instantiated. If the instantiated scene itself has more preloads, that will cause additional delay.

stormreaver | 2021-02-16 12:05

Yeah, that is exactly what I am doing. I am preloading scenes and then instantiating, so you might be right.

pavkoccino | 2021-02-16 12:13

:bust_in_silhouette: Reply From: lofi

try object pooling, im on a proyect where there are a few objects going in and out of screen, it was stuttering until i did pooling.