Hi Justin,

I like the way you separate the input handling from the game logic.
Your library looks interesting and I'm planning on trying it out very soon.
What I'm writing is a point-and-click adventure game engine in which I
create modal interfaces that can be nested, usually returning a value or
values to the interface that started it. I'm trying to have each interface
self-contained, avoiding side-effects when possible for no reason other than
it's conceptually simple for me. However, in the future I foresee the need
to keep animations running in the background during conversation dialogs,
etc..

Thanks,
Stuart

On Wed, Jul 16, 2008 at 11:57 AM, Justin Heyes-Jones <[EMAIL PROTECTED]>
wrote:

> On 16/07/2008, Stuart Overton <[EMAIL PROTECTED]> wrote:
> > No, my first message may not have gotten through, as I posted immediately
> > after joining the mailing list.
>
> Hi Stuart,
>
> Yes that makes sense... when you post the quit event it exits the
> with-events macro, but it also posts the SDL event SDL_QUIT which
> closes all the SDL stuff down and exits the app.
>
> What you're doing seems fine, looking at the code for with-events.
> What I'm doing which side steps this issue is to have my event
> handlers just store information in various systems, and then all the
> logic for my app is done in the idle.
>
> For example, input goes to the input system
>
> http://code.google.com/p/lisp-game-engine/source/browse/trunk/input.lisp
>
> Then my key handling in the main loop looks like this...
>
>  (:key-down-event (:key key)
>                      (input:handle-key-down key))
>    (:key-up-event (:key key)
>                     (input:handle-key-up key))
>
> Then in my main app loop I can check for input like this :
>
> (input:key-held-p :SDL-KEY-A)
>
> and the extra level of indirection lets me store additional info. For
> example I keep track of key press times and you can say
>
> (input:key-held-time :SDL-KEY-A) returns how long the key is held down.
>
> Justin
> _______________________________________________
> application-builder mailing list
> [email protected]
> http://www.lispniks.com/mailman/listinfo/application-builder
>
_______________________________________________
application-builder mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/application-builder

Reply via email to