From: Randy McShandy Date: Fri, 13 Feb 2026 05:26:56 +0000 (-0600) Subject: Add a test side-scroll map that can change keymaps, some asset management fixes,... X-Git-Url: http://git.mcshandy.xyz/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fside-view;p=sumeriangame Add a test side-scroll map that can change keymaps, some asset management fixes, and an extra tilesheet for layer work. --- diff --git a/main/assets.lua b/main/assets.lua index d8879ba..4351fdd 100644 --- a/main/assets.lua +++ b/main/assets.lua @@ -35,13 +35,19 @@ function assets.integrate_object_layers(pmap) new_layer.offsetx, new_layer.offsetx = layer.offsetx, layer.offsety new_layer.objects = layer.objects - -- Match objects in each layer to a pre-loaded asset-object + -- Match objects in each layer to a pre-loaded asset-object. + -- If an object (like the player) appears in multiple maps, + -- track unique instances of that object's positional info + -- for hot swapping on a map change. Otherwise, each initial load + -- of a map will override the first position an object is drawn in (and worse). for ok,ov in pairs(new_layer.objects) do local object = assets.get_object(ov.name) if object then object.image = love.graphics.newImage(object.path) - object.vec.x = ov.x - object.vec.y = ov.y + pmap[ov.name] = {} + -- Tiled does y values from the bottom of the sprite so pull up 1 + pmap[ov.name].vec = vector.new_xy(ov.x, ov.y - pmap.tileheight) + pmap[ov.name].name = ov.name end end @@ -139,9 +145,14 @@ assets.store_object('Player', { end }) +function assets.all_objects() + return AssetTables[AssetClass.Object] +end + -- STI only supports images for tilesheet sources in a tilemap, not a tsx file -- Mostly just embed the tileset in Tiled so it knows to reference the original -- tilesheet png directly. assets.store_map('test_map_1', 'tiled/test_1.lua') +assets.store_map('side_scroll', 'tiled/side_scroll.lua') return assets diff --git a/main/assets/tilesets/kenney_1_bit/Tilesheet/monochrome_ba_packed.png b/main/assets/tilesets/kenney_1_bit/Tilesheet/monochrome_ba_packed.png new file mode 100644 index 0000000..0036d2b Binary files /dev/null and b/main/assets/tilesets/kenney_1_bit/Tilesheet/monochrome_ba_packed.png differ diff --git a/main/control.lua b/main/control.lua index daac70a..f4007f4 100644 --- a/main/control.lua +++ b/main/control.lua @@ -60,9 +60,22 @@ control.keymap['global']['x'] = { end, } +control.keymap['global']['c'] = { + control = control.ControlType.System, + system_action = function(key) + render.activate_map('side_scroll') + end, +} + +control.keymap['global']['v'] = { + control = control.ControlType.System, + system_action = function(key) + render.activate_map('test_map_1') + end, +} + function control.search_keymap(key, keymap) local key_found = false - --for k,v in pairs(control.keymap.active_keymap) do for k,v in pairs(keymap) do if key == k then key_found = true diff --git a/main/main.lua b/main/main.lua index cc3e4ef..b0ab403 100644 --- a/main/main.lua +++ b/main/main.lua @@ -15,8 +15,6 @@ local render = require('render') player = player_module.player function love.load() - print(love.graphics.getRendererInfo()) - love.graphics.setFont(assets.get_font('Cuneiform36')) love.audio.play(assets.get_source('intro')) diff --git a/main/render.lua b/main/render.lua index a176880..e457878 100644 --- a/main/render.lua +++ b/main/render.lua @@ -40,7 +40,15 @@ render.activate_map = function(new_map_name) success = true render.map.active_map = new_map render.active_viewclass = render.ViewClassData[new_map.properties.viewclass] - utils.shallow_dump(render.map.active_map.properties) + + -- Find all objects in the map we're switching to, and update their positional + -- info with the unique copy stored in each map. + for key,object in pairs(assets.all_objects()) do + local object_in_map = render.map.active_map[key] + if object_in_map then + object.vec = object_in_map.vec + end + end love.event.push('map_changed', new_map_name) end diff --git a/main/tiled/side_scroll.lua b/main/tiled/side_scroll.lua new file mode 100644 index 0000000..1b2c4c4 --- /dev/null +++ b/main/tiled/side_scroll.lua @@ -0,0 +1,229 @@ +return { + version = "1.10", + luaversion = "5.1", + tiledversion = "1.11.2", + class = "", + orientation = "orthogonal", + renderorder = "right-up", + width = 30, + height = 20, + tilewidth = 16, + tileheight = 16, + nextlayerid = 5, + nextobjectid = 2, + properties = { + ["viewclass"] = "sidescroll" + }, + tilesets = { + { + name = "monochrome_bw_packed", + firstgid = 1, + 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 = {} + }, + { + name = "monochrome_ba_packed", + firstgid = 1079, + class = "", + tilewidth = 16, + tileheight = 16, + spacing = 0, + margin = 0, + columns = 49, + image = "../assets/tilesets/kenney_1_bit/Tilesheet/monochrome_ba_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 = {} + } + }, + layers = { + { + type = "tilelayer", + x = 0, + y = 0, + width = 30, + height = 20, + id = 1, + name = "Background", + class = "", + visible = true, + opacity = 1, + offsetx = 0, + offsety = 0, + parallaxx = 1, + parallaxy = 1, + properties = {}, + encoding = "lua", + data = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + } + }, + { + type = "tilelayer", + x = 0, + y = 0, + width = 30, + height = 20, + id = 3, + name = "CityWalls_bg", + class = "", + visible = true, + opacity = 1, + offsetx = 0, + offsety = 0, + parallaxx = 1, + parallaxy = 1, + properties = {}, + encoding = "lua", + data = { + 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0, 0, 0, 0, 0, 206, 1610612941, 2684354766, 0, 0, 0, 0, 0, 0, 0, 0, 0, 206, 1610612941, 2684354766, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 205, 1, 3221225677, 0, 0, 0, 0, 0, 0, 0, 0, 0, 205, 1, 3221225677, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 206, 1610612943, 1610612941, 1610612943, 2684354766, 0, 0, 0, 0, 0, 0, 0, 206, 1610612943, 1610612941, 1610612943, 2684354766, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 205, 1, 1, 1, 205, 0, 0, 0, 0, 0, 0, 0, 205, 0, 0, 0, 205, 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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + }, + { + type = "objectgroup", + draworder = "topdown", + id = 4, + name = "Object Layer 1", + class = "", + visible = true, + opacity = 1, + offsetx = 0, + offsety = 0, + parallaxx = 1, + parallaxy = 1, + properties = {}, + objects = { + { + id = 1, + name = "Player", + type = "", + shape = "rectangle", + x = 112, + y = 256, + width = 16, + height = 16, + rotation = 0, + gid = 515, + visible = true, + properties = {} + } + } + }, + { + type = "tilelayer", + x = 0, + y = 0, + width = 30, + height = 20, + id = 2, + name = "CityWalls_fg", + class = "", + visible = true, + opacity = 1, + offsetx = 0, + offsety = 0, + parallaxx = 1, + parallaxy = 1, + properties = {}, + encoding = "lua", + data = { + 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, 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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0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 207, 2684354765, 1610612943, 2684354765, 1610612943, 2684354765, 2684354765, 2684354765, 1610612943, 2684354765, 1610612943, 2684354765, 1610612943, 2684354765, 1610612943, 2684354765, 1610612943, 2684354765, 2684354765, 2684354765, 1610612943, 2684354765, 3221225679, 0, 0, 0, + 0, 0, 0, 0, 205, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3221225677, 0, 0, 0, + 0, 0, 0, 0, 205, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 256, 2684354815, 2684354816, 1, 1, 1, 1, 1, 1, 1, 1, 3221225677, 0, 0, 0, + 0, 0, 0, 0, 205, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 254, 3221225727, 1, 1, 1, 1, 1, 1, 1, 1, 3221225677, 0, 0, 0 + } + } + } +} diff --git a/main/tiled/side_scroll.tmx b/main/tiled/side_scroll.tmx new file mode 100644 index 0000000..ae974c3 --- /dev/null +++ b/main/tiled/side_scroll.tmx @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,106,100,106,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,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,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,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,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,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, +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,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,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,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,206,1610612941,2684354766,0,0,0,0,0,0,0,0,0,206,1610612941,2684354766,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,205,1,3221225677,0,0,0,0,0,0,0,0,0,205,1,3221225677,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,206,1610612943,1610612941,1610612943,2684354766,0,0,0,0,0,0,0,206,1610612943,1610612941,1610612943,2684354766,0,0,0,0,0, +0,0,0,0,0,0,0,0,205,1,1,1,205,0,0,0,0,0,0,0,205,0,0,0,205,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,209,0,0,0,0,0,0,0,0,0,0,0,209,0,0,0,0,0,0,0,0,0,209,0,0,0, +0,0,0,0,205,0,209,0,0,0,0,0,0,0,209,0,205,0,209,0,0,0,0,0,0,0,3221225677,0,0,0, +0,0,0,0,207,2684354765,1610612943,2684354765,1610612943,2684354765,2684354765,2684354765,1610612943,2684354765,1610612943,2684354765,1610612943,2684354765,1610612943,2684354765,1610612943,2684354765,2684354765,2684354765,1610612943,2684354765,3221225679,0,0,0, +0,0,0,0,205,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3221225677,0,0,0, +0,0,0,0,205,1,1,1,1,1,1,1,1,1,1,256,2684354815,2684354816,1,1,1,1,1,1,1,1,3221225677,0,0,0, +0,0,0,0,205,1,1,1,1,1,1,1,1,1,1,255,254,3221225727,1,1,1,1,1,1,1,1,3221225677,0,0,0 + + + diff --git a/main/tiled/test_1.lua b/main/tiled/test_1.lua index b11069d..3e6823c 100644 --- a/main/tiled/test_1.lua +++ b/main/tiled/test_1.lua @@ -4,7 +4,7 @@ return { tiledversion = "1.11.2", class = "", orientation = "orthogonal", - renderorder = "right-down", + renderorder = "left-up", width = 30, height = 20, tilewidth = 16, @@ -236,8 +236,8 @@ return { name = "Player", type = "", shape = "rectangle", - x = 48, - y = 144, + x = 16, + y = 32, width = 16, height = 16, rotation = 0, diff --git a/main/tiled/test_1.tmx b/main/tiled/test_1.tmx index d719bf4..3c96aa4 100644 --- a/main/tiled/test_1.tmx +++ b/main/tiled/test_1.tmx @@ -1,5 +1,5 @@ - + @@ -133,6 +133,6 @@ - +