Skip to content

TileMapDual v5 #16

@raffimolero

Description

@raffimolero

Supporting hex grids is a huge task. It requires having 2 separate TileSet resources for the parent and child. But I've got ideas.

I manually cropped and assembled this tileset from https://youtu.be/Uxeo9c-PX-w?t=428 (the same frame used in the readme) which I hope could help develop triangular and hex grids further. It's a bit complicated since it's a "tall" tileset, so I'll be looking for a simpler one for now.
Hex Dual - 64x83tri - 85x72hex

Each triangle sprite is 64x83, and when pieced together they become 85x72 hex tiles. I don't know how the math works yet.
Unfortunately, Godot does not support triangular grids. Fortunately, they're just square grids with extra steps.
I think the geometry of the display_tilemap can be computed as follows:

display_tilemap.tile_set.tile_shape = TileSet.TileShape.TILE_SHAPE_SQUARE
display_tilemap.tile_set.tile_size = Vector2(self.tile_set.tile_size) * Vector2(1, 0.5)
display_tilemap.position = i_dont_know_yet()

But you'd need display_tilemap to have a different tile_set for this to work. It can't reuse the parent's.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions