Godot-proposals: Extend the 2D TileMap autotiling feature to 3D GridMaps

Created on 29 Sep 2019  路  5Comments  路  Source: godotengine/godot-proposals

Describe the project you are working on:
A very simple 3d platformer with gridmap-based terrains and platforms.

Describe how this feature / enhancement will help your project:
To construct a 3d level quickly by reusing walls, corners, wall edges etc, the most useful node available is clearly the Gridmap, similarly to what you would do with a 2d tilemap. However while there is autotiling functionality already implemented in 2d tilemaps to speed up level design, in 3d Gridmaps you have to select and place every tile individually, while also using non-intuitive keybinded commands to flip the tiles on screen, which is quite tiresome and time consuming.

As an practical example, to draw something as a simple cubic house or building measuring 3x3x3 cells, after setting up the resource and the grip map, one has to click the screen at least 39 times (including selecting the types of tiles needed, placing them, and changing the Gridmap's floor), plus using keybinded commands to flip the tiles a dozen times, without a tool-tip on screen.

If it was possible to extend the exact same functionality we already have for 2d tilemaps to make it work in the exact same way for a single floor of a grimap (as if it were a tilemap) the same building would me made with 6 clicks (3 to place, 3 to change floor) by choosing the 4-bit/2x2 option. With the 8bit-3x3 option, you would still click to paint every cell, but all the tile selection would still be automatic, and a great level of detail could be achieved quickly.

When one consider a rather large level, not having this feature can easily amount to hundreds (or thousands) of extra clicks and mouse movements, while drawing with autotiling is sure to speed up level design and be a great quality of life option, which hopefully could be achieved by reusing code already implemented in godot for another node (2d tilemaps).

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
rlhyx0u5nez11
In this case, the 3x3 cliff above would produced by a single autotiled brush click.

Describe implementation detail for your proposal (in code), if possible:
Adapt the tilemap autotile code, considering a floor in a gridmap as if it were a tilemap.

If this enhancement will not be used often, can it be worked around with a few lines of script?:
This is an IDE usability enhancement, so I think implementing it with code by the average user would amount to creating your own level maker, which doesn't seem like a trivial task that could be done with a few lines of code. I believe that once implemented this enhancement will be used very often, given that painting levels with autotiling is widely considered much more efficiente than placing tiles one by one, and selecting the correct tile hundreds of times.

Is there a reason why this should be core and not an add-on in the asset library?:
Yes, I believe this to be a general purpose functionality useful for any game with scenes composed of gridmaps, which is should be a preferred way of making grid based levels.

core

Most helpful comment

Yes, this would be extremely useful.
GridMap provides optimizations to rendering and physics processing, so it is a good practice to use it. Also it makes it very convenient to build levels (especially interior ones).
However, like has already been said, it is very time consuming to use. In my case, I made a script which essentially converts specific floor tiles to multi-level wall tiles. But creating such script took a lot of time and is of course specific to my game. Not to mention, it has its own issues.
A general purpose solution would be amazing.

All 5 comments

YES, this should be implemented.

Yes, this would be extremely useful.
GridMap provides optimizations to rendering and physics processing, so it is a good practice to use it. Also it makes it very convenient to build levels (especially interior ones).
However, like has already been said, it is very time consuming to use. In my case, I made a script which essentially converts specific floor tiles to multi-level wall tiles. But creating such script took a lot of time and is of course specific to my game. Not to mention, it has its own issues.
A general purpose solution would be amazing.

This would be really nice to have for grid maps :)

Any update on this? Would be a _super_ useful feature. Or if anyone has ways of automating this without this feature, let me know!

@jamisoncozart As far as I know, nobody is currently working on this (either as a built-in feature or an add-on).

Was this page helpful?
0 / 5 - 0 ratings