Skip to content

Tile-o-matic - #2705

Draft
wjt wants to merge 1 commit into
mainfrom
wjt/tileomatic
Draft

Tile-o-matic#2705
wjt wants to merge 1 commit into
mainfrom
wjt/tileomatic

Conversation

@wjt

@wjt wjt commented Aug 13, 2026

Copy link
Copy Markdown
Member

Tile-o-matic

This adds a script that can be used to automatically update water, foam,
shadows (cliff and bridge), and cliff collisions based on the other
layers in the scene.

It supports multiple layers of bridges but only one layer of elevations
or (elevation or bridge) shadows.

The intended workflow is to paint floors, cliffs, and bridges, then
click Update to fix the others.

One thing I discovered while writing this is that we didn't have
collisionless alternatives for every cliff-edge tile, only for two of
them, and those alternatives were missing their occlusion (physics and
light) polygons and possibly some other properties. I wrote a script to
give every cliff-edge tile an alternative that does not have wall
collisions. (elephant.gd, needs a better name or to be deleted.)

However this is still not quite correct. Bottom edges include include
the cliff-face below. That face needs to be walkable when the bridge is
coming from the bottom; but when coming from the side, the bottom should
block the player. So we need two alts for that. Similarly, if you have a
bridge reaching a top-right corner from its right edge, and land at a
lower height above its top edge, you shouldn't be able to walk off the
top. I did not fix this family of issues.

This is also all painfully hard-coded to the specific tilesets in the
main game...

I edited the alts to add a modulation so they are easier to see in the
editor.

This adds a script that can be used to automatically update water, foam,
shadows (cliff and bridge), and cliff collisions based on the other
layers in the scene.

It supports multiple layers of bridges but only one layer of elevations
or (elevation or bridge) shadows.

The intended workflow is to paint floors, cliffs, and bridges, then
click Update to fix the others.

One thing I discovered while writing this is that we didn't have
collisionless alternatives for every cliff-edge tile, only for two of
them, and those alternatives were missing their occlusion (physics and
light) polygons and possibly some other properties. I wrote a script to
give every cliff-edge tile an alternative that does not have wall
collisions. (`elephant.gd`, needs a better name or to be deleted.)

However this is still not quite correct. Bottom edges include include
the cliff-face below. That face needs to be walkable when the bridge is
coming from the bottom; but when coming from the side, the bottom should
block the player. So we need two alts for that. Similarly, if you have a
bridge reaching a top-right corner from its right edge, and land at a
lower height above its top edge, you shouldn't be able to walk off the
top. I did not fix this family of issues.

This is also all painfully hard-coded to the specific tilesets in the
main game...

I edited the alts to add a modulation so they are easier to see in the
editor.
@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/wjt/tileomatic/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant