[REBOL] Re: realtime game controls
From: ale870::gmail::com at: 25-Sep-2007 11:31
when creating game controls, it is not a good solution using a SWITCH
statement, since the players could decide (generally speaking) to push more
than one key at once.
So usually the check is performed with several IF statements.
if event/key = left [ .... ]
if event/key = right [ .... ]
if event/key = up [ .... ]
if event/key = down [ .... ]
In this way the game can check if the user push UP and LEFT.
(I worked creating some little games in 3D Game Studio, Blizmax, and more,
so I learned some tricks :-)
On 9/23/07, Anohin Vladimir <anohin.va-gmail.com> wrote:
> Carl, thank you for help and relevant answer.
> The face showing "by request" is great, jerky sprite flies smoothly now.
> It's a shame that R2 has no key-up or key-down events, but we will try
> something else to make controls.
> Thank you again.
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.