Search found 7 matches

by TooMuchAbstraction
Fri Jan 01, 2016 9:35 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 914
Views: 755545

Re: Simple Tiled Implementation - STI v0.14.1.10

I have zero familiarity with bump, and my code is already somewhat heavily-tied to box2d so it's not trivial to test bump. However, a quick look at bump.lua shows no reference to map.offsetx or map.offsety, so I doubt that it works properly.
by TooMuchAbstraction
Fri Jan 01, 2016 9:17 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 914
Views: 755545

Re: Simple Tiled Implementation - STI v0.14.1.10

Awesome! But, some bad news: that doesn't affect the collision detection. This is easily fixed though! Just modify box2d_init so that its initialization of the "body" local looks like

Code: Select all

local body      = love.physics.newBody(world, map.offsetx, map.offsety)
by TooMuchAbstraction
Fri Jan 01, 2016 8:49 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 914
Views: 755545

Re: Simple Tiled Implementation - STI v0.14.1.10

Yep, figured it out, thanks! Here's what I'm doing (powObject is the map object, powFixture is the associated fixture I created): -- Delete the object from the map's object list. map.objects[powObject.id] = nil -- Delete the object from the layer in the map it is in. local newObjects = {} for i, obj...
by TooMuchAbstraction
Fri Jan 01, 2016 12:48 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 914
Views: 755545

Re: Simple Tiled Implementation - STI v0.14.1.10

Since I'm here already, I'd like to be able to place items on the map, which can be picked up by the user. At the moment I have an object layer, and at program start, I'm iterating over all objects in the map and creating bodies and fixtures for them so I can recognize when the player touches them. ...
by TooMuchAbstraction
Thu Dec 31, 2015 8:05 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 914
Views: 755545

Re: Simple Tiled Implementation - STI v0.14.1.8

For reference, Karai and I sorted this out. Turns out that STI wasn't loading the object group for each tile, which means that any custom collision data added via the Tile Collision Editor wasn't getting loaded and the tiles were defaulting to a rectangular collision hitbox. This is now fixed.
by TooMuchAbstraction
Thu Dec 31, 2015 3:21 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 914
Views: 755545

Re: Simple Tiled Implementation - STI v0.14.1.8

Just add the "collidable" property to your object or object layer and set the value to true. Yes, I did that, but it just generates a rectangle for every tile. This creates a bunch of unnecessary collision edges between adjacent tiles (which causes collision glitches), and it also means t...
by TooMuchAbstraction
Thu Dec 31, 2015 1:12 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 914
Views: 755545

Re: Simple Tiled Implementation - STI v0.14.1.8

Hello, and thanks for adding this functionality to love2d! I'm starting work on a basic platformer based off of this old example . I've made a ton of changes, and one of the things I want to do is switch to STI instead of using Advanced Tiled Loader. The actual switch went smoothly, but now I need t...