I usually download the repo into a folder called "sti," and with Lua, you can actually just require "sti" and it'll automatically find an init.lua file for ya.
You can do that with folders as long as you've got an init.lua inside of one!
So yeah, just grab that repo, drop it into a folder name of your choice, and just require it up, dog!
Good luck out there.
Simple Tiled Implementation - STI v1.2.3.0
- NightKawata
- Party member
- Posts: 294
- Joined: Tue Jan 01, 2013 9:18 pm
- Location: Cyberspace, Room 6502
- Contact:
Re: Simple Tiled Implementation - STI v0.14.1.12
"I view Python for game usage about the same as going fishing with a stick of dynamite. It will do the job but it's big, noisy, you'll probably get soaking wet and you've still got to get the damn fish out of the water." -taylor
Re: Simple Tiled Implementation - STI v0.14.1.12
There is none. With Lua you can require a directory if that directory has an init.lua in it.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: Simple Tiled Implementation - STI v0.14.1.12
Ahhh, thanks NightKawata and Karai17. I did not thought of that.
Thanks again,
zugende
Thanks again,
zugende
Re: Simple Tiled Implementation - STI v0.14.1.12
Hi, I think you need to download everything into a folder called "sti" and then use it like this:zugende wrote:Hi everyone,
not sure If i missed something..but I can't find the sti.lua file. Can someone help me?
Thaaanks a lot!
Best
Basti
local sti = require "sti"
or
local sti = require "lib.sti"
if you have your sti folder in lib folder and so on
Re: Simple Tiled Implementation - STI v0.14.1.12
Hi quick question
Any idea how can I dump the stitched tilemap into an image/texture ?
Any idea how can I dump the stitched tilemap into an image/texture ?
Re: Simple Tiled Implementation - STI v0.14.1.12
draw the whole map to a large canvas then save the canvas
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: Simple Tiled Implementation - STI v0.14.1.12
Hi everybody,
I want to update a tile but can't get it to work. What am I missing?
When mouse clicked, this code is fired(line 77):
Now, when I click again I can see that the gid changed correctly to 9 but the image is not updated..why?
Thanks a lot for your help!!
Best
zugende
I want to update a tile but can't get it to work. What am I missing?
When mouse clicked, this code is fired(line 77):
Code: Select all
map.layers[1].data[tiley][tilex].gid = 9
Thanks a lot for your help!!
Best
zugende
Re: Simple Tiled Implementation - STI v0.14.1.12
You need to update the spirit batch. Instead of changing the gid, you want to update the whole tile using the tiles table, then update the sprite batch
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: Simple Tiled Implementation - STI v0.14.1.12
Thx for the fast response. But I guess I need some further help with that.Karai17 wrote:You need to update the spirit batch. Instead of changing the gid, you want to update the whole tile using the tiles table, then update the sprite batch
I can imagine that I need to use
Code: Select all
map.tileInstances[i][id].batch
Code: Select all
map.layers[1].data[tiley][tilex] = map.tiles[id]
Thanks a lot!
zugende
Re: Simple Tiled Implementation - STI v0.14.1.12
Looks like you mostly have it. I think the batch id should be in the tile instance, so that will tell you exactly which part of the batch you need to update.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Who is online
Users browsing this forum: Bing [Bot] and 6 guests