Simple Tiled Implementation - STI v1.2.3.0

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.7.4

Post by Karai17 »

You're going to want two sets of numbers: grid_x/y and act_x/y.

You will use the grid set for checking collision and incrementing by whole numbers, and use the act[ual] set for your tween.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
sam
Prole
Posts: 32
Joined: Sat Nov 10, 2012 2:18 am

Re: Simple Tiled Implementation - STI v0.7.4

Post by sam »

probably should have said this beforehand, but i'm using a free-moving player, so it's not gridlocked. i'd assume it's the same method, so in either case i'll get on adding the grid_x/y thing
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.7.4

Post by Karai17 »

It's the same yeah, but you need to make sure your player doesn't change grids until he is actually moving to a new grid. In this case, you might want to do a sort of "search" for the nearest tile to determine which tile you should be comparing against.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Foopy64
Prole
Posts: 2
Joined: Tue Apr 08, 2014 12:46 am
Location: Internet
Contact:

Re: Simple Tiled Implementation - STI v0.7.4

Post by Foopy64 »

Hi there, just coming by to say great work! This thing works wonders and soon I will hopefully have a game to show it!
:awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome: :awesome:
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.7.4

Post by Karai17 »

I look forward to seeing how my STI works out for you. ;D
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Eamonn
Party member
Posts: 550
Joined: Sat May 04, 2013 1:29 pm
Location: Ireland

Re: Simple Tiled Implementation - STI v0.7.4

Post by Eamonn »

I'll be using this soon hopefully! I haven't used LÖVE in almost a year and when I came back to find that ATL was "abandoned" so to speak, I was so worried. I was thinking "How can I used Tiled maps in my games using LÖVE now?? I really don't feel like writing my own system", but then I saw this.

I hope that this can do everything I'd need it to do (load Tiled maps, get information on Tiled tiles for collision, and maybe even find/replace tiles inside a map for animated tiles and stuff). If it does, then I'll have found a very viable and useful replacement/alternative to ATL.

Anyway, I assume it can at least load maps and get information from specific tiles, so if it can do that then it's an even more extremely awesome library! Cookies to you!
"In those quiet moments, you come into my mind" - Liam Reilly
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.7.4

Post by Karai17 »

The only thing STI does not currently support is tile animation, and a few other things in the issue tracker that I haven't had time to get to. Otherwise, you can load a map, get properties from the map, draw the map, etc.

Check out the documentation for more detailed info.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Rukiri
Citizen
Posts: 68
Joined: Mon Jun 27, 2011 5:52 am

Re: Simple Tiled Implementation - STI v0.7.4

Post by Rukiri »

This seems like it progressed quite a bit!

The last library I used for tile importing would load the tile but when I got towards the edge of the screen I'd see black not the end of the map, did your implementation solve this issue?
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.7.4

Post by Karai17 »

That is a camera issue, not a lib issue. You need to implement a camera check to see if you are displaying off screen or not.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Rukiri
Citizen
Posts: 68
Joined: Mon Jun 27, 2011 5:52 am

Re: Simple Tiled Implementation - STI v0.7.4

Post by Rukiri »

Solved the camera problem, but working out another problem. Tiled Objects.
I want to animate my tiles and thought using objects and calling the object in love would make things easier.

Have an easy way of fixing this issue? I guess it's not really an Issue with STI but the documentation around tiled objects is scarce.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests