; Basic Keyboard Interaction ; the rendering loop ; Will Muto ; Create your window environment Graphics3D 640,480 SetBuffer BackBuffer() ; *IMPORTANT* ; Scene will not be visible without a camera camera=CreateCamera() box = CreateCube(); ; move sphere to x,y,z PositionEntity box,0,0,3 currentPitch = 0 currentYaw = 0 currentRoll = 0 ; Render Loop While Not KeyHit(1) If KeyDown(17)=True Then currentPitch = currentPitch - 2 ;w If KeyDown(31)=True Then currentPitch = currentPitch + 2 ;s If KeyDown(30)=True Then currentRoll = currentRoll - 2 ;a If KeyDown(32)=True Then currentRoll = currentRoll + 2 ;d RotateEntity box,currentPitch,currentRoll,currentYaw UpdateWorld ; Updates objects if animated, and check collisions RenderWorld ; Dump frame to buffer Flip ; Swap front and back frame buffer Wend