Dave Gone Apeshit
Re: Dave Gone Apeshit
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
Is this something you only experience in our game? If so, is it a problem for both the main menu and the game?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.
- ghostwriter
- Prole
- Posts: 38
- Joined: Sat Dec 11, 2010 11:08 pm
Re: Dave Gone Apeshit
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
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
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Dave Gone Apeshit
Ugh.. windows..
- Buddy4point0
- Prole
- Posts: 35
- Joined: Wed Jan 12, 2011 9:29 pm
- Location: Virginia
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Dave Gone Apeshit
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
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.bartbes wrote:Ugh.. windows..
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
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Dave Gone Apeshit
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.
And unfortunately it's not something we can do anything about, because it's not love that pauses voluntarily, all code execution just stops.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Dave Gone Apeshit
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
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Dave Gone Apeshit
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
Help us help you: attach a .love.
- SoggyWaffles
- Citizen
- Posts: 72
- Joined: Sun Jan 02, 2011 3:27 am
- Location: Wyoming, USA
Re: Dave Gone Apeshit
18 seconds!!!
/me does the victory dance!
Looks good on my machine.
/me does the victory dance!
Looks good on my machine.
"Beneath the clouds lives the Earth-Mother from whom is derived the Water of Life, who at her bosom feeds plants, animals and men." ~Larousse
Who is online
Users browsing this forum: No registered users and 1 guest