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.
Simple Tiled Implementation - STI v1.2.3.0
-
- Prole
- Posts: 3
- Joined: Sun Sep 21, 2014 10:44 am
Re: Simple Tiled Implementation - STI v0.8.2
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).
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é
-
- Prole
- Posts: 3
- Joined: Sun Sep 21, 2014 10:44 am
Re: Simple Tiled Implementation - STI v0.8.2
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
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.
Check out the documentation for more info!
I suspect this will be the last update where map.lua is under 1000 lines.
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.9.0
¡¡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!
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!
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.9.0
You are monster! It's really awesome lib. Thanks for it.
My library for easy saving Slib! Try this! Now you can encrypt your save!
- Drop of light LD#30
- OUTRANGE LD#31
(Sorry for my english. I learn it myself, and I don't have enough experience)
- Drop of light LD#30
- OUTRANGE LD#31
(Sorry for my english. I learn it myself, and I don't have enough experience)
Re: Simple Tiled Implementation - STI v0.9.0
<3
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.9.0
That is amazing, very well done! Our current project will be using animated tilesKarai17 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!
So thank you for all the hard work that you put into it!
Re: Simple Tiled Implementation - STI v0.9.0
That is amazing, very well done! Our current project will be using animated tilesKarai17 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!
So thank you for all the hard work that you put into it!
Re: Simple Tiled Implementation - STI v0.9.1
0.9.1 makes a few internal functions private and fixes a crash.
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: No registered users and 1 guest