Simple Tiled Implementation - STI v1.2.3.0

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Pangit
Party member
Posts: 148
Joined: Thu Jun 16, 2016 9:20 am

Re: Simple Tiled Implementation - STI v0.16.0.2

Post by Pangit »

Nice library, but its a bit tough trying to use this without working non-trivial examples.

Any chance of updating that tutorial http://lua.space/gamedev/using-tiled-maps-in-love

Compared to Cocos2D most of the tutorials/documentation is pretty thin on the ground.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.16.0.2

Post by Karai17 »

Do you have any specific issues you'd like addressed?
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Pangit
Party member
Posts: 148
Joined: Thu Jun 16, 2016 9:20 am

Re: Simple Tiled Implementation - STI v0.16.0.2

Post by Pangit »

Specifically I would love a tutorial that showed spawning enemies, player start locations, movement of player, movement of enemies, animated tiles, showcased the features of the library. Collisions, items.

Kinda like this...

https://www.raywenderlich.com/39113/coc ... ial-part-1

Is there an working tutorial that shows these things?
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.16.0.2

Post by Karai17 »

I talk about spawning a player (and in turn, enemies) in my tutorial. As for the rest of the things, they are pretty out of scope for STI. You're asking me to teach you how to use Tiled, or how to make a game. STI is a single library that loads (and renders) a Tiled map. You still need to know how to do the rest of the gamedev stuff.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Pangit
Party member
Posts: 148
Joined: Thu Jun 16, 2016 9:20 am

Re: Simple Tiled Implementation - STI v0.16.0.2

Post by Pangit »

Fair enough. So the library implements all of the features of tiled?
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.16.0.2

Post by Karai17 »

There is a feature list on the OP, but yes, it implements basically everything that you can do in Tiled.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
contadotempo
Prole
Posts: 2
Joined: Wed Jul 27, 2016 10:38 am

Re: Simple Tiled Implementation - STI v0.16.0.2

Post by contadotempo »

Hello,

Is it possible to acquire which tiles or layers the player is colliding with? In my case I'm trying to make a simple platformer using box2d, where the player is either on the ground or attached to a wall. Ground tiles have the tile properties: collidable=true and ground=true, walls have: collidable=true and wall=true, but I'm having trouble understanding how I could distinguish these collisions.

I based the implementation around the STI Tech Demo, where the player has a body, shape and fixture. I tried playing around with the player's body using body:getContactList(). But I can't access tile properties using this, can I?

Please excuse my ignorance :?
Best regards
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.16.0.2

Post by Karai17 »

You can use the map:convertPixelToTile method convert the player's position to a tile, and then determine which tiles it may be touching base don proximity.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
rodi
Prole
Posts: 1
Joined: Thu Jul 28, 2016 6:22 am

Re: Simple Tiled Implementation - STI v0.16.0.2

Post by rodi »

Hi, I am completely new, first time posting on here and am trying to learn Love2D/Lua/STI I've basically done the hello world and went through some basic video tutorials. I'm trying to get the basic example found on the STI github page working, (copied and pasted it verbatim) but I get: module 'sti' not found

I apologize in advance for the dumb question, I have local sti = require "sti" but do I need to install sti somehow? I tried googling and searching this forum but didn't really get an answer, maybe this question is too basic to find a post on. Help?
contadotempo
Prole
Posts: 2
Joined: Wed Jul 27, 2016 10:38 am

Re: Simple Tiled Implementation - STI v0.16.0.2

Post by contadotempo »

Karai17 wrote:You can use the map:convertPixelToTile method convert the player's position to a tile, and then determine which tiles it may be touching base don proximity.
Thank you, I'll give it a go.
rodi wrote:I get: module 'sti' not found
How does your directory structure look? Make sure the folder sti has the script init.lua. If not, maybe you have another folder called sti inside sti. Either move the files from that folder back one level, or do sti = require "sti/sti" in lua.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests