Simple Tiled Implementation - STI v1.2.3.0

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Positive07
Party member
Posts: 1005
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Positive07 » Tue Aug 23, 2016 11:24 pm

Glad I could help! <3
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(Github.com/Positive07)

User avatar
Crossing
Prole
Posts: 42
Joined: Sat Mar 21, 2015 3:37 pm

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Crossing » Sun Aug 28, 2016 11:01 pm

Yeah. So I have my code setup like on the tutorial at Luaspace. My map is in the correct directory. However it's saying when I try to add a new map "attempt to call field "new" (a nil value)" any suggestions?

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

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Karai17 » Sun Aug 28, 2016 11:03 pm

The API was slightly changed and my pull request to the tutorial hasn't been approved yet. You simply want to do sti() instead of sti.new()
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé

User avatar
Crossing
Prole
Posts: 42
Joined: Sat Mar 21, 2015 3:37 pm

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Crossing » Sun Aug 28, 2016 11:18 pm

Thanks so much!

User avatar
Daniel Eakins
Citizen
Posts: 99
Joined: Thu Jul 18, 2013 9:14 pm
Location: France

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Daniel Eakins » Thu Sep 01, 2016 6:58 pm

Hey Karai, I've been slowly getting back into coding and I'm kinda embarrassed because I can't get this module to work anymore :?

More specifically, I don't know what to put in the functions to refer to a layer!

For example, just taking the example demo on GitHub and replacing this one line:

Code: Select all

map:draw()
with this:

Code: Select all

map:drawLayer("Grid")
gets me an error:
sti/init.lua:698: attempt to perform arithmetic on field 'opacity' (a nil value)
Am I doing it wrong or is there a bug maybe?

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

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Karai17 » Fri Sep 02, 2016 3:37 am

drawLayer is looking for a layer object, not just the layer name.

Code: Select all

local layer = map.layers["Grid"]
map:drawLayer(layer)
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé

User avatar
Daniel Eakins
Citizen
Posts: 99
Joined: Thu Jul 18, 2013 9:14 pm
Location: France

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Daniel Eakins » Fri Sep 02, 2016 10:57 am

Awesome thanks for the quick reply :D

Zireael
Party member
Posts: 139
Joined: Fri Sep 02, 2016 10:52 am

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Zireael » Fri Sep 02, 2016 4:01 pm

How does one create a texture atlas in Tiled? I was going to take STI for a spin and it spat out that it doesn't support tilesheets, only texture atlases.
P.S. My Tiled for some reason set itself to the system language, so tell me not only the button name, but where to find it.

User avatar
raidho36
Party member
Posts: 2000
Joined: Mon Jun 17, 2013 12:00 pm

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by raidho36 » Fri Sep 02, 2016 4:07 pm

Tilesheet is an atlas, just built using different conventions. Try running it through atlas generating software, load final final atlas and define sprites in it manually. If that won't work, you can always just feed tiles into it one by one and it'll generate proper atlas.

Zireael
Party member
Posts: 139
Joined: Fri Sep 02, 2016 10:52 am

Re: Simple Tiled Implementation - STI v0.16.0.3

Post by Zireael » Fri Sep 02, 2016 4:27 pm

raidho36 wrote:Tilesheet is an atlas, just built using different conventions. Try running it through atlas generating software, load final final atlas and define sprites in it manually. If that won't work, you can always just feed tiles into it one by one and it'll generate proper atlas.
I don't know any such software - any tips?

Maybe there's a sample working map somewhere I could throw at STI to see how it works?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests