Page 4 of 92

Re: Simple Tiled Implementation - STI v0.5.0

Posted: Sun Jan 19, 2014 5:30 am
by Karai17
Big news! After following pauljessup's example, I increased the performance of STI by 250x in my benchmark! The overall performance still isn't quite as good as ATL, but it is 100% usable at this point in time. STI v0.5.0 is now released, and I hope you check out my documentation for a quick guide on optimizing your game with STI.
Kingdaro wrote:Great library, I'll see myself using this in a future project of mine! :awesome:

You should probably link the library itself on the documentation page though, as it's possible someone will find the library through that page itself (that, and it would easily make a good central "hub" for the library, like the lua-enet page.
At the very bottom of the documentation, there are links to the library.

Re: Simple Tiled Implementation - STI v0.5.0

Posted: Sun Jan 19, 2014 3:21 pm
by pauljessup
Awesome! Glad it worked out for you- that's tile based map code I've basically had for 16 years. Based on old QBasic code I downloaded from somewhere else, hah! I've used that through Visual Basic, C, C++, and now Lua and Love2d :)

Re: Simple Tiled Implementation - STI v0.5.0

Posted: Sun Jan 19, 2014 3:25 pm
by Karai17
Ha! Gotta love when a piece of code just works, eh? :)

Re: Simple Tiled Implementation - STI v0.6.0

Posted: Sun Jan 19, 2014 6:55 pm
by Karai17
¡Double Post!

I just added sprite batches to STI and the performance boost in my benchmark was over 150x. That number is very important: STI is now on-par with ATL in draw performance, and vastly superior in load/initialization performance.

With this incredible performance boost, I declare STI to be production-ready. If you find any bugs while testing the library out, please don't be scared to let me know!

Re: Simple Tiled Implementation - STI v0.6.3

Posted: Wed Jan 22, 2014 3:22 am
by Karai17
¡Triple Post!

After many hours and hair pulling, and realization that I am, in fact, a moron... Tile flags now work! You can flip and rotate tiles in Tiled using the XYZ keys and those changes are reflected in STI. Check out the Tech Demo for some trippy Karaifase. :>

Bonus: Press TAB really fast for lols.

Re: Simple Tiled Implementation - STI v0.6.3

Posted: Wed Jan 22, 2014 6:40 pm
by OttoRobba
Has my personal stamp of approval, this is really cool and seems pretty straightforward!
Kudos :)

Re: Simple Tiled Implementation - STI v0.6.5

Posted: Fri Jan 24, 2014 7:50 pm
by Karai17
STI now supports Isometric and Staggered map types! I added a link in the OP that compares the features of STI and ATL. :)

Re: Simple Tiled Implementation - STI v0.6.9

Posted: Sat Jan 25, 2014 1:35 pm
by beforan
Hey I'm playing with STI and it seems really nice and straightforward to get drawing going, so thanks for that :D

I'm experimenting with using an Object Layer for collision. That way I can draw out impassable areas using Tiled's shapes, allowing for impassable edges (1 dimensional rectangle) or arbitrary shaped impassable zones (polygons) rather than just full tiles.

So essentially I have a non-visible object layer and I'm manually querying details of the objects to check for collision, nothing really to do with STI; that's just what's loading the map and drawing the visible bits.

Aaanyway, there seems to be some posts earlier in the thread about x/y in the Tiled 0.9 Lua export not necessarily being accurate and STI handling the offsets.

Could you give some details on this?

Currently if I have STI draw the object layer, where it draws shapes matches where it draws tiles, but doesn't match where my collisions occur by using map.layers[index_of_collidey_layer].objects.x/y

but the numbers in Tiled's Lua file look correct based on tile size and position.


Edit: Augh! nevermind, I forgot to offset the sprite's co-ords suitably, so obviously it was checking the origin x,y of my character dude against the map objects x,y as opposed to more sensible bounds of the character sprite.

Sorry for being a fool.

And major thanks, STI has been really painless to work with so far :D

Re: Simple Tiled Implementation - STI v0.6.9

Posted: Sat Jan 25, 2014 1:58 pm
by Karai17
Thanks, I tried to make it super simple to use! I'm glad you fixed your error. :)

As for the offsets, Tiled 0.9.1 does not export the tile offset of tile layers. That bug was fixed and will be solved in 0.9.2. In the mean time, I just add in the proper offset values and assume the user had offsets of 0,0.

Re: Simple Tiled Implementation - STI v0.6.9

Posted: Sat Jan 25, 2014 3:09 pm
by Daniel Eakins
I've been using this and no bug so far. Also the latest Tiled 0.9.1 dailybuilds are so much better than the "official" Tiled 0.9.1 release ^^