 
 # entrypoint
 game.start = ->
-
-    game.director = new lime.Director(document.body,1024,768)
+    @WIDTH = 1024
+    @HEIGHT = 768
+    game.director = new lime.Director(document.body,game.WIDTH,game.HEIGHT)
     game.world = setupWorld()
     game.titleScreen()
 


    player1 = new game.Player
        x: 300
        y: 500
        width: 50
        height: 50
        
    scene.appendChild player1._shape
    game.worldObjects.push player1

    circle = new game.Object
        x: 200
        y: 600
        width: 900
        height: 30

    circle._shape.setFill 155,155,155

    scene.appendChild circle._shape

    game.worldObjects.push circle


#this is required for outside access after code is compiled in ADVANCED_COMPILATIONS mode

setupWorld = ->
    gravity = new box2d.Vec2(0, 200)
    bounds = new box2d.AABB()
    bounds.minVertex.Set -game.WIDTH, -game.HEIGHT
    bounds.maxVertex.Set 2*game.WIDTH, 2*game.HEIGHT
    new box2d.World(bounds, gravity, true)


