     GL_DEPTH_TEST glEnable
     GL_TEXTURE_2D glEnable
     GL_VERTEX_ARRAY glEnableClientState
-    PLAYER-START-LOCATION 0.0 0.0 { 0.0 0.0 0.0 } { 1.0 1.0 1.0 } player boa >>player
+    <player> >>player
+    V{ } clone >>history
     <perlin-noise-table> 0.01 0.01 <scale> { 512 512 } perlin-noise-image
     [ >>sky-image ] keep
     make-texture [ set-texture-parameters ] keep >>sky-texture

:: handle-input ( world -- )
    world player>> :> player
    read-keyboard keys>> :> keys
    key-left-shift keys nth [
        { 2.0 1.0 2.0 } player (>>velocity-modifier)
    ] when
    key-left-shift keys nth [
        { 1.0 1.0 1.0 } player (>>velocity-modifier)
    ] unless

    key-w keys nth [ player walk-forward ] when 
    key-s keys nth [ player walk-backward ] when 

sequences sequences.product specialized-arrays.float
terrain.generation terrain.shaders ui ui.gadgets
ui.gadgets.worlds ui.pixel-formats game-worlds method-chains
math.affine-transforms noise ui.gestures combinators.short-circuit ;
IN: terrain

CONSTANT: FOV $[ 2.0 sqrt 1+ ]
CONSTANT: NEAR-PLANE $[ 1.0 1024.0 / ]
CONSTANT: FAR-PLANE 2.0
CONSTANT: PLAYER-START-LOCATION { 0.5 0.51 0.5 }
CONSTANT: VELOCITY-MODIFIER-NORMAL { 1.0 1.0 1.0 }
CONSTANT: VELOCITY-MODIFIER-FAST { 2.0 1.0 2.0 }
CONSTANT: PLAYER-HEIGHT $[ 1.0 256.0 / ]
CONSTANT: GRAVITY $[ 1.0 4096.0 / ]
CONSTANT: JUMP $[ 1.0 1024.0 / ]
