Search found 6 matches

by phoku
Sun Mar 15, 2009 10:37 am
Forum: General
Topic: waitkey()
Replies: 13
Views: 5467

Re: waitkey()

*cough*

This is possible with coroutines. I have attached the proof of concept before.
The question was not whether it's possible, but how to do it good :-)
by phoku
Sun Mar 15, 2009 10:08 am
Forum: General
Topic: waitkey()
Replies: 13
Views: 5467

Re: waitkey()

That's not, you know, blocking . Pushing and popping callbacks as a way of handling game state sure is one way ... Well, I assumed that someone surely had written a system to do this using coroutines, which I could shamelessly ... learn from. So back to the design board it is, for me. Thank you for ...
by phoku
Sat Mar 14, 2009 7:58 pm
Forum: General
Topic: waitkey()
Replies: 13
Views: 5467

Re: waitkey()

Not hard, but inconvenient.
I assumed that someone had already written something along those lines.

I attached a very bad version of the waitkey() 'challenge' 8-)

The image is from http://steampunkwallpaper.com/?paged=3, CC derivative.
by phoku
Sat Mar 14, 2009 2:36 pm
Forum: Libraries and Tools
Topic: CAMERA: scrolling and scaling
Replies: 50
Views: 17838

Re: CAMERA: scrolling and scaling

I'm pretty sure line 533 should have a nil instead of a mil.

Code: Select all

       function love.mouse.getY()
		return camera.present:unpos(nil, camera.love.mouse.getY())
	end
EDIT: Ooops. That's already fixed. Wasn't used to use a wiki as VCS. My fault.
by phoku
Sat Mar 14, 2009 1:51 pm
Forum: General
Topic: waitkey()
Replies: 13
Views: 5467

Re: waitkey()

Sure. The function does not return until the player presses a key. The basic assumption is of course, that this is somehow embedded in scheduling framework, which loads and runs functions as coroutines. A target would a cutscene loader and runner. Example: -- This is a cutscene script. display_text(...
by phoku
Sat Mar 14, 2009 11:09 am
Forum: General
Topic: waitkey()
Replies: 13
Views: 5467

waitkey()

Hi there.

How would you go about implementing a waitkey function?
With coroutines this should be possible. But how?

-phoku