Page 24 of 92

Re: Simple Tiled Implementation - STI v0.8.2

Posted: Mon Sep 22, 2014 1:10 pm
by roccosportal
I had a look at the demo. I'm actually not quite sure what the purpose of the custom layer is. I removed addCustomLayer in the demo, called the draw method manually and instead of map.layers["Sprite Layer"].sprite I used spriteLayer.sprite. Everything works fine. So i don't see a reason to create a custom layer. It seems like STI holds the custom layer but does not do anything with it.

So I would do it like you suggested but skip step 3.

Re: Simple Tiled Implementation - STI v0.8.2

Posted: Mon Sep 22, 2014 5:09 pm
by Karai17
The custom layer is used to store user data inside of a map. Since a map is built on several layers, you must inject your data into the map wherever you want it to be. A prime example of this is in Super Mario World. Notice how that tree is on the forefront of the level's layers? You need some way to put user data within the map's draw order, and custom layers is the most organized way to do that (injecting user data in several tile/object layers would be ugly).

Re: Simple Tiled Implementation - STI v0.8.2

Posted: Mon Sep 22, 2014 9:01 pm
by roccosportal
Ah, it is used to have a correct drawing order. That makes sense. Thank you for the hint!

Re: Simple Tiled Implementation - STI v0.8.3

Posted: Wed Sep 24, 2014 7:03 am
by Karai17
Just pushed a pretty important update to STI. A few minor bug fixes aside, the meat of this update is the new screen<->tile conversion functions. There are functions for all three map types. These gist of these functions is that they allow you to click the screen and determine which tile was pressed. There are also reverse functions where you can pass in a fraction of a tile and get the exact pixel on screen in return.

Check out the documentation for more info!

I suspect this will be the last update where map.lua is under 1000 lines. :(

Re: Simple Tiled Implementation - STI v0.9.0

Posted: Wed Sep 24, 2014 11:39 pm
by Karai17
¡¡Double Post!!

STI v0.9.0 now supports animated tiles! A big thanks to Clean3d for the patch!

STI is at a point where we are very close to being feature-complete. A few more small things and some bug fixing, micro-optimizations, and unit testing and I might just be able to officially release a "stable" version!

Re: Simple Tiled Implementation - STI v0.9.0

Posted: Thu Sep 25, 2014 7:51 am
by Snuux
You are monster! It's really awesome lib. Thanks for it.

Re: Simple Tiled Implementation - STI v0.9.0

Posted: Thu Sep 25, 2014 8:07 am
by Karai17
:oops: :neko: :oops: <3 :neko: :oops: :neko:

Re: Simple Tiled Implementation - STI v0.9.0

Posted: Thu Sep 25, 2014 9:48 pm
by Jeeper
Karai17 wrote:¡¡Double Post!!

STI v0.9.0 now supports animated tiles! A big thanks to Clean3d for the patch!

STI is at a point where we are very close to being feature-complete. A few more small things and some bug fixing, micro-optimizations, and unit testing and I might just be able to officially release a "stable" version!
That is amazing, very well done! Our current project will be using animated tiles :D

So thank you for all the hard work that you put into it!

Re: Simple Tiled Implementation - STI v0.9.0

Posted: Thu Sep 25, 2014 9:48 pm
by Jeeper
Karai17 wrote:¡¡Double Post!!

STI v0.9.0 now supports animated tiles! A big thanks to Clean3d for the patch!

STI is at a point where we are very close to being feature-complete. A few more small things and some bug fixing, micro-optimizations, and unit testing and I might just be able to officially release a "stable" version!
That is amazing, very well done! Our current project will be using animated tiles :D

So thank you for all the hard work that you put into it!

Re: Simple Tiled Implementation - STI v0.9.1

Posted: Fri Sep 26, 2014 6:19 am
by Karai17
0.9.1 makes a few internal functions private and fixes a crash.