[REBOL] realtime game controls
From: anohin:va:g:mail at: 23-Sep-2007 11:46
Dear friends,
please show me a way to make better controls for simple game. Now I
have a code like that:
vis/feel: make vis/feel [
detect: func [face event][
if event/type = 'key [
switch event/key [
left [ x: x - 2 ]
right [ x: x + 2 ]
up [ y: y - 2 ]
down [ y: y + 2 ]
#"q" [ quit]
]
]
face/effect: make-draw blk x y
show face
event
]
]
But controlled face is moving jerky and control keys are "sticky", so
when a control is pressed and then is unpressed, face is still moving.
Is there a way to do real-time controls?
Rebol's truly,
Bakava.