Page 1 of 1

Jittery movement woes

Posted: Wed Sep 03, 2014 7:31 pm
by nofxboy1234
Hi everyone :D!

I'm new to love2D, and would really appreciate it if someone can help me with this question.
I am attaching a test_game that I have started learning with. I can't work out how to get the white square to move smoothly :shock: !
I started learning love2D a few months ago, then my computer died, so now I'm starting fresh again haha.

Thanks :)

Re: Jittery movement woes

Posted: Thu Sep 04, 2014 1:05 am
by Kingdaro
If anything, the frame-limiting love.run function would be the cause. Why not just use vsync?

Re: Jittery movement woes

Posted: Thu Sep 04, 2014 5:15 am
by nofxboy1234
Hi Kingdaro

Even if I remove the love.run function, it does the same thing...

Re: Jittery movement woes

Posted: Fri Sep 05, 2014 4:45 am
by Clouds
I cannot run your .love file - Error main.lua:78: attempt to index global 'joystick_01' (a nil value)

After I edit it so I can run it (just removing all the "or joystick_01:" parts, the motion appears smooth to me. I'm going to guess you have the same problem that some of us have; if you use VSYNC, which is enabled by default, your graphics driver might be dropping frames making motion look jerky. I have forced VSYNC off in my GPU's control panel so your example appeared smooth for me.

If you try disabling VSYNC in your game, whether in the Lua code or in the .conf file or in your computer's settings, it might fix the problem.

Re: Jittery movement woes

Posted: Sat Sep 06, 2014 7:51 am
by Karai17
Alternatively, I found that disabling Windows Aero helped remove jitter.

Re: Jittery movement woes

Posted: Sat Sep 06, 2014 1:05 pm
by nofxboy1234
Thanks guys for the help :awesome: !

I have fixed the problem woohoo. I forgot to mention that I'm using Fedora 21 linux 64bit.

I turned off desktop effects as suggested and the jittering is gone. In my case, for my graphics card settings,
I ran sudo nvidia-settings, under OpenGL Settings, I have Sync to VBlank and Allow Flipping switched on.
In my love config I have vsync on.

I have attached a .love of my working setup so that it might help someone in the future when running love on linux.

I'm so happy it's fixed now. Without your help I'd still be trying to figure it out.
Now I can start learning love2D properly without that annoyance haha :D