karai17 / Simple-Tiled-Implementation

Tiled library for LÖVE
Other
853 stars 121 forks source link

Collison information not being registered with Bump #244

Closed shingle-bells closed 4 years ago

shingle-bells commented 4 years ago

I'm using STI with bump, and for some reason the collision map I made isn't being registered in my game. I've confirmed that the collision data is there in the export, and I am initializing the map through Bump. Is there a step I'm missing?

karai17 commented 4 years ago

Can you post some of your code here so that I can take a look?

shingle-bells commented 4 years ago

Here's my game files, I don't know what could be causing it. The map is initialized in GAME.lua. game1.zip

karai17 commented 4 years ago

Not sure why but I checked your map and there was no collision data in it. I re-exported it from Tiled and the collision data was then present, though I don't think it's doing exactly what you want it to do. When you set a tile as collidable, it will set the whole tile as a collidable object. From what I am seeing, you probably only want to set the sub-objects within your tiles as collidable.

Another quick note, you're defining a love callback function inside of love.update. You can define it outside of update.

shingle-bells commented 4 years ago

How do I export the data in a way that STI can detect? Sorry, I'm new to Tiled and Love2D so I'm a little lost.

shingle-bells commented 4 years ago

Nevermind, I figured out I was exporting my tileset but not my map (tiled should really make this more clear grrrrrr). I feel like a dumbass, but I figured it out. Thanks for helping me regardless!

karai17 commented 4 years ago

Glad you got it sorted. :)