gamnit: world_camera position defaults to 1080 pixels in height
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 31 Mar 2017 16:37:03 +0000 (12:37 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Mon, 10 Apr 2017 16:05:05 +0000 (12:05 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/gamnit/flat.nit

index f6e0fd2..027d349 100644 (file)
@@ -218,20 +218,20 @@ redef class App
 
        # Camera for world `sprites` and `depth::actors` with perspective
        #
-       # By default, the camera is configured to respect the resolution
-       # of the screen in world coordinates at `z == 0.0`.
+       # By default, the camera is configured to a height of 1080 units
+       # of world coordinates at `z == 0.0`.
        var world_camera: EulerCamera is lazy do
                var camera = new EulerCamera(app.display.as(not null))
 
-               # Aim for pixel resolution at level 0
-               camera.reset_height
-               camera.near = 100.0
+               # Aim for full HD pixel resolution at level 0
+               camera.reset_height 1080.0
+               camera.near = 10.0
 
                return camera
        end
 
        # Camera for `ui_sprites` using an orthogonal view
-       var ui_camera: UICamera = new UICamera(app.display.as(not null)) is lazy
+       var ui_camera = new UICamera(app.display.as(not null)) is lazy
 
        # World sprites to draw as seen by `world_camera`
        var sprites: Set[Sprite] = new SpriteSet