   scale = 1
   timeScale = 1
   lastUpdateTime = 0
+  paused = false
 
   $('canvas').attr 'width', width
   $('canvas').attr 'height', height

  $(window).keyup (e) ->
    e.preventDefault()
    if e.keyCode == 32
      if timeScale == 0
        timeScale = 1
      else
        timeScale = 0

  $(window).keydown (e) ->
    e.preventDefault()

    deltaTime = time - lastUpdateTime
    lastUpdateTime = time
    deltaTime *= timeScale
    deltaTime = 0 if paused

    ctx.clearRect 0, 0, width, height
    ctx.translate offset.x, offset.y
