alunizaje/assets/scripts/game.lua
Andros Fenollosa 0182767625 Best controls
2017-01-03 22:05:46 +01:00

19 lines
561 B
Lua

local game = {}
function game.load()
-- Configuration
math.randomseed(os.time())
local width, height = love.window.getDesktopDimensions( display )
game.window = { width = width , height = height }
game.canvas = { width = width, height = 2880 }
love.window.setMode(game.window.width, game.window.height)
game.level = 1
game.play = true
-- Physics
local world_meter = 64
local gravity = 2
love.physics.setMeter(world_meter) -- Height earth in meters
game.world = love.physics.newWorld(0, gravity * world_meter, true) -- Make earth
end
return game