*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 :-)
Search found 6 matches
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 ...
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.
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.
- Sat Mar 14, 2009 2:36 pm
- Forum: Libraries and Tools
- Topic: CAMERA: scrolling and scaling
- Replies: 50
- Views: 49767
Re: CAMERA: scrolling and scaling
I'm pretty sure line 533 should have a nil instead of a mil.
EDIT: Ooops. That's already fixed. Wasn't used to use a wiki as VCS. My fault.
Code: Select all
function love.mouse.getY()
return camera.present:unpos(nil, camera.love.mouse.getY())
end
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(...
waitkey()
Hi there.
How would you go about implementing a waitkey function?
With coroutines this should be possible. But how?
-phoku
How would you go about implementing a waitkey function?
With coroutines this should be possible. But how?
-phoku