Page 52 of 92

Re: Simple Tiled Implementation - STI v0.16.0.2

Posted: Tue Jul 26, 2016 12:46 am
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.

Re: Simple Tiled Implementation - STI v0.16.0.2

Posted: Tue Jul 26, 2016 12:48 am
by Karai17
Do you have any specific issues you'd like addressed?

Re: Simple Tiled Implementation - STI v0.16.0.2

Posted: Tue Jul 26, 2016 12:53 am
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?

Re: Simple Tiled Implementation - STI v0.16.0.2

Posted: Tue Jul 26, 2016 12:57 am
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.

Re: Simple Tiled Implementation - STI v0.16.0.2

Posted: Tue Jul 26, 2016 1:14 am
by Pangit
Fair enough. So the library implements all of the features of tiled?

Re: Simple Tiled Implementation - STI v0.16.0.2

Posted: Tue Jul 26, 2016 1:39 am
by Karai17
There is a feature list on the OP, but yes, it implements basically everything that you can do in Tiled.

Re: Simple Tiled Implementation - STI v0.16.0.2

Posted: Wed Jul 27, 2016 10:51 am
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

Re: Simple Tiled Implementation - STI v0.16.0.2

Posted: Wed Jul 27, 2016 1:03 pm
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.

Re: Simple Tiled Implementation - STI v0.16.0.2

Posted: Thu Jul 28, 2016 6:41 am
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?

Re: Simple Tiled Implementation - STI v0.16.0.2

Posted: Thu Jul 28, 2016 9:34 am
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.