Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] realtime game controls

From: anohin:va:gma:il 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.