Re: Simple Tiled Implementation - STI v0.14.1.5
Posted: Wed Oct 14, 2015 8:46 pm
Added a bump.lua plugin! Thanks to BobbyJones for that!
I've just been looking back through the thread to see if this had been fixed at all as I just started using this library today, nice to see you're on quick with the bug spray hehKarai17 wrote:Fixed a scaling bug where tileset images weren't being filtered properly causing some unhappiness.
Code: Select all
local map = sti.new("map.lua", {}, offsetx, offsety)
Object layers are honestly not really meant to be drawn. They allow you to position simple geometric shapes in Tiled that can then be turned into actual objects in game. Basically place holders. What I recommend doing is creating a Custom Layer and then create new objects within it using the data from the Object Layer, and give each new object its own visible flag and draw function.unrecoverable wrote:If I have an object layer from Tiled and want objects in that layer to toggle visibility, how can I make it do so on the map itself? I'm making a Wizardry-style dungeon crawler and want my map/mini-map to update with changes. For example, I'd like door indicators to disappear when doors are opened, and trap indicators to appear when traps are detected or sprung. I could populate the map with these objects in the game code itself but it's nice to be able to place them with Tiled.
I can grab objects and change visible = true or false just fine and internally the game recognizes when visibility is changed, it just doesn't alter the way the object is displayed in the layer.
Figured as much, thank you!Karai17 wrote:Object layers are honestly not really meant to be drawn. They allow you to position simple geometric shapes in Tiled that can then be turned into actual objects in game. Basically place holders. What I recommend doing is creating a Custom Layer and then create new objects within it using the data from the Object Layer, and give each new object its own visible flag and draw function.unrecoverable wrote:If I have an object layer from Tiled and want objects in that layer to toggle visibility, how can I make it do so on the map itself? I'm making a Wizardry-style dungeon crawler and want my map/mini-map to update with changes. For example, I'd like door indicators to disappear when doors are opened, and trap indicators to appear when traps are detected or sprung. I could populate the map with these objects in the game code itself but it's nice to be able to place them with Tiled.
I can grab objects and change visible = true or false just fine and internally the game recognizes when visibility is changed, it just doesn't alter the way the object is displayed in the layer.