Open this .love file, and try setting vsync to true and false in conf.lua. Observe the differences.
Why?
VSync affecting physics?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
VSync affecting physics?
- Attachments
-
- tilt test.love
- (1.01 MiB) Downloaded 54 times
Last edited by Tesselode on Sat Oct 30, 2010 4:19 am, edited 1 time in total.
Re: VSync affecting physics?
The .love file is a lie!Tesselode wrote:Open this .love file, and try setting vsync to true and false in conf.lua. Observe the differences.
Why?
(You forgot to post it)
Re: VSync affecting physics?
Facepalm. Fixed.Motig wrote:The .love file is a lie!Tesselode wrote:Open this .love file, and try setting vsync to true and false in conf.lua. Observe the differences.
Why?
(You forgot to post it)
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Denver, CO
- Contact:
Re: VSync affecting physics?
Not much better.
Re: VSync affecting physics?
I got it running and observed the difference you are talking about. My initial expectation was that you were including game logic somewhere within love.graphics.draw (which would typically be limited to 60fps by v-sync) but the code exhibits pretty good structure and separation of game-logic from rendering. That said, no fucking idea. Good luck.
(Edit: This may be related to some sort of bug in LOVE where Box2D / Particle Engine calls are limited internally by v-sync, but you would have to ask a LOVE developer about that.)
(Edit: This may be related to some sort of bug in LOVE where Box2D / Particle Engine calls are limited internally by v-sync, but you would have to ask a LOVE developer about that.)
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: VSync affecting physics?
That makes sense, because there is a single game loop: love.run() (it's even implemented in Lua and everything).ninwa wrote:(Edit: This may be related to some sort of bug in LOVE where Box2D / Particle Engine calls are limited internally by v-sync, but you would have to ask a LOVE developer about that.)
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: VSync affecting physics?
Note that I didn't actually do it, but if your code is affected by how many times love.update is called (especially when it still is 60 Hz!) you must be doing something wrong.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: VSync affecting physics?
I've read the thing, and he doesn't use dt *ever* (as in, no argument to love.update), but he does use getDelta when calling world:update().
Help us help you: attach a .love.
Re: VSync affecting physics?
Will it help if I use dt? I tried using it before. I could get it to work in the love.update loop, but when I tried to pass it to other functions, it didn't work. Is there a difference between dt and love.timer.getDelta?
Some people have been reporting performance problems with the game and I'm thinking this VSync issue might have something to do with it.
Some people have been reporting performance problems with the game and I'm thinking this VSync issue might have something to do with it.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: VSync affecting physics?
dt is obtained from love.timer.getDelta(), so that shouldn't change anything, you might want to limit the timesteps. (i.e. use a fixed timestep, and use that enough times to 'fill' dt)
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot], slime and 210 guests