Simple Tiled Implementation - STI v1.2.3.0

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: Simple Tiled Implementation - STI v0.7.4

Post by MadByte »

Great library, anyway I've a small problem with it.

Is it possible that all tiles on the map have to be a fixed tile size (i.e 8x8 in my case) to be added to the data table inside every layer?

I use following code to check if anything is inside the data table:

Code: Select all

  -- Place pads
  for y = 1, #map.layers["objects"].data do
    for x = 1, #map.layers["objects"].data[1] do
      if map.layers["objects"].data[y][x] then
        local sx, sy = map.layers["objects"].data[y][x].w, map.layers["objects"].data[y][x].h
        pads[#pads+1] = newPad(x, x*sx-sx, y*sy-2, 48, 2)
      end
    end
  end
normally this code would add a new pad for x amount of tiles inside the data table, but nothing. if I change "objects" to "level"( thats another tilelayer with 8x8 tiles inside) the pads gets created. Any ideas what causes that ?
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.7.4

Post by Karai17 »

STI follows the Tiled spec, so all tiles in a particular map must be the same size.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: Simple Tiled Implementation - STI v0.7.4

Post by MadByte »

too bad, thanks for your anwser.
Anyway the tiles get drawn correctly. I read about that method to load images as a whole tile in an tutorial for another framework so I thought it would work as expected.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.7.4

Post by Karai17 »

Take a look at the Image Layer type. It's not... Ideal, but it MIGHT do what you want it to do?
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: Simple Tiled Implementation - STI v0.7.4

Post by MadByte »

I already got it to work with the tilelayer. Thanks :)
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.7.5

Post by Karai17 »

Minor update to fix a couple bugs. Tile Properties should not longer be incorrectly offset and drawing individual layers should work as the documentation suggests.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
martov
Prole
Posts: 12
Joined: Thu May 22, 2014 10:55 pm

Re: Simple Tiled Implementation - STI v0.7.5

Post by martov »

with that last update, my tilemap's path's are not longer relative to the root folder, now they appear to be relative to the map's location.

SCREENSHOT here
http://s30.postimg.org/yunvmty2n/Nueva_ ... e_bits.jpg

:o:
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.7.5

Post by Karai17 »

Nothing I changed should have any effect on paths. Did you upgrade from 0.7.4 or was it an earlier version?
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
martov
Prole
Posts: 12
Joined: Thu May 22, 2014 10:55 pm

Re: Simple Tiled Implementation - STI v0.7.5

Post by martov »

I replaced the contents of the old STI with the new one.

maybe I did something wrong?, I tested the code and it worked, then I upgraded STI and this happened.

:(
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.7.5

Post by Karai17 »

Can you send me a .love of your game?
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: Google [Bot] and 4 guests