diff options
| author | cursed22bc <admin@pixeldawn.org> | 2026-03-01 11:17:23 +0200 |
|---|---|---|
| committer | cursed22bc <admin@pixeldawn.org> | 2026-03-01 11:17:23 +0200 |
| commit | 8f9182baff36d33c07c5eb8df795e3cfcd5307a5 (patch) | |
| tree | 97d66e64e36f447b950609d5e849e24f2c438731 /main.lua | |
| parent | 6eacf393b370a7586276108705b805e222a069a5 (diff) | |
improved tileset and load
Diffstat (limited to 'main.lua')
| -rw-r--r-- | main.lua | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -16,7 +16,8 @@ local camera = nil local fonts = require("fonts") local currentState = "game" -local currentLevel = "assets/maps/tilemap1.lua" +local currentMapPath = "assets/maps/tilemap.lua" +local currentTilesetPath = "assets/maps/tileset.png" local world = nil local states = { @@ -36,9 +37,9 @@ end function states.game.load() local World = require("world") world = World:new() - world:load(currentLevel) + world:load(currentMapPath, currentTilesetPath) local target = world:getPlayer() or { x = 0, y = 0, width = 16, height = 16 } - camera = cameraModule:new(target, VIRTUAL_WIDTH/3, VIRTUAL_HEIGHT/3, true, WORLD_TO_CANVAS) + camera = cameraModule:new(target, VIRTUAL_WIDTH/2, VIRTUAL_HEIGHT/2, true, WORLD_TO_CANVAS) world:setCamera(camera) end |
