Sprite flickering issue

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By iq2luc
:warning: Old Version Published before Godot 3 was released.

my intention is to use Godot for developing a 2D game, so I started to play with it today and I already love it.

Still, I encountered an issue regarding sprite performance: after some time (I keep moving the sprite around for 10 - 20 seconds) it starts to flicker. Does anybody have an idea why that could happen?
It is happening with the demos too (i.e. ‘Simple Shooter’ …).

Correction: it is happening on Linux only, I tried again several times in Window 10 Pro 64bit (the same hardware) and everything goes smooth. Initially I was under the impression it is happening on Windows too, but I was wrong, sorry.

Thank you so much for any possible hints.

See next comment for more info.

iq2luc | 2016-02-29 02:17

Recorded video → https://www.youtube.com/watch?v=LjvVLEnksbs
My test project → https://drive.google.com/open?id=0B7JYI_0uVNNaZ2djVG0yb1VXM2s
Initially the movement is smooth, then it begins to stutter and then flicker.

Distro: Archlinux
Godot binary: Godot_v2.0_stable_20160223_x11.64
Kernel: Linux 4.4.1-2-ARCH #1 SMP PREEMPT x86_64
CPU: Intel(R) Core™ i7-4700HQ CPU @ 2.40GHz
GPU: NVIDIA Corporation GK106M [GeForce GTX 765M]
Kernel driver in use: nvidia (361.28)

iq2luc | 2016-02-29 02:22

Is desktop compositing enabled?

dragoon | 2016-02-29 03:14

I tried enabling/disabling:

  • desktop composition
  • vsync
  • dithering
    …and it still happens

Anyway, I found the cause – the second display – please see my answer post below.

iq2luc | 2016-02-29 11:56

same problem here.
sprites flickers often.
but I just have single display. cant find the solution.

eaglecat | 2016-04-16 15:15

:bust_in_silhouette: Reply From: iq2luc

After doing various testing scenarios I find out the cause: it is happening only when a second display is connected:

  • LVDS-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 381mm x 214mm
  • VGA-0 connected 1280x1024+1920+0 (normal left inverted right x axis y axis) 338mm x 270mm

Taking into consideration it happens only in Linux and only when having a second display connected I presume it is an NVIDIA driver issue on Linux.

I don’t have time now to test other driver versions (downgrading the nvidia kernel driver) but I’ll try to do it sometime an get back with feedback.

Thanks to all the people on IRC who tried to help – gotta love Godot even more for such a lovely community.