Search found 24 matches

by Drakkahn
Tue Jan 27, 2015 1:50 am
Forum: Support and Development
Topic: Window being held issue
Replies: 9
Views: 2987

Re: Window being held issue

*facepalm*

I thought it was ok to set dt as a global variable, well that ended up being the problem. Thanks a lot for all your help.
by Drakkahn
Sun Jan 25, 2015 8:32 pm
Forum: Support and Development
Topic: Window being held issue
Replies: 9
Views: 2987

Re: Window being held issue

This is what I now have, however it is not working. If you hold the window long enough all the enemies will end up with the same x and y values.

Code: Select all

function love.update(dt)

	dt=math.min(dt,1/30)

	--run events

end

Code: Select all

self.x=self.x+100*dt
by Drakkahn
Sun Jan 25, 2015 11:04 am
Forum: Support and Development
Topic: Window being held issue
Replies: 9
Views: 2987

Re: Window being held issue

Can someone please post code of this, all my attempts have failed.

My Attempt

Code: Select all

function love.update(dt)

	dtc_start=love.timer.getTime()
	
	--Process events
	
	dtc=love.timer.getTime()-dtc_start

end
Also for the enemy moving im using:

Code: Select all

self.x=self.x+100*dtc
by Drakkahn
Sat Jan 17, 2015 11:17 pm
Forum: Support and Development
Topic: Window being held issue
Replies: 9
Views: 2987

Window being held issue

Is there any way to check if the game window is being held, also is there any way to make so the game won't stop when the window is held.