/ld28

To get this branch, use:
bzr branch http://9ix.org/bzr/ld28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
STRICT = true
DEBUG = true

require 'zoetrope'
deque = require 'deque'

require 'version'
require 'player'

GameView = View:extend {
   onNew = function (self)
              --self:loadLayers('data/map.lua')
              --self.focus = the.player
              --self:clampTo(self.bg)

              the.player = Player:new{x = the.app.width / 2,
                                      y = the.app.height / 2}
              self:add(the.player)
           end,
   onUpdate = function(self, dt)
                 if the.keys:justPressed('escape', 'q') then
                    the.app:quit()
                 end
              end,
}

the.app = App:new {
   name = "LD Warmup",
   onRun = function (self)
              print('Version: ' .. VERSION)

              self.view = GameView:new()

              if DEBUG then
                 self.console:watch('VERSION', 'VERSION')

                 -- back off that dark overlay a bit
                 self.console.fill.fill[4] = 75
              end
           end,
}