ldtk icon indicating copy to clipboard operation
ldtk copied to clipboard

[Feature Request] Have option to separate out-of-bounds policy for vertical and horizontal

Open AnomalousUnderdog opened this issue 1 year ago • 2 comments

In one of the rules I was making, ldtk was placing the tiles in places I didn't want it to. For this particular tile, which looks like a thin vertical strip (visually speaking, it's the brick wall foundation when the wall is vertical):

1

They were not being placed in the upper edge as they should:

2

But if I use the out-of-bounds policy, it also places the tile at the left edge:

3

The only way I can think of to fix this is to have a Vertical Out-of-bounds policy (which I will then set to "Empty Cells") and a Horizontal Out-of-bounds policy (which I will set to "This rule should not apply...").

I understand not all rules need to have this, so I imagine the way it would work is by default, both Vertical and Horizontal Out-of-bounds are "locked together", wherein if the user assigned a value to the Vertical Out-of-bounds, the editor will assign the same value to Horizontal (and vice-versa). This is to maintain the same behaviour as before.

Then when the user wants to, they can click on that lock button to "unlock" it, so now the user can assign separate values to Horizontal and Vertical Out-of-bounds.

AnomalousUnderdog avatar Mar 14 '23 02:03 AnomalousUnderdog

A viable way to implement 2.5D renders is to have your "ground" collisions on a layer, and do higher layers (ie. above the floor) in a separate auto-layer with -16px vertical offset. Hard to explain, but I could provide a demo project if you want :)

deepnight avatar Apr 27 '23 07:04 deepnight

Here is a quick example, using layer offsets to achieve this type of render.

2.5D.zip

The main benefit is that rules are simpler to write, and collision layer only contains floor collisions:

image

deepnight avatar Apr 27 '23 08:04 deepnight