This seems to be something mentioned before, but is there any reason you don't have a direct tile-id to tile-properties lookup table? It seems like something that would be super useful, since when doing a collision check with a tile/object, you may want to check for example the "solid" property of said tile. Or the "reactive" property" Or the "bouncy" property. etc etc etc. Sure I've written my own lookup code, that makes such a table, but seems like something that really should be in-built (and if it is, its not documented).
That being said, this is such a useful module and really fast to boot.
local map = sti.new("map")
print(map.tiles[1234].properties)
If you check out my other lib linked in my sig (Peep), then you can more easily view table data to see what potentially undocumented things are lurking about.
Thank you for your kind words, I'm glad people are finding my lib useful!
STI - An awesome Tiled library LÖVE3D - A 3D library for LÖVE 0.10+
You could add it as a function, couldn't you? Seems like it would be easy to me.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
That seems to be only used when adding a new sprite to the batch, not something you'd use dynamically to adjust lighting. I would recommend using a shader for lighting effects.
STI - An awesome Tiled library LÖVE3D - A 3D library for LÖVE 0.10+
Haven't tried myself, but it seems with SpriteBatch:setColor you can assign a color to each quad in the batch. First call setColor and after that use "set" on a quad. If I understand the wiki correctly, then this should also change the color.
micha wrote:Haven't tried myself, but it seems with SpriteBatch:setColor you can assign a color to each quad in the batch. First call setColor and after that use "set" on a quad. If I understand the wiki correctly, then this should also change the color.
That's the exact thing I posted and Karai answered it directly above your post.