cube movement... smooth movements..

BlitzPlus Forums/BlitzPlus Beginners Area/cube movement... smooth movements..

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

timer=CreateTimer(50) ; for 50 fps

Repeat
  WaitEvent()
  If EventID()=$4001 ; timertick
    If EventSource()=timer ; optional, if you have more than 1 timer..
    ; update
    EndIf
  EndIf

  If EventID()=$803 quit=true ; windowclose
Until quit


So, each time you press a key just add +1 to your coordinate-variable, the updates go automatically.