local utils = require('utils')
local vector = require('vector')
-local sti = require('plugin/sti')
+local sti = require('plugin.sti')
local assets = {}
fullscreen = false,
}
-config.ControlType =
-{
- System = 0,
- Movement = 1,
-}
-
-
--- I'd kind of like to keep player controls in a dedicated table that these then map into,
--- but that's probably overengineering for now. Maybe a nice move for flexibility.
--- Maybe even any keymapping here could describe the event(s) and params it should push.
--- At some point in the future, keymaps can be switched out contextually for *very* dynamic behavior,
--- like setting up menu systems.
-
-config.keymap = {}
-config.keymap['l'] = { heading = (math.pi / 2) * -0, control = config.ControlType.Movement, }
-config.keymap['k'] = { heading = (math.pi / 2) * -1, control = config.ControlType.Movement, }
-config.keymap['h'] = { heading = (math.pi / 2) * -2, control = config.ControlType.Movement, }
-config.keymap['j'] = { heading = (math.pi / 2) * -3, control = config.ControlType.Movement, }
-config.keymap['d'] = { heading = (math.pi / 2) * -0, control = config.ControlType.Movement, }
-config.keymap['w'] = { heading = (math.pi / 2) * -1, control = config.ControlType.Movement, }
-config.keymap['a'] = { heading = (math.pi / 2) * -2, control = config.ControlType.Movement, }
-config.keymap['s'] = { heading = (math.pi / 2) * -3, control = config.ControlType.Movement, }
-
-config.keymap['q'] = {
- control = config.ControlType.System,
- system_action = function(key)
- print('Quitting')
- love.event.quit()
- end,
-}
-
function love.conf(t)
for k,v in pairs(config.window) do
t.window[k] = v
--- /dev/null
+-- control.lua
+
+local player_module = require('player')
+
+local control = {}
+
+control.ControlType =
+{
+ System = 0,
+ Movement = 1,
+}
+
+-- I'd kind of like to keep player controls in a dedicated table that these then map into,
+-- but that's probably overengineering for now. Maybe a nice move for flexibility.
+-- Maybe even any keymapping here could describe the event(s) and params it should push.
+-- At some point in the future, keymaps can be switched out contextually for *very* dynamic behavior,
+-- like setting up menu systems.
+
+control.keymap = {}
+control.keymap['l'] = { heading = (math.pi / 2) * -0, control = control.ControlType.Movement, }
+control.keymap['k'] = { heading = (math.pi / 2) * -1, control = control.ControlType.Movement, }
+control.keymap['h'] = { heading = (math.pi / 2) * -2, control = control.ControlType.Movement, }
+control.keymap['j'] = { heading = (math.pi / 2) * -3, control = control.ControlType.Movement, }
+control.keymap['d'] = { heading = (math.pi / 2) * -0, control = control.ControlType.Movement, }
+control.keymap['w'] = { heading = (math.pi / 2) * -1, control = control.ControlType.Movement, }
+control.keymap['a'] = { heading = (math.pi / 2) * -2, control = control.ControlType.Movement, }
+control.keymap['s'] = { heading = (math.pi / 2) * -3, control = control.ControlType.Movement, }
+
+control.keymap['q'] = {
+ control = control.ControlType.System,
+ system_action = function(key)
+ print('Quitting')
+ love.event.quit()
+ end,
+}
+
+-- Anything interested in a movement control should register its own handler here.
+function love.handlers.movement_control(key, value)
+ player:movement_control(key, value)
+end
+
+function love.handlers.collision(collider, tile)
+end
+
+return control
-- main.lua
-- Plugins
-local sti = require('plugin/sti')
-local lovebird = require('plugin/lovebird') -- Debugging tool http://127.0.0.1:8000
+local sti = require('plugin.sti')
+local lovebird = require('plugin.lovebird') -- Debugging tool http://127.0.0.1:8000
-- Modules
local conf = require('conf')
local assets = require('assets')
local player_module = require('player')
+local control = require('control')
-local active_map = nil
-player = nil
+active_map = nil
+player = player_module.player
local tx, ty
function love.load()
end
function love.keyreleased(key)
- for k,v in pairs(conf.keymap) do
+ for k,v in pairs(control.keymap) do
if key == k then
- if v.control == conf.ControlType.System then
+ if v.control == control.ControlType.System then
v.system_action(k)
end
- if v.control == conf.ControlType.Movement then
- love.event.push('player_control', k, v)
+ if v.control == control.ControlType.Movement then
+ love.event.push('movement_control', k, v)
end
end
end
end
-function love.handlers.player_control(key, value)
- if value.control == conf.ControlType.Movement then
- player.vec.heading = value.heading
- player.vec.speed = player.speed
- end
-end
-
function love.draw()
active_map:draw(tx, ty, 2.0)
+
+ local r,g,b,a = love.graphics.getColor()
+ love.graphics.setColor(love.math.colorFromBytes(54, 54, 54))
love.graphics.print(IntroMessage, math.floor((conf.window.width/16) * 1), math.floor((conf.window.height/16) * 1))
+ love.graphics.setColor(r,g,b,a)
end
local vector = require('vector')
local collision = require('collision')
-local player_module = {}
+local player_module = {
+ player = nil
+}
function player_module.init_controls(player_obj, active_map)
player_obj.speed = active_map.tilewidth
- player_obj.keyreleased = function(self, key)
- if key == 'q' then love.event.quit(0) end
+ player_obj.movement_control = function(self, key, value)
+ -- Calculate target tile coordinates (current tile + direction)
+ local current_tile_x = math.floor(self.vec.x / active_map.tilewidth)
+ local current_tile_y = math.floor(self.vec.y / active_map.tileheight)
- for k, v in pairs(conf.player_keymap) do
- if key == k and (v.control == conf.ControlType.Movement) then
- -- Calculate target tile coordinates (current tile + direction)
- local current_tile_x = math.floor(self.vec.x / active_map.tilewidth)
- local current_tile_y = math.floor(self.vec.y / active_map.tileheight)
+ -- Direction vectors for each heading
+ local dx = math.floor(math.cos(value.heading) + 0.5)
+ local dy = math.floor(math.sin(value.heading) + 0.5)
- -- Direction vectors for each heading
- local dx = math.floor(math.cos(v.heading) + 0.5)
- local dy = math.floor(math.sin(v.heading) + 0.5)
+ local target_tile_x = current_tile_x + dx
+ local target_tile_y = current_tile_y + dy
- local target_tile_x = current_tile_x + dx
- local target_tile_y = current_tile_y + dy
-
- if not collision.is_tile_collidable(active_map, target_tile_x + 1, target_tile_y + 1) then
- -- Move to target tile (convert back to world coordinates)
- self.vec.x = target_tile_x * active_map.tilewidth
- self.vec.y = target_tile_y * active_map.tileheight
- end
- end
+ if not collision.is_tile_collidable(active_map, target_tile_x + 1, target_tile_y + 1) then
+ -- Move to target tile (convert back to world coordinates)
+ self.vec.x = target_tile_x * active_map.tilewidth
+ self.vec.y = target_tile_y * active_map.tileheight
+ else
+ love.event.push('collision', player_module.player, { x = current_tile_x + 1, y = current_tile_y + 1 })
end
end
end
height = 20,
tilewidth = 16,
tileheight = 16,
- nextlayerid = 5,
- nextobjectid = 10,
+ nextlayerid = 7,
+ nextobjectid = 13,
properties = {},
tilesets = {
{
}
}
}
+ },
+ {
+ name = "monochrome_bw_packed",
+ firstgid = 2157,
+ class = "",
+ tilewidth = 16,
+ tileheight = 16,
+ spacing = 0,
+ margin = 0,
+ columns = 49,
+ image = "../assets/tilesets/kenney_1_bit/Tilesheet/monochrome_bw_packed.png",
+ imagewidth = 784,
+ imageheight = 352,
+ objectalignment = "unspecified",
+ tilerendersize = "tile",
+ fillmode = "stretch",
+ tileoffset = {
+ x = 0,
+ y = 0
+ },
+ grid = {
+ orientation = "orthogonal",
+ width = 16,
+ height = 16
+ },
+ properties = {},
+ wangsets = {},
+ tilecount = 1078,
+ tiles = {
+ {
+ id = 49,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 50,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 51,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 52,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 53,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 54,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 204,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 205,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 206,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 207,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 208,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 253,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 254,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 255,
+ properties = {
+ ["wall"] = true
+ }
+ },
+ {
+ id = 256,
+ properties = {
+ ["wall"] = true
+ }
+ }
+ }
}
},
layers = {
+ {
+ type = "tilelayer",
+ x = 0,
+ y = 0,
+ width = 30,
+ height = 20,
+ id = 6,
+ name = "Background",
+ class = "",
+ visible = true,
+ opacity = 1,
+ offsetx = 0,
+ offsety = 0,
+ parallaxx = 1,
+ parallaxy = 1,
+ properties = {},
+ encoding = "lua",
+ data = {
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157
+ }
+ },
{
type = "tilelayer",
x = 0,
width = 30,
height = 20,
id = 1,
- name = "Tile Layer 1",
+ name = "Decoration",
class = "",
visible = true,
opacity = 1,
offsety = 0,
parallaxx = 1,
parallaxy = 1,
- properties = {
- ["wall"] = true
- },
+ properties = {},
encoding = "lua",
data = {
- 1129, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
- 918, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 919, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 920, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 921, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 922, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 746, 747, 748, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 923, 1, 1, 1, 1, 1, 1, 206, 2684354765, 2684354765, 2684354765, 2684354765, 2684354765, 2684354766, 1, 1, 1, 1, 795, 796, 797, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 924, 1, 1, 1, 1, 1, 1, 205, 1, 1, 1, 1, 1, 205, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 925, 1, 1, 1, 1, 1, 1, 205, 206, 2684354765, 2684354765, 2684354765, 2684354766, 205, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 926, 1, 1, 1, 1, 1, 1, 205, 205, 1, 209, 1, 205, 205, 1, 1, 1, 1, 1, 1, 19, 21, 19, 21, 1, 1, 1, 1, 1, 51,
- 927, 1, 1, 1, 1, 1, 1, 205, 1610612942, 2684354765, 208, 2684354765, 3221225678, 205, 1, 1, 1, 1, 1, 1, 117, 119, 117, 119, 1, 1, 1, 1, 1, 51,
- 928, 1, 1, 1, 1, 1, 1, 205, 1, 1, 3221225677, 1, 1, 205, 1, 1, 1, 1, 1, 1, 19, 21, 19, 21, 1, 1, 1, 1, 1, 51,
- 1129, 1, 1, 1, 1, 1, 1, 1610612942, 2684354765, 2684354765, 1610612943, 2684354765, 2684354765, 3221225678, 1, 1, 1, 1, 1, 1, 117, 119, 117, 119, 1, 1, 1, 1, 1, 51,
- 1129, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 1129, 1, 1129, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 1129, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 1129, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 1129, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 1129, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51,
- 1129, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51
+ 2207, 3025, 3026, 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
+ 3074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 3075, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 3076, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 3077, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 3078, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2902, 2903, 2904, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 3079, 0, 0, 0, 0, 0, 0, 2362, 2684356921, 1610615097, 2684356921, 1610615097, 2684356921, 2684356922, 0, 0, 0, 0, 2951, 2952, 2953, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 3080, 0, 0, 0, 0, 0, 0, 3221227833, 0, 0, 0, 0, 0, 2361, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 3081, 0, 0, 0, 0, 0, 0, 2361, 2362, 1610615097, 2684356921, 1610615097, 2684356922, 3221227833, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 3082, 0, 0, 0, 0, 0, 0, 3221227833, 2361, 0, 2365, 0, 2361, 2361, 0, 0, 0, 0, 0, 0, 2175, 2177, 2175, 2177, 0, 0, 0, 0, 0, 2207,
+ 3083, 0, 0, 0, 0, 0, 0, 2361, 1610615098, 1610615097, 1610615100, 2684356921, 3221227834, 3221227833, 0, 0, 0, 0, 0, 0, 2273, 2275, 2273, 2275, 0, 0, 0, 0, 0, 2207,
+ 3084, 0, 0, 0, 0, 0, 0, 3221227833, 0, 0, 2361, 0, 0, 2361, 0, 0, 0, 0, 0, 0, 2175, 2177, 2175, 2177, 0, 0, 0, 0, 0, 2207,
+ 2207, 0, 0, 0, 0, 0, 0, 1610615098, 1610615097, 2684356921, 1610615099, 2684356921, 1610615097, 3221227834, 0, 0, 0, 0, 0, 0, 2273, 2275, 2273, 2275, 0, 0, 0, 0, 0, 2207,
+ 2207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 2207, 0, 2207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 2207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 2207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 2207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 2207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207,
+ 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207
}
},
{
properties = {},
objects = {
{
- id = 2,
+ id = 11,
name = "Player",
type = "",
shape = "rectangle",
x = 48,
- y = 160,
+ y = 144,
width = 16,
height = 16,
rotation = 0,
- gid = 515,
+ gid = 2671,
visible = true,
properties = {}
}
<?xml version="1.0" encoding="UTF-8"?>
-<map version="1.10" tiledversion="1.11.2" orientation="orthogonal" renderorder="right-down" width="30" height="20" tilewidth="16" tileheight="16" infinite="0" nextlayerid="5" nextobjectid="11">
+<map version="1.10" tiledversion="1.11.2" orientation="orthogonal" renderorder="right-down" width="30" height="20" tilewidth="16" tileheight="16" infinite="0" nextlayerid="7" nextobjectid="13">
<editorsettings>
<export target="test_1.lua" format="lua"/>
</editorsettings>
- <tileset firstgid="1" name="colored_packed" tilewidth="16" tileheight="16" tilecount="1078" columns="49">
- <image source="../assets/tilesets/kenney_1_bit/Tilesheet/colored_packed.png" width="784" height="352"/>
- </tileset>
- <tileset firstgid="1079" name="colored_packed" tilewidth="16" tileheight="16" tilecount="1078" columns="49">
- <image source="../assets/tilesets/kenney_1_bit/Tilesheet/colored_packed.png" width="784" height="352"/>
+ <tileset firstgid="1" name="monochrome_bw_packed" tilewidth="16" tileheight="16" tilecount="1078" columns="49">
+ <image source="../assets/tilesets/kenney_1_bit/Tilesheet/monochrome_bw_packed.png" width="784" height="352"/>
<tile id="49">
<properties>
<property name="wall" type="bool" value="true"/>
<property name="wall" type="bool" value="true"/>
</properties>
</tile>
+ <tile id="51">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
+ <tile id="52">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
+ <tile id="53">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
+ <tile id="54">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
+ <tile id="204">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
+ <tile id="205">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
+ <tile id="206">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
+ <tile id="207">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
+ <tile id="208">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
+ <tile id="253">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
+ <tile id="254">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
+ <tile id="255">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
+ <tile id="256">
+ <properties>
+ <property name="wall" type="bool" value="true"/>
+ </properties>
+ </tile>
</tileset>
- <layer id="1" name="Tile Layer 1" width="30" height="20">
- <properties>
- <property name="wall" type="bool" value="true"/>
- </properties>
+ <layer id="6" name="Background" width="30" height="20">
+ <data encoding="csv">
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+</data>
+ </layer>
+ <layer id="1" name="Decoration" width="30" height="20">
<data encoding="csv">
-1129,869,870,871,872,873,874,875,876,877,878,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,
-918,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,
-919,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,
-920,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,
-921,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,
-922,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,746,747,748,1,1,1,1,1,1,1,1,51,
-923,1,1,1,1,1,1,206,2684354765,2684354765,2684354765,2684354765,2684354765,2684354766,1,1,1,1,795,796,797,1,1,1,1,1,1,1,1,51,
-924,1,1,1,1,1,1,205,1,1,1,1,1,205,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,
-925,1,1,1,1,1,1,205,206,2684354765,2684354765,2684354765,2684354766,205,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,
-926,1,1,1,1,1,1,205,205,1,209,1,205,205,1,1,1,1,1,1,19,21,19,21,1,1,1,1,1,51,
-927,1,1,1,1,1,1,205,1610612942,2684354765,208,2684354765,3221225678,205,1,1,1,1,1,1,117,119,117,119,1,1,1,1,1,51,
-928,1,1,1,1,1,1,205,1,1,3221225677,1,1,205,1,1,1,1,1,1,19,21,19,21,1,1,1,1,1,51,
-1129,1,1,1,1,1,1,1610612942,2684354765,2684354765,1610612943,2684354765,2684354765,3221225678,1,1,1,1,1,1,117,119,117,119,1,1,1,1,1,51,
-1129,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,
-1129,1,1129,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,
-1129,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,
-1129,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,
-1129,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,
-1129,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,
-1129,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51
+51,869,870,871,872,873,874,875,876,877,878,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,
+918,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
+919,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
+920,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
+921,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
+922,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,746,747,748,0,0,0,0,0,0,0,0,51,
+923,0,0,0,0,0,0,206,2684354765,1610612941,2684354765,1610612941,2684354765,2684354766,0,0,0,0,795,796,797,0,0,0,0,0,0,0,0,51,
+924,0,0,0,0,0,0,3221225677,0,0,0,0,0,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
+925,0,0,0,0,0,0,205,206,1610612941,2684354765,1610612941,2684354766,3221225677,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
+926,0,0,0,0,0,0,3221225677,205,0,209,0,205,205,0,0,0,0,0,0,19,21,19,21,0,0,0,0,0,51,
+927,0,0,0,0,0,0,205,1610612942,1610612941,1610612944,2684354765,3221225678,3221225677,0,0,0,0,0,0,117,119,117,119,0,0,0,0,0,51,
+928,0,0,0,0,0,0,3221225677,0,0,205,0,0,205,0,0,0,0,0,0,19,21,19,21,0,0,0,0,0,51,
+51,0,0,0,0,0,0,1610612942,1610612941,2684354765,1610612943,2684354765,1610612941,3221225678,0,0,0,0,0,0,117,119,117,119,0,0,0,0,0,51,
+51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
+51,0,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
+51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
+51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
+51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
+51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
+51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
- <object id="2" name="Player" gid="1593" x="48" y="160" width="16" height="16"/>
+ <object id="11" name="Player" gid="515" x="48" y="144" width="16" height="16"/>
</objectgroup>
</map>