Gravity and lag
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Gravity and lag
Yes I remember that few days ago the bug was not there. I should investigate the git diffs.
Re: Gravity and lag
I think the not-opening-on-certain-computers thing is due to t.screen.fullscreen = true in conf.lua.
The game also doesn't start for me when t.screen.fullscreen is true, however when using love.graphics.setMode(1280, 800, true) or love.graphics.toggleFullscreen() in love.load, it works fine in fullscreen. EDIT: Fullscreen without scaling, that is.
I have no idea why.
This game looks wonderful by the way!
The game also doesn't start for me when t.screen.fullscreen is true, however when using love.graphics.setMode(1280, 800, true) or love.graphics.toggleFullscreen() in love.load, it works fine in fullscreen. EDIT: Fullscreen without scaling, that is.
I have no idea why.
This game looks wonderful by the way!
Last edited by Santos on Sat Jul 21, 2012 10:45 am, edited 1 time in total.
Re: Gravity and lag
A quick check on trash and was still there! I retested and player "lands" well in this version for me.Kivutar wrote:Yes I remember that few days ago the bug was not there. I should investigate the git diffs.
File is Kivutar-twinsisters-9134783.zip
Don't know much about GIT's but I hope this help check faster the wanted version.
Re: Gravity and lag
Thanks a lot! I'm happy that you liked the graphics.This game looks wonderful by the way!
Thank you coffee, I found the commit #9134783 on my github, it was only 2 days ago. Now I can browse my commits to understand the bug.File is Kivutar-twinsisters-9134783.zip
- Puzzlem00n
- Party member
- Posts: 171
- Joined: Fri Apr 06, 2012 8:49 pm
- Contact:
Re: Gravity and lag
Sorry, you miss a lot in a few hours around here!
It still doesn't seem to open, strangely. I'm going to try Santos' suggestion, hold on...
Well, now we're partly getting somewhere. Turning off fullscreen at least allows the program to give me an error message:
It still doesn't seem to open, strangely. I'm going to try Santos' suggestion, hold on...
Well, now we're partly getting somewhere. Turning off fullscreen at least allows the program to give me an error message:
I LÖVE, therefore I am.
Re: Gravity and lag
I don't have much to contribute but just a heads up that in versions before 0.8.0 the first update's "dt" included the load time of the program, so on the first update, dt would be big, which means objects would potentially travel abnormally far (ie. past what your collision detection might expect). It was corrected in 0.8.0.
I don't know how relevant that is to you but it tripped me up for days before I found out what the problem was.
I don't know how relevant that is to you but it tripped me up for days before I found out what the problem was.
- Puzzlem00n
- Party member
- Posts: 171
- Joined: Fri Apr 06, 2012 8:49 pm
- Contact:
Re: Gravity and lag
That is a good thing to point out, rvj, we sort of covered that in the forum link I posted. I find it to be an interesting glitch, you would never think about it when you're coding it together, but it turns out to be such a game-breaker in some genres. Good thing it's fixed so no one has to hack around it.
I LÖVE, therefore I am.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Gravity and lag
Normally you want to call your collision detection in even timesteps, you could do something along these lines:
Note that this is very basic code, and you might want to improve on this concept to get the best expeirence.
Code: Select all
function love.update(dt)
local physics_dt = dt
while physics_dt > 0 do
physics_update(math.min(0.1, physics_dt))
physics_dt = physics_dt - 0.1
end
end
Re: Gravity and lag
Wow I never thought about that before. Thanks, I'm going to give it a try.
- Puzzlem00n
- Party member
- Posts: 171
- Joined: Fri Apr 06, 2012 8:49 pm
- Contact:
Re: Gravity and lag
Wow... I know it's been a while since this thread was relevant (I've gotta stop taking such elongated breaks from this place) but I'm actually at a loss as to what that does. Anyone care to explain just to quench my curiosity?bartbes wrote:Normally you want to call your collision detection in even timesteps, you could do something along these lines:Code: Select all
function love.update(dt) local physics_dt = dt while physics_dt > 0 do physics_update(math.min(0.1, physics_dt)) physics_dt = physics_dt - 0.1 end end
I LÖVE, therefore I am.
Who is online
Users browsing this forum: Google [Bot] and 13 guests