Simple Tiled Implementation - STI v1.2.3.0

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Karai17 »

Okay I see the issue. I have a typo in STI that causes object sprite batches to cap at 100 instead of 1000. Find this area in sti/map.lua and change the 100 to 1000 (or whatever you need the number to be)

https://github.com/karai17/Simple-Tiled ... p.lua#L591
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
4aiman
Party member
Posts: 262
Joined: Sat Jan 16, 2016 10:30 am

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by 4aiman »

Thanks!
Say, does the 1000 cap come from Tiled or was introduced in STI for the sake of performance?
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Karai17 »

Love requires a size for sprite batches and 1000 is the default. You could set it to 100000 if you wanted but it would reserve a chunk of memory. With 1000, it only reserves about 80-150kb of RAM so it's not a big deal.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Positive07 »

Karai could be that an option when loading a map? I think if the developer wants to load a map with 10000000000... then it's his problem not STI's. Just an idea that could probably reduce the number of problem than capping the number of sprites can have
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Karai17 »

When LOVE 0.11 is released, sprite batches will automatically resize if they get filled.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
4aiman
Party member
Posts: 262
Joined: Sat Jan 16, 2016 10:30 am

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by 4aiman »

@Positive07
I don't think that's a problem at all. That is, if one knows where to look.
I (obviously) wasn't :)

Some sort of "STI gotchas" would be of some help here.
Probably.
I'm not the one who knows much about what makes love2d tick. Explanations like
Karai17 wrote:Love requires a size for sprite batches and 1000 is the default.
make me "Wow! Wish I knew that much about it!"
It's great that Karai17 is always in touch. At least it seems to be that way to me ^_^

Is there a way I can donate something to STI?
It's not like I have much to offer, but this kind of devotion deserves a lot, and I'd like to somehow support that.
Last edited by 4aiman on Thu Dec 08, 2016 5:30 pm, edited 1 time in total.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Positive07 »

Yes I suggested it because it's easy to implement it and it has it's benefit, but of course Karai is awesome and will always be around to help. Plus someone that has the same problem will most likely come here again so yeah, it may be pointless.

Didn't know about that 0.11.0 feature Karai, that is great!!
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Karai17 »

I'm glad I'm able to help!
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
LordSeaworth
Prole
Posts: 22
Joined: Tue Jun 07, 2016 10:29 pm

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by LordSeaworth »

Karai17,

This maybe not percé a STI question. But i was just wondering what would be the maximum size of a tiled map? to use with sti?

TxT? Where T is tiles?
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Karai17 »

Really big. STI has no specific limit. If I had to wild a guess, I'd say Tiled uses uint16_t for the dimensions... So something like 65536 in either direction? You'd be a weirdo for making a map that size, though. :)
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest