Hi, me and my friends recently used your library for the Global Game Jam and we noticed an issue:
Sometimes tiles that are flipped and rotated do not show up flipped and rotated in the game. I haven't had time to read the other posts in this thread to see if this was already reported, but I just wanted to bring it up.
Simple Tiled Implementation - STI v1.2.3.0
Re: Simple Tiled Implementation - STI v0.6.11
Are you using the latest version of STI? I added tile flags a few days ago, so they should be working now.
I'm glad you found STI useful, could you share your game with us?
I'm glad you found STI useful, could you share your game with us?
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
-
- Party member
- Posts: 356
- Joined: Wed Jul 03, 2013 4:06 am
Re: Simple Tiled Implementation - STI v0.6.11
Collision Maps are awesome- I've been doing some cool things with layers, so that when you collide with a roof layer it makes the roof invisible, stuff like that. Glad you included that in STI.
Re: Simple Tiled Implementation - STI v0.6.11
You can check it out right here:Karai17 wrote:Are you using the latest version of STI? I added tile flags a few days ago, so they should be working now.
I'm glad you found STI useful, could you share your game with us?
http://globalgamejam.org/2014/games/bak ... ets-go-box
Re: Simple Tiled Implementation - STI v0.6.11
Very cool! Does the issue with tiles not being properly flipped or rotated still happen in the latest version of STI?
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: Simple Tiled Implementation - STI v0.6.11
My shit game uses STI too.
http://globalgamejam.org/2014/games/nic ... inish-last
You may notice a problem when moving (translate) the camera. The Tiles are "separated".
I've the same issue with MOAI. http://getmoai.com/forums/white-lines-r ... ders-t502/
Good luck trying to fix that.
UPDATED: Karai had already fixed this issue. Good work!
http://globalgamejam.org/2014/games/nic ... inish-last
You may notice a problem when moving (translate) the camera. The Tiles are "separated".
I've the same issue with MOAI. http://getmoai.com/forums/white-lines-r ... ders-t502/
Good luck trying to fix that.
UPDATED: Karai had already fixed this issue. Good work!
Re: Simple Tiled Implementation - STI v0.6.11
0.6.11 should fix that.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: Simple Tiled Implementation - STI v0.6.11
I was using v0.6.7 so that explains it.
Some suggestions:
I have a lot of collision layers because the game is dynamic, so I needed to generate a lot of collision layers.
I ended using:
map:createCollisionMap(layername)
local collision = map.collision.data
Which is a bit hacky. The only time collision.data is used in the STI library is when you call map:drawCollisionMap().
My suggestion is to have createCollisionMap return the data, and then to draw the collision map you send the data as a parameter to drawCollisionMap.
I also had hidden layers that was only used for data, but they were still being drawn, so I needed a way to draw each layer on it's own.
The solution was to do this:
self.tiledmap:drawTileLayer(self.tiledmap.layers["Decoration"])
Which looks a bit huge in the code.
Why not have a function that is called like this:
self.tiledmap:drawTileLayer("Decoration")
In tiled, you are able to give some tiles in your tileset special properties, and I needed to use this feature but STI didn't supply it from the start. This was the very hacky edit I made to get the properties:
Most of these are just small gripes, overall STI was a very straightforward and simple library to use. I recommend people use Tiled with STI, since it saves a load of time from having to write your own tile editor.
** also, I didn't fully take the time to read some of the documentation for STI because I was under pressure during the GGJ. correct me if some of these issues are already addressed
Some suggestions:
I have a lot of collision layers because the game is dynamic, so I needed to generate a lot of collision layers.
I ended using:
map:createCollisionMap(layername)
local collision = map.collision.data
Which is a bit hacky. The only time collision.data is used in the STI library is when you call map:drawCollisionMap().
My suggestion is to have createCollisionMap return the data, and then to draw the collision map you send the data as a parameter to drawCollisionMap.
I also had hidden layers that was only used for data, but they were still being drawn, so I needed a way to draw each layer on it's own.
The solution was to do this:
self.tiledmap:drawTileLayer(self.tiledmap.layers["Decoration"])
Which looks a bit huge in the code.
Why not have a function that is called like this:
self.tiledmap:drawTileLayer("Decoration")
In tiled, you are able to give some tiles in your tileset special properties, and I needed to use this feature but STI didn't supply it from the start. This was the very hacky edit I made to get the properties:
Code: Select all
local properties = {}
local id = ((x-1)+(y-1)*w)
for k,v in pairs(tileset.tiles) do
if v.id == id then
properties = v.properties
end
end
map.tiles[gid] = {
gid = gid,
tileset = i,
quad = love.graphics.newQuad(qx, qy, tw, th, iw, ih),
sx = 1,
sy = 1,
r = 0,
properties = properties,
offset = {
x = -map.tilewidth,
y = -tileset.tileheight,
},
}
** also, I didn't fully take the time to read some of the documentation for STI because I was under pressure during the GGJ. correct me if some of these issues are already addressed
Re: Simple Tiled Implementation - STI v0.6.11
First off I want to say thank you for taking enough interest to actually file reports.
I have been undecided about Collision Maps form the very beginning, so I stuffed them in and forgot about them. I do like your idea about returning the data and drawing with a parameter. I'll make that adjustment in my next release. It is worth noting that the code you wrote actually creates a reference, not a clone of the table so if you create another collision map, then Map.collision will no longer match local collision.
Hidden layers are actually not drawn, nor are layers with an opacity of 0. If you check the Map:draw() function, it does a check for layer visibility and opacity before it actually executes a draw command.
All of the data from the Tiled map is imported into the Map object. All layer and tile properties should remain intact, unless I buggered that up somewhere specifically where data is being adjusted instead of imported. If that is so, can you point to the line or method that I erred on?
Thanks!
I have been undecided about Collision Maps form the very beginning, so I stuffed them in and forgot about them. I do like your idea about returning the data and drawing with a parameter. I'll make that adjustment in my next release. It is worth noting that the code you wrote actually creates a reference, not a clone of the table so if you create another collision map, then Map.collision will no longer match local collision.
Hidden layers are actually not drawn, nor are layers with an opacity of 0. If you check the Map:draw() function, it does a check for layer visibility and opacity before it actually executes a draw command.
All of the data from the Tiled map is imported into the Map object. All layer and tile properties should remain intact, unless I buggered that up somewhere specifically where data is being adjusted instead of imported. If that is so, can you point to the line or method that I erred on?
Thanks!
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: Simple Tiled Implementation - STI v0.6.11
¡Double Post!
Just pushed an update. Collision maps are now more flexible by allowing the user to create and store a collision map on their own, and draw particular maps if they see fit. Also fixed that bug where properties were not being loaded properly.
Just pushed an update. Collision maps are now more flexible by allowing the user to create and store a collision map on their own, and draw particular maps if they see fit. Also fixed that bug where properties were not being loaded properly.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Who is online
Users browsing this forum: Bing [Bot] and 2 guests