Help loading Tiled map with STI

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
TheScout18
Prole
Posts: 10
Joined: Tue Aug 25, 2015 2:12 am

Help loading Tiled map with STI

Post by TheScout18 »

I've been working on a small game for a while, and have ran into an issue with my Tiled file that I've exported in a Lua format for Simple Tiled Imp. to load attempting to load the file always results in the error "STI does not yet support Tile Collections" I've searched around for answers to what this means exactly, or possible solutions, but have found nothing... Any help would be greatly appreciated. :)
(I'm really new to Love and Lua in general, sorry if this a bit of a noob question)

Link to a .love of my game: (removed)
Last edited by TheScout18 on Fri Aug 28, 2015 4:57 am, edited 1 time in total.
Ubuntu is pretty cool! :awesome:
http://www.ubuntu.com
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Help loading Tiled map with STI

Post by Karai17 »

You need to make a tile atlas instead of having individual tile images.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
TheScout18
Prole
Posts: 10
Joined: Tue Aug 25, 2015 2:12 am

Re: Help loading Tiled map with STI

Post by TheScout18 »

Ahhh, ok, how might I go about doing that? Besides manually stitching them together?
Ubuntu is pretty cool! :awesome:
http://www.ubuntu.com
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Help loading Tiled map with STI

Post by Karai17 »

I believe there are tools online you can use to stitch them together. Alternatively you can write a love program that reads in images form a folder and creates a texture out of them via ImageData.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
TheScout18
Prole
Posts: 10
Joined: Tue Aug 25, 2015 2:12 am

Re: Help loading Tiled map with STI

Post by TheScout18 »

Out of curiosity... Wouldn't Tiled see combined pictures as just one picture, rather than many? Also, could you maybe link a site of that description? I'm having trouble finding one that doesn't look 100% sketchy...
(or if it's easier, show me how I'd do that ImageData thing? Sorry, I'm quite a noob..)
Ubuntu is pretty cool! :awesome:
http://www.ubuntu.com
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Help loading Tiled map with STI

Post by Karai17 »

Tiled sees them as individual images, it does not convert them to an atlas. The problem with using individual tiles instead of an atlas is that sprite batches use a single image for each batch and if we were to draw a map without batches then drawing would be very slow. I want STI to remain lean and fast so I've decided against implementing Tile Collections since I'd either need to ignore batching or add a bunch of code to dynamically create a texture.

Texture Packer seems to be the go-to program for these scenarios.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
TheScout18
Prole
Posts: 10
Joined: Tue Aug 25, 2015 2:12 am

Re: Help loading Tiled map with STI

Post by TheScout18 »

Thanks a million! Everything's working now! :awesome:
Ubuntu is pretty cool! :awesome:
http://www.ubuntu.com
Post Reply

Who is online

Users browsing this forum: Google [Bot], tpimh and 2 guests