godotengine / godot

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

Heavy stuttering issue in simple 2D game [Windows 10, Nvidia] #19783

Closed crystalnoir closed 4 years ago

crystalnoir commented 6 years ago

Godot version: Godot 3.1-dev / Godot 2.X

OS/device including version: PC - Windows 10, GeForce GTX 1060 6 GB, 16 GB RAM.

Issue description: Stuttering / jitters when moving a 2D Sprite. Reproduced on 2 computers (with nvidia graphic cards, the one above and a laptop), a friend of mine reproduce this issue too.

Steps to reproduce: I just download the "First project" that we can make in the documentation. I have tested to reproduce the first part of this tutorial to only have the player and nothing else. If I run it without change anything. I have some stuttering at the same as the game run with 60 FPS. The motion is not smooth. I collaborate with a dev to try to reproduce this problem and try to understand the issue. I have made a lot of test (Run from editor, run after compilation without debug mode etc...But when I deleted the animation, all run smoothly.

PS : it seems that physic behaviour make sprite stuttering too (try with kinematic and Area2D node with collision). If I desactivate collision and replace Area2D with a simple node2D there is no stuttering (if I don't play any animation on the player).

Minimal reproduction project: Here's a minimalist project (that comes from the first game project of the documentation). If I run it, I have some stuttering. If I delete the player animation I have no more stuttering. FirstGame.zip

Ranoller commented 5 years ago

In win 10 stutters happends more in full screen, and is because Aero (And can be disabled). It´s seems that Godot uses less CPU and more GPU with windows Aero but this provoques more stuttering. In windows 7, disabling windows Aero, full screen have less stutter that windowed and uses more CPU. I think that win 10 doesn´t have real full screen....

linkoboy commented 5 years ago

I've began to make a prototype pinball 2D game and I have me too jittering in the movement of the ball, I've only a rigidbody that falls with gravity. I'm on Win10 / NVidia GTX 560 Ti 1Go (with latest drivers) / 8 Go Ram, my computer is not the best but my project has only a ball and StaticBody2D for the borders and I can see clearly jittering happening very often, I've tried with and without vsync, with opengl 3.0 and 2.0, windowed and fullscreen, with more and less physic fps, the problem is still here. My Godot version is 3.1 alpha. I think it's a major problem, maybe hard to fix but that must not be skipped, it's important to have a smooth 2D movement for a 2D game.

Ranoller commented 5 years ago

You are right, Godot has now the better usability of all top engines (my opinion of course). Usability side beats them all. But...... performance side.... exporting side.... it´s like godot was beating with the operating system, not like unity or game maker exports that are more fluid (until construct in chrome is more fluid), and is not because gdscript slowness (happends with and without GDScript), there is "other indetermined thing", i hope one day someone can find one rebel line in a cpp file and changing one simple "!" this problem will be fixed... (hope is free like Godot!)

linkoboy commented 5 years ago

I've several projects in mind and I'd love to make them with Godot, it will take a lot of my time (to not say all of my free time), but it saddens me to say that if the engine can not guarantee a smooth 2D movement in the animation with a simple scene, the engine despite all this pros is simply useless. In this case perhaps the wisest choice for me is not to risk to lost time in this way.

I understand that this issue appears only in some configurations (Windows 10 and NVidia drivers for example) but I'd like to know :

PS : I've tried with another pc :

I think these sort of PC configurations (Win10+ Nvidia cards) are very commun, and I hope that the Godot community (that make a great job by the way) will fix this issue very soon and that good 2D games will start to release to show that we can do with Godot but with this sort of issue for me it's simply impossible.

behelit2 commented 5 years ago

Maybe it's some sort of program focus issue? When I start a game in full screen, I see the stuttering basically every time. But if (while the game is running) I switch to windowed mode and back to full screen, it seems to run perfect every time. If I have too, I can program this to happen automatically, but it seems janky. Can anyone else confirm switching from full screen, to windowed, to full screen again fixes the stuttering?

Edit: Oh and another thing... When I disabled the Geforce Experience app, things seemed to get better.

2D project with kinematic characters Godot 3.0.6 Win10 64bit Intel i5-2550K CPU 16gb ram Geforce GTX 970

linkoboy commented 5 years ago

I tried what you propose, I've disable Geforce Experience, tried switching from fullscreen, to windowed, to fullscreen again, with vsync enabled and disabled (it's worse with vsync disabled) but the stuttering appears always unfortunalety for me. It's pretty random but I've never exceeded about 15-20s without stuttering.

behelit2 commented 5 years ago

Thanks for trying! That's so weird, your specs are better than mine. The problem with me is, it's so random... It's hard to reproduce precisely. Sometimes it will run great, other times it will stutter. I'm fairly certain it's something to do with Godot itself, however. I never experience stuttering in games made in Unity, or any other game engine for that matter.

nausika commented 5 years ago

Just noticed this stuttering.

(Godot 3.0.6, Windows 10, 64bit, i7-8550U, 16GB RAM, NVIDIA GeForce MX150)

As others already mentioned, this is a serious issue for Godot. This week I decided to create a prototype for a very simple game. I searched for a framework or engine (found quite a lot of them) and decided to go with Godot - since it's free and open. Then I noticed the stuttering, found this issue - and was surprised that there seems to be no progress. I guess I'll prototype my idea in Godot anyway. But if I wanted to create a releasable game, I would probably try another engine. (This sounds too harsh... I just think, Godot might lose a lot of potential adopters if is problem isn't fixed.)

Ranoller commented 5 years ago

There is no progress because there is no one working on this, and yes, it is a serious issue. But for now, if you need to release comercial game, you can prototype in godot and port to unity (you can use C#). You need have in mind the scene-gameobject- component approach and you can replicate in godot and if works go to unity for fluid flow and performance, or if is 2D go to gamemaker. I'm working in a plugin to try to convert a godot project to other engines and try to port gdscript to a module, to gml or to unity C#, but is a very huge task (i don't know if the effort is worth it, too much time not working in the game) and allways will be imperfect (i can' t get all types, ej: object returned by collision). I have a little parser for the scripts and will start a parser to tscn and tres, but convert the parser result of gdscript to unity c# or gamemaker GML requires a ton of code and i don't know the "legality" about this (i need all api names ej. in json files and don't know about the IP of this). Animations are other problem, i don't know for now how to approach that, but using spine/dragonbones will do easy to port. My main idea of doing that was start in godot and end in unity or gm, but for niw is a headache... If unity was equally portable (i need that),tiny and quick to develop like godot (and have a 32 bit editor) I did port my main project months ago, i love godot but for a middle size project in a small team (or single man like me) is a risk, no one garant to you that a finished project will not give a ton of problems. But if there is a good C++ programmer in your team is other thing, you can allways adapt godot to your game (in unity you can't, but is less buggy).... I hate this issue like i hate the low performance of the editor in a mid project and the exported game, but i hate more unity ( why i need internet in all computers to open the editor? I have one computer without that!) and hate so deeply visual studio... i,m sure that if godot stops the stuttering and works on performance and export, we can start to see great upcomming games.

Zylann commented 5 years ago

To recheck this issue today, I did the following, still on Windows 10 with nVidia GTX 1060:

I opened The Binding of Isaac, windowed mode. Ran in circles, no stutter (by this onwards, I mean for at least 30 seconds). I don't know if the game has V-sync or not though, it has no such setting.

I opened Minecraft, windowed mode. Loaded a flat world looking at the ground where lag would be inexistent, no stutter.

I opened Factorio, still windowed mode, with a pretty large end-game factory. Ran in a straight line, no stutter. However, V-sync is off. If I turn it on and restart the game... still no stutter.

I opened an old Java game I made using Slick2D (OpenGL), not a single stutter (I have yet to see one Oo). Checking the options, V-sync was enabled. If I turn off V-sync, I get regular stutter every second or so. If I double framerate cap, I get no stutter.

Now, I opened a 3D project with Godot 3.1 alpha3, with a map having some assets and a moving character: almost no stutter, I can only see just one every 20 seconds maybe, which is too subtle to bother.

I also tried my 2D project Wallrider which I ported in Godot 3.0.6: same, not enough stutter to bother (random one per 20 seconds).

All these projects above have this in common: they don't just draw one sprite on the screen. They may be using a lot of OpenGL features together.

If I try @crystalnoir test project with Godot 3.1 alpha3, I get immediate, irregular frequent stutter, which only goes away if I wait for about 30 seconds after it was last shown/maximized. I tried switching to _physics_process, and even tried delta = 1.0 / 60.0, it's all the same. If I print delta, it shows that there is a fluctuation every second, but the game shows stutters multiple times per second that delta does not reflect at all. It also happens if I start the game without the editor. I also tried porting it to Godot 2.1.5, and the same issue happens (project: Stuttering_issue19783.zip)

And now, this is where it gets interesting: If I open both my 3D game AND @crystalnoir 's test back to back on the screen, they both run smoothly, immediately. The 2D game still stutters a little though, but not as much. If I close the 3D game, it still seem to work fine, but if I reduce the 2D game and maximize it again, it goes back to horrible stutters.

It's not the end yet! I now tried to add a 3D camera in the 2D game. And magically, stutter is reduced drastically, and immediately, by just doing that. You can try this yourself with PlayerWith3D scene: Stuttering_issue19783.zip See how smooth it is by default. Now hit the magic button, see how it goes to shit if no 3D environment is shown (it doesn't always go back to shit 100% though, but I see PlayerWith3D.tscn always looks better than Player.tscn).

I would like to go further and see what happens if I change nVidia control panel from Optimal Power (the default) to Maximum performance, but... erhm... image

Anyways, all I can guess from this is (but it's a guess so take it with a grain of salt): it's not directly Godot's fault. It's graphics drivers trying to be "smart".

Ranoller commented 5 years ago

For the god of the stutters!!! 😂😂😂

behelit2 commented 5 years ago

Just throwing this out there... As of Nov 2018, the top 14 video cards on Steam are Nvidia. Lets look at the top cards in each GPU category:

NVIDIA GeForce GTX 1060: 14.60% of Steam users. AMD Radeon R7 Graphics: 1.06% of Steam users. Intel HD Graphics 4000: 1.06% of Steam users.

https://store.steampowered.com/hwsurvey/videocard/

Given the above data, it seems like this issue should take top priority. A overwhelming majority of gamers use Nvidia cards, it's the most common configuration by far. The amount of Radeon and Intel graphics users are minuscule by comparison.

@Ranoller ... You're killing me. Telling people to prototype in Godot but port to Unity for their commercial title (in a Godot issue thread) is the most ridiculous thing I've ever heard, no offense.

@Zylann I tried setting Power management mode to "Perfer maximum performance" successfully, but saw no improvement in stuttering.

Ranoller commented 5 years ago

@behelit2 No offense

@Zylann I put a 3D camera that render a mesh in front of a scene that renders a tilemap with animated textures and the problem of godot stuttering some seconds after gain focus is not fixed. There is not other kind of sttuter previously (only the "initial") in that scene so i don't know if this trick fix something, but is interesting you discover. I will test with you files. I think too that godot idle time makes something in the computer become "lazy", but probably is the operating system, because the differences in win with and without aero in FPS, CPU use, and stuttering are so high. Probably is the OS that try to be smart and not the graphic card.

Ranoller commented 5 years ago

I like the Zylann idea to analize what other games do. I don´t know if this is offtopic, but i did some test. First of all, it seems that 95 % of steam games are 32bit (the recent releases too). It´s seems that equally percent of games renders by directx. I capture the processes that games execute and try to see what is happening with the rendering. Some info behind (Is not for have any conclusions, is only info):

Game / Executable bits / Engine / Process that uses to render in windows 7 64 bit and notes.

I notice that most games in focus lost stop the process and pause (maybe good practice?) and very few games allows you to resize manually the screen (ej: not a hero). Sadly i have the stuttering issue of focus lost / focus gain in ΔV: Rings of Saturn (demo).

Edit: It´s seems that godot is the only engine that uses OpenGL32 and WindowsGDI process at the same time. App used: API Monitor v2

(Edit: Correct name of ΔV: Rings of Saturn (demo) )

Zireael07 commented 5 years ago

If by Rings of Saturn you mean ΔV: Rings of Saturn (demo), it was built with Godot 3.1, but I'm not sure about the exact revision they used?

paulhocker commented 5 years ago

After many hours of trying to figure out the cause of the stutter, in my case at least, I by chance tracked the consistent 1s stutter down to having the 'Auto Switch To Remote Scene Tree' enabled in 'Editor Settings'. Unticking this resolves the stutter and performance issues for me. (there is possibly a very slight stutter still, but it's barely noticeable.)

godot windows tools 64_2018-11-14_01-19-20

Godot build 8849d3b Win10 64bit, NVIDIA GeForce GTX 660, driver v416.81

I had the same stuttering issue and unchecking Auto Switch to Remote Tree was the culprit.

di-kang commented 5 years ago

I'm having the same problem here. There are multiple issues about this jitter but most of them don't seem to have any proper solutions and I really need some help.

I'm about to sign a deal with a publisher with my game that I made with Godot and because of the jitter I might have to move all my codes to Unity. Time and cost to move all the codes put aside, I'm reluctant to switch to different engine because I really like the design philosophy of Godot and Godot itself.

I also noticed that in 3.1 'Physics Jitter Fix' option has been added in the settings menu ( https://twitter.com/reduzio/status/984783032459685890 ) but that doesn't help either.

Godot version: Godot 3.0.6

OS/device including version: MacOS 10.14.1 MacBook (Retina, 12-inch, 2017) 1.2 GHz Intel Core m3 8 GB 1867 MHz LPDDR3 Intel HD Graphics 615 1536 MB (But this issue happens on multiple devices including PC and exported game on mobile and PC.)

Issue description: Any object that is moving seems to periodically stutter or jitter accompanied by screen freezing.

Steps to reproduce: Create a new project with a KinematicBody2D or even an AnimatedSprite and modify position with move_and_slide() or set_position() after adding a Camera2D as a child node.(But it still happens even without the Camera2D.)

And it seems to happen more frequently on devices with low processing powers.

Minimal reproduction project: Godot_Jitter.zip


KinematicBody2D, _physics_process(), move_and_slide()

https://youtu.be/78S95yugRDk

extends KinematicBody2D
const SPEED = 75
var motion = Vector2()

func _physics_process(delta):
    if Input.is_action_pressed('ui_right'): motion.x = SPEED
    elif Input.is_action_pressed('ui_left'): motion.x = -SPEED
    else: motion.x = 0
    motion = move_and_slide(motion, Vector2(0, -1))
    print(delta, position)

AnimatedSprite, _physics_process(), set_global_position()

https://youtu.be/gdc6NOoWG4E

extends AnimatedSprite
const SPEED = 75
var motion = Vector2()

func _physics_process(delta):
    if Input.is_action_pressed('ui_right'): motion.x = SPEED
    elif Input.is_action_pressed('ui_left'): motion.x = -SPEED
    else: motion.x = 0
    set_global_position(get_global_position() + motion*delta)
    print(delta, position)

KinematicBody2D, _process(), set_global_position()

https://youtu.be/YVFtkbuyqEQ

extends KinematicBody2D
const SPEED = 75
var motion = Vector2()

func _process(delta):
    if Input.is_action_pressed('ui_right'): motion.x = SPEED
    elif Input.is_action_pressed('ui_left'): motion.x = -SPEED
    else: motion.x = 0
    set_global_position(get_global_position() + motion*delta)
    print(delta, position)
starry-abyss commented 5 years ago

Win 7 64 bit, GTX 660 (drivers 391.35), Godot 3.0.6 and 3.1-beta1

Hey, I tweaked the original project (stopped animations, made use of rigid body instead of manually adjusting positions, added a slightly animated background, etc)

Here it is: FirstGame_2.zip

Tested with the window of size ~ 500x500 and monitor resolution of 1920x1080

Now my observations:

Didn't try with Aero off, forgot how to quickly switch it back and forth?

Zylann commented 5 years ago

@starry-abyss to switch off aero, go to configuration panel, choose "appearance and personalization", there you should be able to change to an old theme like "Windows Classic", which doesn't feature visual effects (and then doesn't use Aero), or "Windows 7 Classic".

starry-abyss commented 5 years ago

OK, so with the classic theme the game, with shadertoy/editor on the screen too, goes back and forth from stutter state to smooth (each state can stay for several seconds). And stutter is accompanied with vertical frame tearing in this mode. That said, even Firefox scrolling tears with the classic theme :'D

behelit2 commented 5 years ago

I'm having the exact same problem diiiiiiiii is having, his use case with move_and_slide is the same as mine. It you watch closely, it's not the player object jittering, but the parallax background behind it.

2D project with kinematic characters Godot 3.0.6 Win10 64bit Intel i5-2550K CPU 16gb ram Geforce GTX 970

di-kang commented 5 years ago

Since this happens on many different kinds of devices, I don't think this is strictly related to hardware configurations. It even happens on exported games running on ios devices.

It you watch closely, it's not the player object jittering, but the parallax background behind it.

@behelit2 I'm not sure about that though. https://youtu.be/YVFtkbuyqEQ In this footage if you look at the player object, it even jiggles by itself. It may be a separate issue but it gets way much worse when camera smoothing is on or the object is switched to Rigidbody2D.

di-kang commented 5 years ago

https://youtu.be/MGMlhl0tPTA This is what happens when camera smoothing is on and the object is switched to Rigidbody2D.

extends RigidBody2D
const SPEED = 7
var motion = Vector2()

func _physics_process(delta):
    if Input.is_action_pressed('ui_right'): motion.x = SPEED
    elif Input.is_action_pressed('ui_left'): motion.x = -SPEED
    else: motion.x = 0
    apply_impulse(position, motion)

I may have amplified the jittering by using apply_impulse() like that but modifying the position of the object directly using set_position() didn't make much difference.

starry-abyss commented 5 years ago

@diiiiiiiii I think you should have a separate issue open then. Otherwise, the thread will be full of contradictory statements because people are testing different things. For example, I'm trying the OP project for now, not yours (sorry).

di-kang commented 5 years ago

@starry-abyss Got it ;) Though there are many issues about jittering already and I think they are closely related and may have the same root cause.

starry-abyss commented 5 years ago

Update on OP issue. I found some options in Godot to cap the fps without using v-sync. So for me it's 60 fps with v-sync off and not ~4000 now. And the very fact of switching off v-sync fixes the issue for me.

I wonder if v-sync makes sense in windowed mode at all. Windows seems to use v-sync by itself, and probably it fights with the Godot game who will prepare the frame faster after v-sync signal is received. Also IIRC other games only tear in fullscreen with v-sync off, and not in windowed mode.

starry-abyss commented 5 years ago

FYI, diiiiiiiii's issue continues here instead: #25162

starry-abyss commented 5 years ago

Besides the v-sync off approach, I found an interesting Windows-specific way (by the commit description it might be this issue), not sure if Godot already uses this, but maybe someone has time to try: https://github.com/glfw/glfw/commit/8309e0ecb09fe5cf670dff5df1e7ca71821c27bd Also this is related: https://bugzilla.mozilla.org/show_bug.cgi?id=1127151

However, there is also this thread which goes into more detail and with different approaches: https://bugs.chromium.org/p/chromium/issues/detail?id=467617 And this is complementary, shorter and more to the point, but also with some emotions in the beginning: https://www.vsynctester.com/firefoxisbroken.html

starry-abyss commented 5 years ago

Changed stutter word to jitter in my above report, since that's what I experienced (see https://docs.godotengine.org/en/latest/tutorials/misc/jitter_stutter.html).

starry-abyss commented 5 years ago

@ByTheQuietLake My idea was to turn v-sync off only in windowed mode (i.e. it can be done from code, even might query the monitor's refresh rate for fps cap), but since core devs don't support the approach, there is nothing to reconsider yet. :) There are other more Windows-specific ways, but we still have to prove that they work good and are not too hacky.

MightyPrinny commented 5 years ago

Update on OP issue. I found some options in Godot to cap the fps without using v-sync. So for me it's 60 fps with v-sync off and not ~4000 now. And the very fact of switching off v-sync fixes the issue for me.

I wonder if v-sync makes sense in windowed mode at all. Windows seems to use v-sync by itself, and probably it fights with the Godot game who will prepare the frame faster after v-sync signal is received. Also IIRC other games only tear in fullscreen with v-sync off, and not in windowed mode.

how did you limit your fps to 60?

starry-abyss commented 5 years ago

Using "Force fps" field somewhere in Debug category of Project settings

Воскресенье, 17 февраля 2019, 9:25 +03:00 от FabiánLC notifications@github.com:

Update on OP issue. I found some options in Godot to cap the fps without using v-sync. So for me it's 60 fps with v-sync off and not ~4000 now. And the very fact of switching off v-sync fixes the issue for me. I wonder if v-sync makes sense in windowed mode at all. Windows seems to use v-sync by itself, and probably it fights with the Godot game who will prepare the frame faster after v-sync signal is received. Also IIRC other games only tear in fullscreen with v-sync off, and not in windowed mode. how did you limit your fps to 60? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or mute the thread .

Ford81 commented 5 years ago

I haven't seen people posting their CPUs with systems, except for and I5-2500K which has an integrated Intel GPU.

My laptop has both an intel integrated GPU and a dedicated Nvida card. Im just wondering if there could be issue between the two gpu/drivers and godot

AdamRatai commented 5 years ago

Maybe. But it not look like gpu/cpu dependent. On i7 2700 + 1080ti can be stuttery (windowed) and butter smooth on mobile i5 with intel 4000 (1st gen surface pro) - in fullscreen.

Ford81 commented 5 years ago

Funny you should say that If I run the demo project on my laptops 940m I see the stuttering. However when I run the application using the dedicated Intel 530 I see no stuttering at all.

Windows 10 home i3-6100H CPU @ 2.70GHz, GeForce 940M (26.21.14.3064) Intel(R) HD Graphics 530 (26.20.100.6709)

Calinou commented 5 years ago

Is the stuttering visible in this project? (Move by pressing the arrow keys.)

Ford81 commented 5 years ago

I just did a quick export leaving interpolation on and setting physics to 60: 940M there was occasional jerks but not shearing Intel 530 there was no jerks but at times obvious vsync shearing,

I do more later, and let you know.

victorbstan commented 4 years ago

I have had some success it seems with capping my FPS at 60. Not sure if 60 is a magic number, my screen can support 144, I did try to set the cap at 144, but the stuttering was still visible. I lowered my FPS to 120, the stutter was still visible, but not as "blurry", which makes me think it's just occuring at a lower interval. Followed up with lowering FPS to 80, and the same result as previously, but stuttering now visibly slower. Also, I should say, I disabled v-sync and running in windowed mode, I have tested with fullscreen, but same result. Are there any processes in the engine capped at 60 FPS?

Calinou commented 4 years ago

Are there any processes in the engine capped at 60 FPS?

By default, physics are simulated at 60 FPS, which means that there will be a visible discrepancy when the rendering FPS is higher than the physics FPS (provided the display is fast enough to show the difference). The physics FPS can be changed in the Project Settings (Physics > Common > Physics Fps).

It can be alleviated by interpolating physics bodies, but there's no official support for this. In 3.2alpha, you can use this smoothing add-on which makes it easy to interpolate nodes.

victorbstan commented 4 years ago

Are there any processes in the engine capped at 60 FPS?

By default, physics are simulated at 60 FPS, which means that there will be a visible discrepancy when the rendering FPS is higher than the physics FPS (provided the display is fast enough to show the difference). The physics FPS can be changed in the Project Settings (Physics > Common > Physics Fps).

It can be alleviated by interpolating physics bodies, but there's no official support for this. In 3.2alpha, you can use this smoothing add-on which makes it easy to interpolate nodes.

Awesome, thanks, that might explain why characters stuttering as the movement is handled in the physics process call

starry-abyss commented 4 years ago

Still can reproduce in 3.1.1 BTW, the easiest way is with Shadertoy open in Firefox (https://github.com/godotengine/godot/issues/19783#issuecomment-455830124)

sprite-1 commented 4 years ago

I stumbled across here hoping there would be a solution but after trying almost every advice I saw on this thread, still no dice. For me, the jittering only happens when I run the project in the NVIDIA card. If I run it using the integrated Intel GPU, it runs silky smooth. :/

I'm using the latest alpha build of Godot 3.2 on Windows 10

MightyPrinny commented 4 years ago

I stumbled across here hoping there would be a solution but after trying almost every advice I saw on this thread, still no dice. For me, the jittering only happens when I run the project in the NVIDIA card. If I run it using the integrated Intel GPU, it runs silky smooth. :/

I'm using the latest alpha build of Godot 3.2 on Windows 10

I don't think you can fix it on windows, this doesn't happen on linux, this might be fixed in 4.0 with the new vulkan renderer.

sprite-1 commented 4 years ago

I stumbled across here hoping there would be a solution but after trying almost every advice I saw on this thread, still no dice. For me, the jittering only happens when I run the project in the NVIDIA card. If I run it using the integrated Intel GPU, it runs silky smooth. :/ I'm using the latest alpha build of Godot 3.2 on Windows 10

I don't think you can fix it on windows, this doesn't happen on linux, this might be fixed in 4.0 with the new vulkan renderer.

Well that sucks, doesn't the Vulkan API only focus on high end devices?

I specifically target OpenGL 2.0 so I can support low-end devices. It's kinda silly to use a very high end graphics API just for a 2D game and shut out people with lower end computers/laptops. 😕

starry-abyss commented 4 years ago

Sounds like a myth. Maybe stuttering from time to time cannot be fixed ATM, but the stutterware we are experiencing is a Godot-only feature.

sprite-1 commented 4 years ago

Sounds like a myth.

What were you referring to with this?

clayjohn commented 4 years ago

This is a challenging issue. One the one hand I would like to personally fix this ASAP. But I can't reproduce, so there is nothing I can do. (I use Windows 10 with an NVidia graphics card)

Someone who can reproduce the issue needs to take a stab at fixing it unfortunately. :(

While it's an uncommon problem, it seems to be common enough to draw lots of people to this thread. So hopefully one of you can work on this.

starry-abyss commented 4 years ago

Ah, I'm always forgetting that what I experience is called jitter in official Godot doc terms.

Does anyone know how to perfectly capture the issue in 60 FPS without buying some hardware? I think some people underestimate how shitty it looks, and maybe also it's a different-looking issue on different PCs.

What were you referring to with this?

The myth: "this is always like that on OpenGL (or Windows, etc). Only Vulkan can save us".

starry-abyss commented 4 years ago

OK, so:

  1. this is a video from OBS: https://www.youtube.com/watch?v=osbJlk1XD8c The impact of OBS is that just having OBS running makes this jitter in the Godot project (even when capture is off).
  2. Without OBS it's smooth until I unminimize Firefox with shadertoy in it, then it starts stuttering, but cannot capture with OBS, because 1.
sprite-1 commented 4 years ago

Chipping in my own recording, this is done with Bandicam and for the most part this is how it performs with or without recording. As you can see, it starts out smooth but gradually starts having issues

image