1
\$\begingroup\$

I have no gamedev experience and I just started learning. I wanted to develop a basic platformer to learn.

I got stuck pretty soon with rendering in Godot. When I run the game, it just feels... Jittery... There is sort of a "ghost trail" behind my player, most noticeable when jumping. The run animation also does not seem very clear to me.

I am running it on: Vulkan API 1.2.231 - Forward+ - Using Vulkan Device #0: Apple - Apple M1 using Godot Engine v4.1.1.stable.official.bd6af8e0e. According to the documentation, I should be able to run this without seeing any stutter, and I did not expect jitter since my MacBook Pro 13 should run at 60Hz.

I have read several articles and forum posts online on this issue, and I think I am using delta in my processing correctly and that my AnimationPlayer is configured fine. I made sure that VSync is enabled, my stretch mode is set to canvas_items, my Default texture filter is set to Nearest and I have enabled both Snap 2D transforms to pixel and Snap 2D vertices to pixel.

My player movement logic is written in _physics_process method. I have also tried doing it in _process, but I don't notice any difference.

Can someone tell me what I am doing wrong?

-- EDIT --

I mispoke originally and wrote that I am experiencing stutter instead of jitter.

\$\endgroup\$
14
  • \$\begingroup\$ I have faced cases of jitter that I just cannot explain, but let us try... Given the settings you mention, I'm assuming this is a 2D pixel art game, is that correct? Can you show how this jitter and "ghost trail" looks like? Did you try the other VSync modes (mailbox and adaptive)? Can you tell if it is it just your player movement, or is it the the camera, or something else? Have you tried any kind of motion interpolations? What is the simpler code (perhaps set it up in a new project) that shows the problem? \$\endgroup\$
    – Theraot
    Sep 30, 2023 at 20:16
  • \$\begingroup\$ I included the link to my source code in the question :) Maybe I should have been more clear about it now that I think about it... It is the platformer link in the first paragraph. \$\endgroup\$
    – alturkovic
    Sep 30, 2023 at 20:22
  • \$\begingroup\$ I see, I downloaded and ran it on Godot 4.1, but I do not see jitter nor a ghost trail on the game. I do not know if this related to hardware/OS※. Perhaps you are having an after image? I had the doubt on my end, so I recorded video and went frame by frame to confirm, and I didn't see any issue on the recorded video. ※ I'm running on: Godot v4.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050 Ti (NVIDIA; 31.0.15.3742) - Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz (4 Threads) \$\endgroup\$
    – Theraot
    Sep 30, 2023 at 20:45
  • \$\begingroup\$ I guess it is due to the lack of a dedicated GPU. I assumed that I should be able to run a 2D demo like this one smoothly, but it just does not seem smooth at all to me. Thanks for confirming it. If you post it as an answer, I'll gladly accept this as an answer. \$\endgroup\$
    – alturkovic
    Sep 30, 2023 at 21:43
  • 1
    \$\begingroup\$ That leaves them trying your game in other computers/displays. I suppose there is a chance it is just me. Regardless I don't think I would have a solution one way or the other. \$\endgroup\$
    – Theraot
    Oct 1, 2023 at 21:33

1 Answer 1

2
+50
\$\begingroup\$

After testing (both on my end and OP end) with different rendering backends (including Godot support for ANGLE, on prerelease at the time of writing), and the common advice regarding jittering and stutter, we have found out that:

  • The movement in Godot seems to be performant and smooth, yet the visuals are not desirable (what OP describes as a "ghost trail").
  • It is possible to export the game, and other can play it without the issue.
  • The issue is rooted in hardware, and it seems that it cannot be fixed via Godot configuration. It is unclear to me if this is purely a GPU issue, or if there are other issues elsewhere on the video stack (e.g. OS, driver, display).
  • Thus, changing the hardware is only solution found at the time of writing.
\$\endgroup\$
1
  • \$\begingroup\$ Thank you for the effort, I appreciate it! \$\endgroup\$
    – alturkovic
    Oct 5, 2023 at 8:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .