godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
87.04k stars 19.54k forks source link

Driver-related jitter in motion test #2043

Closed Angluca closed 5 years ago

Angluca commented 9 years ago

image Only first row is nothing, it's bug? fix process test(2 and 4 row) all often shake.

reduz commented 9 years ago

lag on the third one is OK and expected, but when they shake, is it all of them or only the fixed ones?

On Sun, Jun 7, 2015 at 10:33 AM, Pixeller notifications@github.com wrote:

[image: image] https://cloud.githubusercontent.com/assets/156404/8024159/30d51954-0d5c-11e5-90f6-b8b44392afb0.png Only first row is nothing, I think it's bug. fix process test(2,4 row) all often shake.

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/2043.

Angluca commented 9 years ago

@reduz 2 and 4 row often shake together at the one time.

allkhor commented 9 years ago

Lag here: https://youtu.be/haKOTbxjJWo Windows 7 x64,godot 1.1x64, Pentium 4-3.2Hz, Ram 2GB, Nvidia 7600GT How i can help to fix that? Godot it's a great and perspective engine, but with this bug i can't start project.

I tested on several device, and i see this bug on a different config and os.

Lenovo IdeaTab 3500, Android 4.4.2, some lags present.. https://youtu.be/7HYp9pdAZdY

reduz commented 9 years ago

Get a newer GPU

On Sun, Jun 7, 2015 at 2:46 PM, Alexey notifications@github.com wrote:

Lag here https://youtu.be/haKOTbxjJWo Windows 7 x64,godot 1.1x64, Pentium 4-3.2Hz, Ram 2GB, Nvidia 7600GT How i can help to fix that? Godot it's a great and perspective engine, but with this bug i can't start project.

I tested on several device, and i see this bug on a different config and os.

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/2043#issuecomment-109782634.

reduz commented 9 years ago

I'm sure you have seen other games running better on your GPU, or even Unity. The problem is that this specific GPU is more than a decade old and it has really bad OpenGL support (most stuff made for it are DirectX9). Immediately nweer nVidia models starting from 8xxx have much better openGL support, where Godot runs fine.

On Sun, Jun 7, 2015 at 4:45 PM, Juan Linietsky reduzio@gmail.com wrote:

Get a newer GPU

On Sun, Jun 7, 2015 at 2:46 PM, Alexey notifications@github.com wrote:

Lag here https://youtu.be/haKOTbxjJWo Windows 7 x64,godot 1.1x64, Pentium 4-3.2Hz, Ram 2GB, Nvidia 7600GT How i can help to fix that? Godot it's a great and perspective engine, but with this bug i can't start project.

I tested on several device, and i see this bug on a different config and os.

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/2043#issuecomment-109782634.

allkhor commented 9 years ago

Acer Aspire Switch 10, Intel atom Z3745, win8.1.. Jittering I test on my desktop Intel® Core™ i5 CPU 750 @ 2.67GHz, Nvidia Gtx750ti, Ubuntu x64. Motion more smooth, but lags(Jittering) some times happens.. How about Android, i tested on several device and see motion jittering some times.. Devices not old. Godot have a native linux editor - killer feature for me and i like concept of engine, simple and power language gdscript, but optimization is very bad. Thank for your work guys!

reduz commented 9 years ago

Can you specify from the devices you test, which ones all the cars are smooth and which one only the fixed cars jitter?

On Sun, Jun 7, 2015 at 5:57 PM, Alexey notifications@github.com wrote:

Acer Aspire Switch 10, Intel atom Z3745, win8.1.. Jittering I test on my desktop Intel® Core™ i5 CPU 750 @ 2.67GHz, Nvidia Gtx750ti, Ubuntu x64. Motion more smooth, but lags(Jittering) some times happens.. How about Android, i tested on several device and see motion jittering some times.. Devices not old. Godot have a native linux editor - killer feature for me and i like concept of engine, simple and power language gdscript, but optimization is very bad. Thank for your work guys!

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/2043#issuecomment-109799148.

allkhor commented 9 years ago

Lenovo IdeaTab A3500, ASUS MeMO Pad HD 7(ME173X), Asus Fonepad 7 FE375CG x86(i can test tommorow) Idle Process Animation, Idle Process Code --- smooth, random jitter 1-2 times in 1 loop(before car not move again), Fixed process Code, Fixed Process Animation --- jitter all time.

reduz commented 9 years ago

