Re: realtime game controls
Anton Rolls (anton)
23-Sep-2007/8:21:21-4:00
#43060
<Back Thread Next>
<Back Index Next>
Hi Anohin,
Currently in R2 we can't detect key-up events.
In my little games, I tried to use only the Ctrl
and Shift keys, whose state can be detected continually
with time events, and the mouse. But you have to think
creatively to make a decent interface that way.
A way to detect keys is probably to use a paid-for
View/Pro or View/Command to get external library access,
and link to SDL
http://www.libsdl.org/
I haven't tried this myself, though.
Regards,
Anton.
> With the mouse it's quite easy, but keys are either down/up or
> down/slight-wait/repeat-until-up... It just depends what kind of
> control you need. If you don't want the repeating keys effect,
> you'd need to include a check for the key not being pressed after
> you've first detected it's been pressed.
>
> -- Carl Read.
<Back Thread Next>
<Back Index Next>REBOL.com