0 votes

I'm currently using the standard Godot autotiling bitmap:
the standard Godot autotiling bitmap for a 3x3 minimal
Problems for me are that when I want players to not fall off the platform, I need to draw complex concave colliders and not all walkable tiles have the same area that is walkable.

However, I'd prefer if tiles were generally depicting the edges of the terrain, like so:
experimental autotiling bitmap for 3x3 minimal

This has the advantage that the colliders would be super simple (just a square for each edge tile), blocking players from falling off the platforms. Also, all walkable tiles (just one, tile index x = 1, y = 1) would be the same size, square.

The issue seems to be that Godot is not evaluating the tiles around placed autotiles, so that bitmap rules which just contain, e.g. the corner, do not cause e.g. tile x = 0, y = 0 to be placed.

Is there a way Godot can do this out of the box, or would I have to implement this myself?

Manually placed this tileset works:
Manually placed autotileset

P.S: Just noticed a little error - tile x = 1, y = 1 should have a bitmap with just one red dot in the middle (and x = 6, y = 3, the single tile cannot exist). But with that fixed, it still appears to not evaluate tiles around placed autotiles.

Godot version 3.3
in Engine by (52 points)
edited by

1 Answer

0 votes
Best answer

The way bitmasks work is that a tile MUST have the center bit selected in order to be used. If you want to use your bitmask, you'll need to implement custom logic yourself.

I'm also not sure how your proposal will make drawing collision shapes easier. You'll still have to draw the same collision shapes, but in a different arrangement.

by (7,190 points)
selected by

The way bitmasks work is that a tile MUST have the center bit selected in order to be used. If you want to use your bitmask, you'll need to implement custom logic yourself.

Thanks – how could I implement custom logic myself? Can't find much in the way of how to trigger autotiling for surrounding tiles. I assume it's probably best to just leave it to Godot.

I'm also not sure how your proposal will make drawing collision shapes easier. You'll still have to draw the same collision shapes, but in a different arrangement.

It's possible that I am totally off on this one, so let me explain.
I'd like the player to not be able to go off the platform, so in the standard way of autotiling I'm adding concave colliders:
concave collider

While in the other way I can just use simpler convex collider shapes:
simple colliders
On average, I have to place about half of the corners for the second way of doing things per tile.
Does that help or am I overcomplicating things for the standard case? Is there another solution like testing e.g. pixels under a player's feet?

P.S: This appears to be possible with the upcoming terrain system.

Yeah I'm not really sure how to implement custom autotiling logic since I've never done it before. But I see what you mean about the collision shapes now. Yeah, tilemaps will get a lot better in Godot 4. Nothing to do but wait...

In code, I can just add 4 additional tiles around the placed tile in a cross shape to get what I want, but not yet in the editor, so will wait for Godot (4). Cheers!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.