so, basically if i understand correctly: 1) On Old PC (7600gt) you get jitter all the time in all the cars 2) On new PC (Core i5+ gtx 750) it's smooth but you see an eventually jitter in all cars every a bunch of seconds 3) You see a lot of jitter on fixed cars, but small to no jitter on idle cars on Android devices?

On Sun, Jun 7, 2015 at 6:14 PM, Alexey notifications@github.com wrote:

Lenovo IdeaTab A3500, ASUS MeMO Pad HD 7(ME173X), Asus Fonepad 7 FE375CG x86(i can test tommorow) Idle Process Animation, Idle Process Code --- smooth, random jitter 1-2 times in 1 loop(before car not move again), Fixed process Code, Fixed Process Animation --- jitter all time.

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/2043#issuecomment-109800091.

allkhor commented 9 years ago

1) Old pc, old amd notebook, acer aspire swith 10(intel hd graphis) jitter all time. 2) New pc - random jitter. Some time a demo work without jittering and lags! 3) Yes, all correct!

godotengine commented 9 years ago

Oh ok. 1) Jitter on Old PCs is due to bad drivers, this can't be fixed, OpenGL was not well supported back then. 2) Jitter on modern PCs should be minimal or only a tiny bit. This is due to the OS and is expected, all games suffer this as far as I know. 3) Jitter on Android is due to how android works, it only happens on some devices, but this will be fixed in Godot soon.

On Sun, Jun 7, 2015 at 6:34 PM, Alexey notifications@github.com wrote:

1) Old pc, old amd notebook, acer aspire swith 10(intel hd graphis) jitter all time. 2) New pc - random jitter. Some time a demo work without jittering and lags! 3) Yes, all correct!

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/2043#issuecomment-109801729.

OkamStudio

godotengine commented 9 years ago

Oh also, for devices running windows7. Aereo often creates jitter. For reference, try disabling Aereo and i'm sure you will notice a difference. Changing the demo to run fullscreen often fixes this too

On Sun, Jun 7, 2015 at 6:38 PM, Juan Linietsky juan@okamstudio.com wrote:

Oh ok. 1) Jitter on Old PCs is due to bad drivers, this can't be fixed, OpenGL was not well supported back then. 2) Jitter on modern PCs should be minimal or only a tiny bit. This is due to the OS and is expected, all games suffer this as far as I know. 3) Jitter on Android is due to how android works, it only happens on some devices, but this will be fixed in Godot soon.

On Sun, Jun 7, 2015 at 6:34 PM, Alexey notifications@github.com wrote:

1) Old pc, old amd notebook, acer aspire swith 10(intel hd graphis) jitter all time. 2) New pc - random jitter. Some time a demo work without jittering and lags! 3) Yes, all correct!

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/2043#issuecomment-109801729.

OkamStudio

OkamStudio

allkhor commented 9 years ago

Thank you so much! I will follow up on the development of Android in Godot.

itsraineing commented 9 years ago

