animated tiles on the the TODO list for STI. Tiled currently supports animating tiles in nightly builds, but not the official release. I've been lazy in implementing it myself.
I'm currently working on a commercial project right now so I won't have time to poke at STI for a bit. If you're so inclined, you can download a Tiled nightly and see if you can get animations working in STI (though messing around with sprite batches might be less than fun). Otherwise, you might just have to hold off until I get some time to really look into it. Sorry!
Simple Tiled Implementation - STI v1.2.3.0
Re: Simple Tiled Implementation - STI v0.7.4
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.7.4
Im having some trouble, I cant seem to draw the objects layer using map:draw()
http://s30.postimg.org/xtkn3l68f/Nueva_ ... e_bits.jpg
if I try to use map:drawObjectLayer("Layer name") I get an error
http://s28.postimg.org/wyg6i4lto/Nueva_ ... e_bits.jpg
is this working for everyone else?
http://s30.postimg.org/xtkn3l68f/Nueva_ ... e_bits.jpg
if I try to use map:drawObjectLayer("Layer name") I get an error
http://s28.postimg.org/wyg6i4lto/Nueva_ ... e_bits.jpg
is this working for everyone else?
Re: Simple Tiled Implementation - STI v0.7.4
Make sure the layer name is tin the right casing.
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.7.4
it's all correct as far as I can tell, I dont know what else to try. sorry if it's a silly mistake, I just cant seem to find it.
I read the documentation again and again trying to understand what's wrong.
here, I made a very simple example, could you please take a look at it?
I read the documentation again and again trying to understand what's wrong.
here, I made a very simple example, could you please take a look at it?
- Attachments
-
- a.love
- (964.01 KiB) Downloaded 160 times
Re: Simple Tiled Implementation - STI v0.7.4
Oooh, okay so the problem here is you are passing a string in, not a layer table. This is an oversite in my code and should work. A quick remedy is to put the following at the top of the function before the asser on line 455:
Sorry about that, I'll try to get a fix out soon!
Code: Select all
if type(layer) == "String" then
layer = self.layers[layer]
end
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.7.4
thank you for taking a look, I could not get it to work with your fix so I just coded a work around the library for the stuff I needed to draw
Im getting another problem, when I try to run my code in a computer with an integrated intel GPU I get an error from STI that says something about the power of 2 syndrome. I thought that it was fixed in love2d 8.0, could it be that STI is somehow vulnerable to PO2?
or maybe it's that the computer may not support canvases?
Im getting another problem, when I try to run my code in a computer with an integrated intel GPU I get an error from STI that says something about the power of 2 syndrome. I thought that it was fixed in love2d 8.0, could it be that STI is somehow vulnerable to PO2?
or maybe it's that the computer may not support canvases?
- slime
- Solid Snayke
- Posts: 3161
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Simple Tiled Implementation - STI v0.7.4
On systems which don't support non-power-of-two textures, LÖVE will automatically pad Images but it won't pad Canvases. STI only supports systems with non-power-of-two texture support (personally I've had a computer with that capability since 2005, and it wasn't a top of the line gaming machine either...)
https://github.com/karai17/Simple-Tiled ... /issues/34
https://github.com/karai17/Simple-Tiled ... /issues/34
Re: Simple Tiled Implementation - STI v0.7.4
yeah I thought so.
thanks c:
thanks c:
-
- Prole
- Posts: 5
- Joined: Thu Jul 24, 2014 12:06 am
Re: Simple Tiled Implementation - STI v0.7.4
Hey Karai17, amazing library! Just had one question. I'm a little confused on how to get tile properties to work. I have seen the other questions posted earlier about tile properties but nothing has fixed our issue. Basically all I want to do is iterate through the tiles and sort ones with certain tiled properties.
Here are is the code I have so far
Most of this works but accessing the properties does not.
If you could help me out that would be much appreciated! I know this kind of question has been asked before so I apologize if im just overlooking some simple solution. Overall this is a wonderful library thanks for taking the time to code it!
Here are is the code I have so far
Code: Select all
function findSolidTiles(layer, collider)
local collision_tiles = {}
local half_tiles = {}
local tw = map.tilewidth
local th = map.tileheight
for y=1, map.height do
for x=1, map.width do
local cur_tile = map.tiles[y]
local tx, ty
tx = (x - 1)
ty = (y - 1)
if layer.data[y][x] == 1 then
-- when I try and access the properties is when I run into an issue. They always return nil
print(cur_tile.properties)
local ctile = collider:addRectangle((tx)*16,(ty)*16,16,16) --adds collision to the tile
--down here I plan to assign different colliders depending on the tile
ctile.type = "solid"
collider:addToGroup("tiles", ctile)
collider:setPassive(ctile)
table.insert(collision_tiles, ctile)
else
end
end
end
return collision_tiles
end
If you could help me out that would be much appreciated! I know this kind of question has been asked before so I apologize if im just overlooking some simple solution. Overall this is a wonderful library thanks for taking the time to code it!
Re: Simple Tiled Implementation - STI v0.7.4
your cur_tiles is just a list of tiles, not a specific tile. what you want is map.tiles[y][x]
Alternatively, layer.data[y][x]
Alternatively, layer.data[y][x]
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: No registered users and 1 guest