Dungeon Keeper style tiled grid

Hi all,

I’m working on a prototype in version 4.10.1 which involves a destructible 2D grid of hexagonal tiles. Each tile can take on a variety of forms (i.e. different mesh data) and this can change at run-time.

In the interests of producing a speedy prototype, I would like to have a class “UGTilesGrid” that I drag into the editor viewport and I can immediately see the default tiles (class UGTile). I can then change exposed blueprint parameters and the tiles in the viewport will update accordingly.

I have managed to get this far using Add Child Actor Component in the constructor of the UGTilesGrid blueprint.

The problem is, I want to be able to select UGTiles in the editor viewport and, for example, change a boolean bIsDug state to indicate whether the dug out graphics should or should not be used. This would function as a slow but workable form of level editing until I have time to develop a more appropriate plug in.

I’m beginning to get the feeling that what I want to do isn’t possible with Add Child Actor Component in the constructor. So is there a better way to achieve my overall goal?

Many thanks,
Matt

Constructor script is kind of limited. Take look at Dungeon Architect plugin. Yes it is done for square tiles, but author of it is quite fast in implementing new stuff. There is big chance that if you ask him he may add hex support.

Also Dungeon architect is about as much as you can do in unreal for tiled levels.

Well, to promote my own content, my Advanced Turn Based Tile Toolkit on the marketplace supports hexagonal tile grids. In the toolkit there are a variety of ways in which you can set up the grid. One way is to automatically generate a grid of instanced static meshes. Another is to place tile actors individually which snap into place on the grid. In my toolkit each tile location is represented in various 2D arrays. Using such arrays and knowing the location of a tile you can get the appropriate array index corresponding to that location and get the correct tile actor or (instanced) static mesh. This tile could then be modified in any number of ways. My recommendation would be to do something similar. If you are creating a tile grid of a fairly large size with many repeating and identical tile meshes I highly recommend using instanced static meshes instead of regular static meshes or actors, since this is much better for performance.

Glad you posted monokkel, having seen your work, I was also going to suggest your kit :slight_smile:

Thanks for the responses. Two decent kits for somebody trying to rapidly prototype and I especially appreciate Monokkel’s run-down of his implementation.

Best wishes.