Jittery movement woes

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
nofxboy1234
Prole
Posts: 6
Joined: Tue Oct 22, 2013 1:46 pm

Jittery movement woes

Post 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 :)
Attachments
test_game.love
(12.71 KiB) Downloaded 194 times
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: Jittery movement woes

Post by Kingdaro »

If anything, the frame-limiting love.run function would be the cause. Why not just use vsync?
nofxboy1234
Prole
Posts: 6
Joined: Tue Oct 22, 2013 1:46 pm

Re: Jittery movement woes

Post by nofxboy1234 »

Hi Kingdaro

Even if I remove the love.run function, it does the same thing...
Clouds
Prole
Posts: 23
Joined: Tue Nov 27, 2012 4:06 am

Re: Jittery movement woes

Post 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.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Jittery movement woes

Post by Karai17 »

Alternatively, I found that disabling Windows Aero helped remove jitter.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
nofxboy1234
Prole
Posts: 6
Joined: Tue Oct 22, 2013 1:46 pm

Re: Jittery movement woes

Post 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
Attachments
test_love_game.love
(760 Bytes) Downloaded 163 times
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 14 guests