-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.lua
24 lines (20 loc) · 846 Bytes
/
main.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function love.load()
require('tiles')
--window size to fullscreen and get windowWidth, windowHeight
love.window.setMode(0,0,{fullscreen= true})
windowWidth, windowHeight = love.window.getMode()
--these are the default values, don't have to be defined, you can change if you want
tilesDefinitions.tilesInWidth = 40
tilesDefinitions.tilesInHeight = 25
tilesDefinitions.aspectRatioWidth = 4
tilesDefinitions.aspectRatioHeight = 3
--call this function to ajust game resolution to best fit current window size
gameResolutioninWindow(windowWidth, windowHeight)
end
function love.draw()
for yPosition = 0, tilesDefinitions.tilesInHeight - 1, 1 do
for xPosition = 0, tilesDefinitions.tilesInWidth - 1, 1 do
drawTile(tiles.colorTest, xPosition, yPosition)
end
end
end