Just to throw some more results in, on an i5 2500k and R9 270X (actually two in Crossfire, but I don't think Godot supports that right now):

Mint 17.1, Linux 3.16, fglrx 14.12 (Catalyst Omega): all four are somewhat jittery, and all jitter the same.

Win10, various Catalyst alphas and betas: all four are perfectly smooth.

Arch, Linux 4.0.5, xf86-video-ati 7.5 + mesa 10.5.7: all are mostly smooth, but jitter occasionally; Idle Animation is the smoothest, and the two Fixed are the most jittery. Also, if left running, Idle Code falls behind the other three.

reduz commented 9 years ago

Gungrind: Open source 3D drivers, both ATI and NVidia are extremely jittery for me even on high end hardware (I also have that same GPU), I think it's entirely the drivers fault. Using closed drivers works smoothly for me on Linux

On Mon, Jun 8, 2015 at 12:04 AM, GungnirInd notifications@github.com wrote:

Just to throw some more results in, on an i5 2500k and R9 270X (actually two in Crossfire, but I don't think Godot supports that right now):

Mint 17.1, Linux 3.16, fglrx 14.12 (Catalyst Omega): all four are somewhat jittery, and all jitter the same.

Win10, various Catalyst alphas and betas: all four are perfectly smooth.

Arch, Linux 4.0.5, xf86-video-ati 7.5 + mesa 10.5.7: all are mostly smooth, but jitter occasionally; Idle Animation is the smoothest, and the two Fixed are the most jittery. Also, if left running, Idle Code falls behind the other three.

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/2043#issuecomment-109846618.

Angluca commented 9 years ago

My laptop is retina macbook pro 2013 (i5, iris pro 5000) I play more 2d game has no shake on my laptop. Has shake if I develop physics game use godot or run example (platformer). https://github.com/okamstudio/godot/issues/1745

godotengine commented 9 years ago

Pxeller, only the fixed process ones jitter for you?

On Mon, Jun 8, 2015 at 2:35 AM, Pixeller notifications@github.com wrote:

My laptop is retina macbook pro 2013 (i5, iris pro 5000)

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/2043#issuecomment-109868342.

OkamStudio

Angluca commented 9 years ago

@okamstudio Yes, only fixed process ones jitter. Don't like the feeling of jitter when I play or test the game, It's incredible.

mischiefaaron commented 9 years ago

Smooth as butter on my Mac Mini 2009. Very odd about it not working well for you with more recent hardware.

This happened a lot for me on my Acer C720 when I used Cinammon, but now that I use XFCE it works a lot better. It's GPU is an 'Intel HD Graphics'. Guessing the drivers are good enough, because it's certainly a weak GPU. Can handle some impressive 2D games though like Freedom Planet.

allkhor commented 9 years ago

Oh, i found problem in windows 8.1 and Intel Hd Graphics, it's my fault *( I use a F.lux app for care of my eyes: it makes the color of your computer's display adapt to the time of day, warm at night and like sunlight during the day. And f.lux have a bug, like a stutter in games. Now motion test in my acer aspire switch 10, work like a charm! Thanks @reduz for help in irc!

itsraineing commented 9 years ago

So agameraaron's comment made me wonder about how various DEs would effect this, so I tested Enlightenment, GNOME Shell, Cinnamon, and LXQt (all the latest versions in Arch's repos), as well as Plasma 5, where I originally tested; same system as above (i5 2500k, R9 270X, open source drivers). All looked perfectly smooth, except for Plasma 5, which had quite a bit of stuttering and tearing.

mischiefaaron commented 9 years ago

I use a similar program for Linux as Allkhor called Redshift because f.lux provides abysmal Linux support. I use f.lux on my Mac Mini. I'm not sure if that's the primary source of the issue.

Angluca commented 9 years ago

Hi, Fix it please.

zhagsenkk commented 9 years ago

I find a lot of shakes in any animation. Win8.1,GT 630m

godotengine commented 9 years ago

will be adding fixed step interpolation soon, but this will only fix the cases where only the fixed cars jitter if all cars jitter for you, there is something misconfigured on your OS

On Wed, Jun 24, 2015 at 12:55 PM, zhagsenkk notifications@github.com wrote:

I find a lot of shakes in any animation. Win8.1,GT 630m

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/2043#issuecomment-114924103.

OkamStudio

reduz commented 8 years ago

will fix this in 2.1

mischiefaaron commented 8 years ago

Thanks reduz!

ViddMan commented 8 years ago

Is the "fix" planned for 2.1 specifically for fixed car jitter? On Windows 8.1 with a GTX 780, I'm observing somewhat frequesnt jitter across all cars (which occurs for each car at the same time). The drivers are up to date via GeForce Experience.

Running it in full-screen appears to alleviate the issue.

Thanks.

chanon commented 8 years ago

On my machine (Core i7-6700HQ, GTX780M) f.lux was causing stutters on all 4 cars. I wonder if that is somehow avoidable as f.lux is a commonly used software. After closing f.lux the constant stutters disappeared.

I also tried the motion test on my Samsung Galaxy S6. Here there were stutters on all 4 cars, but the 2nd and 4th were stuttering a lot more frequently. Increasing fixed_fps to 100 helped reduce the stutters on the 2nd and 4th cars but if you look at them closely they seem to "shake" as they move (more noticeable on PC)

chanon commented 8 years ago

Something else I found is on PC, if you double click the title bar to maximize / restore the screen, sometimes all the cars will shake/flicker very strongly as they move.

dslul commented 8 years ago

I can confirm that this problem is very bad on Android (I tried on galaxy s4 cyanogenmod, nexus 5 cyanogenmod and galaxy s6 stock rom). In my game, when I move a sprite (tried both in _process and _fixed_process), there is some visible jitter, but the game runs stable at 60 FPS. On my PC however (ubuntu 16.04, i7 + hd7670 open drivers) it runs fine. So I guess there is some problem with the android build. I noticed that @reduz had some problems replicating the issue: did you try on Android?

akien-mga commented 7 years ago

Not critical for the upcoming 2.1, so moving to the next milestone.

dslul commented 7 years ago

Not critical? It seems very critical when simple movements cause visible lag on two major platforms, doesn't it?

reduz commented 7 years ago

A lot of this was fixed by vsync (mainly on PC), mostly the problem persists on some Android devices, though not exactly sure why.

On Wed, Jul 27, 2016 at 9:53 AM, Daniele Laudani notifications@github.com wrote:

Not critical? It seems very critical when simple movements causes visible lag on two major platforms, doesn't it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/2043#issuecomment-235575460, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-Z257mTKwfBrMslrEZ7ufEYq_1JEMPks5qZ1StgaJpZM4E6yMX .

reduz commented 7 years ago

It's not critical because it works fine on most Android devices, only a few display jitter (I could only replicate on an Amazon Kindle).

On Wed, Jul 27, 2016 at 9:55 AM, Juan Linietsky reduzio@gmail.com wrote:

A lot of this was fixed by vsync (mainly on PC), mostly the problem persists on some Android devices, though not exactly sure why.

On Wed, Jul 27, 2016 at 9:53 AM, Daniele Laudani <notifications@github.com

wrote:

Not critical? It seems very critical when simple movements causes visible lag on two major platforms, doesn't it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/2043#issuecomment-235575460, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-Z257mTKwfBrMslrEZ7ufEYq_1JEMPks5qZ1StgaJpZM4E6yMX .

dslul commented 7 years ago

That's strange, I tried on many Android devices (Galaxy S4, Galaxy S5, Galaxy S6, Nexus 5, Nexus 4). If you want to test this with my code you can find it on my repository list (zball)

reduz commented 7 years ago

We will be working on a new renderer soon, so at the time we will review again how frames are drawn in Android. I honestly am not sure about how much more can be changed than how things work, and I think implementing fixed frame interpolation to tackle this is too much work and not worth it. If you find another open source engine/library for Android that does not exhibit this problem in your devices when working with Physics, let me know and I'll give a check.

On Wed, Jul 27, 2016 at 10:01 AM, Daniele Laudani notifications@github.com wrote:

That's strange, I tried on many Android devices (Galaxy S4, Galaxy S5, Galaxy S6, Nexus 5, Nexus 4). If you want to test this with my code you can find it on my repository list (zball)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/2043#issuecomment-235577446, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-Z23ujQZg9D0hEbSxevlKcloaR1D5Bks5qZ1aPgaJpZM4E6yMX .

jjsonick commented 7 years ago

I see bad jitter with every 3rd of 4th pass of the fixed process cars on late 2013 iMac with GeForce GTX 775M (testing on 2.1.rc1). Idle process cars always smooth. Turning vsync on does not solve it in my case.

Calinou commented 7 years ago

Just a notice, I can still reproduce this with commit https://github.com/godotengine/godot/commit/24bd472a4a3295f1d1f217a7fc7492df6947bfea.

Stuttering is definitely noticeable, but only in windowed mode, apparently. Fullscreen mode seems to be fine.

reduz commented 7 years ago

car being late is fine

On Sun, Sep 4, 2016 at 4:01 PM, Hugo Locurcio notifications@github.com wrote:

Just a notice, I can still reproduce this with commit 24bd472 https://github.com/godotengine/godot/commit/24bd472a4a3295f1d1f217a7fc7492df6947bfea .

  • Intel Core i7-6700K
  • NVIDIA GeForce GTX 1080 (driver version 372.70)
  • Windows 10 64-bit (build 14393)

After a minute or so, the 3rd car (starting from the top) will be slightly late compared to the other ones.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/2043#issuecomment-244622301, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-Z21J_G5WUXmvLP4GbW4GubPnupwb_ks5qmxV9gaJpZM4E6yMX .

get-it-here commented 7 years ago

I see stuttering in both this example and in the space shooter example. Similar PC specs to Calinou. Didn't try in fullscreen, but the stuttering was seen in debug, non-debug, and compiled versions of the mentioned demos.

Zylann commented 7 years ago

On my end, all cars stutter at the same time, one or two times per second in the editor. It happens less when exported, but still happens every 3 seconds or so.

My game has a lot more stuff (well just 3 layers of tilemaps, a background and a few sprites) and I get frequent stuttering even exported. Profiling shows scripts and physics only account for 3% of the frame time, which is basically nothing.

For a reference, I tried to launch a Java game I made 4 years ago with a now obsolete library (Slick2D), and although this game has 3 layers of fullscreen sprites + polygon-based level walls, props, enemies, particles and projectiles with dynamic collisions, it doesn't drops any frame and runs at a solid 60 fps, even after minutes of gameplay.

Now with Godot I also have another problem (which could go to its own issue if it's really different): if I maximize the window, there is 20% chance I will get epileptic stuttering as if two backbuffers were wrongly swapping (one frame on two shows the 2nd frame behind or something like that). It's very difficult to get a screencapture of this, my phone camera is too crappy to see that and using OBS the stutter disappears. It can also disappear randomly depending on what happens in the game or if the window is resized. I can reproduce it very easily in a matter of seconds to a minute, it's a bit random.

EDIT: I managed to capture these things with OBS, I just forgot to set FPS back to 60: http://zylannprods.fr/lab/godot/videos/stuttering_motion_example.mp4 The game here is exported. You can see some stutter, then the epileptic one after a few resizes.

Edit 2: I found that actually the (non-epileptic) stutter is not visible on OBS, as if frame dropping was not a thing on recorded videos. I found that also when recording my own game WIP video. Although I felt frame dropping while playing in debug mode, when I watched the video there was not a single frame drop O_O So my conclusion on this kind of stutter is... it's not frame drop. It's just waiting 1 frame more to display the next one... I guess? That's what V-sync is doing, so I disabled V-sync and I got rid of some of the stutter, but I get mild tearing. In a 2D game with 4 sprites^^"

My specs: Windows 10 64 bits MSI laptop, plugged in, nVidia GeForce 940M graphic card (I also take care of running games not with Intel Integrated Graphics).

JustDevs commented 7 years ago

Ok, I just tried to set my refresh rate to 144Hz from 60Hz and tried the "Motion Test" demo and run the project. Jittering stopped for "Idle Process Animation" and "Idle Process Code" preview cars. Other two are slightly vibrating though. I'm guessing it is caused something because of refresh rate of monitor or driver related.

EDIT: Ok this is strange but it fixed my issue, I switched back to 60Hz and tried "Motion Test" demo with 2.1 stable version. None of them were jittering at all. I even tried to uninstall and install the engine back and restarted my pc but it didn't bring jittering back at all. I suggest to switch monitor refresh rate to 144Hz and then switching back to 60Hz to fix the issue. I'm not sure if this is a permanent fix though.

JustDevs commented 7 years ago

Ok this time I found the issue. It was because of Vsync. All I had to do was go into project settings and check the box called "Vsync" and uncheck the "On" box front of it. It fixed my jittering issue.

balloonpopper commented 7 years ago

I tried it with unchecking Vsync - it jitters a lot less but still jitters (starts halfway through the second time the cars cross the scene now instead of the first time they go across which is what it used to do.)

balloonpopper commented 7 years ago

Anyone? This issue is killing me - even a blank scene with a single moving sprite shows this issue!!! I'm not game to invest a lot into a project in Godot as I can't get even something simple looking smooth.

reduz commented 7 years ago

no idea, it seems it is very platform and driver dependent, most people with issues has Noveau on Linux

On Sat, Jan 21, 2017 at 8:11 PM, balloonpopper notifications@github.com wrote:

Anyone? This issue is killing me - even a blank scene with a single moving sprite shows this issue!!! I'm not game to invest a lot into a project in Godot as I can't get even something simple looking smooth.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/2043#issuecomment-274294569, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-Z2_ntfMjwxKrpXwliFiGYRNL8Q9f5ks5rUpCVgaJpZM4E6yMX .

dslul commented 7 years ago

It also happens on every Android device with Qualcomm Adreno gpu (I tried on a tegra 3 tablet and it was smooth)

balloonpopper commented 7 years ago

I'm on Windows 10 (NVidia 970 graphics) and it's consistently broken for me (latest windows drivers installed).

balloonpopper commented 7 years ago

I just got it to mostly disappear. Playing with both settings for vsync and use_2d_pixel_snap caused it to go away. Actually, on further review I think it is vsync related only. As @JustDevs noted earlier, ticking the "use_vsync" property, but unticking the "on" button for it seems to stop the shuddering in most cases. On some runs, all cars progress at the same speed without shuddering. On some runs cars 2 and 4 (the "fixed" cars) have issues. On some runs they shudder a little, on some they shudder a lot - no idea why it's not consistent, but at least cars 1 and 3 (and the sprites in my own test program) are now consistently moving without shuddering.

Any takers on why there's two checkboxes against that setting? It's not intuitive to have two "on" buttons for the setting. What's the difference between the item's two checkboxes?