Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

FYI, I'm using the 3x3 minimal settings on https://github.com/godotengine/godot-docs/issues/3316#issuecomment-614923124

It seems to be auto tiling cell 10,0, maybe it should be using 9,3? But that doesn't solve the vertical walls.

For example - in your screenshots, the walls perfectly line up with the "grid".

But in the tilesheet, the vertical walls go down the middle of the tile?

(my tileset is setup exactly like your screenshot on https://itch.io/post/9553476)

(2 edits)

Hi Nick!

Two things: the horizontal walls - there's something off, you should see the bricks of the northen walls. If I understand correctly* than a horizontal wall that has no other wall to the top nor to the bottom should use tile (x:2, y:3). The tiles you mention are for like thicker blocks of walls (rendered as empty holes... idk, maybe I should had celing/floor there?

Second: Vertical ones. The autotiles pngs were created later than the picture you're refering to was made by hand (in Tiled iirc) using the tiles from the full tileset (0x72_DungeonTilesetII_v1.*.png).

I've just checked the Godot setup (couldn't remember, didn't look at it for a while :/) and now I recall that I had the same trouble and I gave up and just put the walls in the middle as you noticed. To fill the gaps I've provided the half-floors tiles in atlas_floor-16x16.png.

I believe what we want here is not possible with regular autotiles. I might be wrong but in any case the current setup is not sufficent. Meybe the "draw the floor" not "draw the wall" approach? IDK. (If you figure this out please let me know!)

[*] I'm always confused with autotiles. They are difficult to read to me and the setup is tedious, and yet they fail to do what I want and are super lmited otherwise. I'd rather go with a rule-base approach like ldtk or similar.

Interesting...

My northern top walls are using this tile:


By 2,3 are you referring to the ones near the bottom left?

According to the automap mask in the github issue, it is using the "correct" tile in my screenshot; "this" cell + it's East, West, South, SW and SE are all "dungeon" tiles and there is no dungeon tile  to the NW, N or NE. 

The "line" one in the bottom left should only be picked if the current cell + potentially the E or W are "dungeon" and were surrounded by non-dungeon.

So it sounds like I might need to render the floor as one sheet and walls as another?

I wonder if it almost like we need another "walls" variant where instead of flat-grey under the walls, it uses a standard floor tile aligned to the grid?

So.. yeah... it's much better if I replace the gray background with a cell... certainly to a point where I can crack on with other parts.

But you're right that the top wall looks wrong. It's almost like it needs to reuse the south walls again?

(1 edit)

I have trouble understanding how actually you draw your map. i.e. which cells are on and which are off.


 My understanding is that the middle of each cell represents the wall itself, and 8 minisquares around it are the presence or not of the neighbours.  So yeah, northen and southen horizontal walls would be the same because both, the void and the floor are marked as empty on above and below the wall. Like A (blue) in pic above: you have wall to the left, and right, nothing up, down and corners.

B (green) is in the other hand void/floor is to the top, but there are wall to the bottom.

(1 edit)

I might be missing something but how I see the wall layer, is that this particular tile maches A rather than B.

(1 edit)

> So it sounds like I might need to render the floor as one sheet and walls as another?

Damn, yeah; this is the misunderstanding. This was my intention: walls and floors on separate layers.


Compare: "When you want to draw the floor" and "When you want to draw the walls" in https://github.com/godotengine/godot-docs/issues/3316#issuecomment-614923124 and you'll see how only one of them resables our walls.

hmm… so my interpretation is white = void and pink = dungeon.

so the cell (a 3x3) that’s full-pink = inner cell/floor.  a full white cell is void.

The north wall (green) states “select me if I am dungeon and am surrounded by dungeon cell on W,SW,S,SE & E as well as having void to the NW,N & NE”

The south wall is essentially the opposite; void to the SW,S,SE and dungeon everywhere else.

Blue is for a dungeon cell surrounded by void to the full north and south.

The reason I do it like this (and it’s my interpretation of it) is because when you fill in any shape it calcs all the walls out correctly… this includes the code I have to fill in the map by setting all the “dungeon” cells. Its very simple to do this approach in code  

However it sounds like in need two layers - one to fill in just the edges/corners on an upper layer and another under it for the inner layers for the floor? Or maybe floor is everything and the “under wall” tiles are partially transparent?

(2 edits) (+1)

I see.

Why, the tiles are wall/no-wall rather than dungeon/non-dungeon.

For the later we'd have to redraw the tiles.

Alternatively you can figure out which cell is an edge in a separate step - each cell that has any dungeon neighbour that is a non-dungeon would be a wall; set them on a separate layer.


---

> However it sounds like in need two layers - one to fill in just the edges/corners on an upper layer and another under it for the inner layers for the floor?

I think this is consistent with what's in my head:

- LAYER ABOVE: walls
- LAYER BELOW: floors