Page 49 of 92

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Sun Jun 05, 2016 8:40 pm
by amcoolio
bobbyjones wrote:
Karai17 wrote:You need to use math.floor to make sure you are translating and drawing to an internet value.
Integer value I think you mean.
Thanks, that fixed it.

If I wanted to take the bottom most layer (in my case, water) and have it scroll in a loop to the right, so that it looks like the waves are moving, how would I do that? It is currently tiled throughout the whole map. Is there a way to call a specific layer that is already in use? I checked the documentation and didn't see any. Sorry, im a noob at this.

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Sun Jun 05, 2016 8:57 pm
by Karai17
You can either animate tiles, or adjust the layer's x and y position, depending on the effect you're after.

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Sun Jun 05, 2016 10:08 pm
by amcoolio
I am trying to make a formula for the x and y coordinates, but not having any luck manipulating the x and y coords from the layer in map.lua.

waterlayer = map.layers["watertile"]
x = waterlayer.x
y = waterlayer.y
print(x,y)

This gets the 0,0 cordinates, and when I use the formula the print() changes, however the layer itself doesn't move.

The blue waves to the far right are the bottom most layer in this image, and it is tiled throughout the map, with another water layer painted on top to give the illusion of the water moving. I just want the waves to move slowly to the left infinitely, nothing complicated

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Sun Jun 05, 2016 10:10 pm
by Karai17
try layer.offset.x/y

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Tue Jun 07, 2016 10:32 pm
by LordSeaworth
Is this library still up to date'ish with latest löve?

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Tue Jun 07, 2016 10:46 pm
by Karai17
Yes, STI will run on LOVE 0.10.1. The version number of STI refers to the features available from Tiled (as of this date, STI should be fully compatible with Tiled 0.14.1). STI will still work with Tiled 0.16 but newer functionality may not be available yet.

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Tue Jun 07, 2016 10:48 pm
by LordSeaworth
Karai17 wrote:Yes, STI will run on LOVE 0.10.1. The version number of STI refers to the features available from Tiled (as of this date, STI should be fully compatible with Tiled 0.14.1). STI will still work with Tiled 0.16 but newer functionality may not be available yet.
Omg the first reply from the 'god' itself.

Thanks for letting me know.
This lib will be a big part of my upcoming project i'm working on.
Was messing with it yesterday and it already seemed great.

PS: I have a few questions about sti.
Would you mind if i ask them here?

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Tue Jun 07, 2016 10:52 pm
by Karai17
Have at it. :)

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Tue Jun 07, 2016 10:57 pm
by LordSeaworth
Karai17 wrote:Have at it. :)
Okay.
First off I want to let you know i'm a total noob at this (at this time).
So if i ask a questions that seems stupid please excuse me.

So I'm using STI toghether with bump or atleast thats what the general idea is.
So I've been able to load a sti map and have a bump object on it.
Is it correct that you need to download bump seperatly? right? The plugin in your repository is just a plugin for STI itself right?
I've downloaded latest bump and added that in my libs folder.
If this is incorrect please correct me.

Also when i calculate the 'objects' with world:countItems() i've get a return of 1 wich is correct cause i added one object. with world:add() but how do i make my tiles from sti also be object? Seems they don't get added?

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Tue Jun 07, 2016 11:08 pm
by Karai17
You need to download bump separately, yes. The plugin is simply an interface.

In Tiled, you can set custom properties of basically anything. Layers, tiles, objects, etc. If you set a property called "collidable" and give it the value "true", then when you initialize your physics world, in your case Map:bump_init(), it should detect all of those collidable flags and convert them into physics objects.