Page 2 of 3

Re: Dave Gone Apeshit

Posted: Fri Jan 21, 2011 8:41 pm
by thelinx
I would really play this more if it wasn't for my mean ATI drivers turning the game into a screen tearing-fest. :(

Re: Dave Gone Apeshit

Posted: Sat Jan 22, 2011 3:27 pm
by Lukasz
thelinx wrote:I would really play this more if it wasn't for my mean ATI drivers turning the game into a screen tearing-fest. :(
Is this something you only experience in our game? If so, is it a problem for both the main menu and the game?

Re: Dave Gone Apeshit

Posted: Sat Jan 22, 2011 5:28 pm
by ghostwriter
Very cool :)
You might want to define a MAX_TIMESTEP (i usually use around 0.1 seconds), and then in the update function of main.lua you can start with dt = math.min(dt,MAX_TIMESTEP). Right now it's possible to exploit the unlimited timestep by grabbing the title bar of the window til you get the high score :joker:

Re: Dave Gone Apeshit

Posted: Sat Jan 22, 2011 8:46 pm
by bartbes
Ugh.. windows..

Re: Dave Gone Apeshit

Posted: Sat Jan 22, 2011 9:48 pm
by Buddy4point0
Just tried it out. You've made a fun game!
I like it :)

Re: Dave Gone Apeshit

Posted: Thu Jan 27, 2011 10:14 pm
by Jasoco
ghostwriter wrote:Very cool :)
You might want to define a MAX_TIMESTEP (i usually use around 0.1 seconds), and then in the update function of main.lua you can start with dt = math.min(dt,MAX_TIMESTEP). Right now it's possible to exploit the unlimited timestep by grabbing the title bar of the window til you get the high score :joker:
bartbes wrote:Ugh.. windows..
Yeah. It can be exploited in OS X too if you press and hold on the Close X. In Löve, when you press the Close X, the action stops (Update and draw don't update or draw) until you let go. (Move the mouse away from the X before letting go unless you want to quit Löve.) Since this game just takes the time you started and subtracts it from the current time and uses that for where you are in the level, it lets people exploit the problem by holding the mouse button. Don't know if Linux has a similar problem. OS X doesn't have the "pause action when dragging window" problem due to the way it displays graphics vs. Windows, but I assume Linux also has a problematic graphics rendering engine.

You will need to define a new variable called "gametime" or something in Load. Then use that variable in Update for calculating time and where you are in the game.

Code: Select all

gametime = gametime + dt
To the Löve developers, can this be fixed? Or will developers just have to use the separate game time variable? Because relying on timer.getTime() will not be accurate since it returns how long the application has been running. Not how long the action has been going.

Re: Dave Gone Apeshit

Posted: Thu Jan 27, 2011 10:23 pm
by bartbes
dt will probably be just as big, knowing how it's calculated.
And unfortunately it's not something we can do anything about, because it's not love that pauses voluntarily, all code execution just stops.

Re: Dave Gone Apeshit

Posted: Thu Jan 27, 2011 10:30 pm
by Jasoco

Code: Select all

function love.load()
  startGame() --Or wherever your start game function goes, probably when the Start Game button is clicked.
end

function love.update(dt)
  gameTime = gameTime + dt --Put it inside whatever function or code is executed when the game is running
end

function love.draw()
  love.graphics.print(gameTime, 0, 0) 
  --Will draw this time as a number. Do whatever formatting you want to it to make it look good.
end

function startGame()
  gameTime = 0 --Put it in whatever function you call when you start a game
end

Re: Dave Gone Apeshit

Posted: Fri Jan 28, 2011 7:31 am
by Robin
The only way you can deal with exploits like that is something like:

Code: Select all

function love.update(dt)
    dt = math.min(dt, 0.1) -- or whatever
    -- ...
end

Re: Dave Gone Apeshit

Posted: Sat Jan 29, 2011 3:40 pm
by SoggyWaffles
18 seconds!!!

/me does the victory dance!

Looks good on my machine.