Replies: 1 comment
-
Thanks for the proposal! Consolidating in #1538. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the only options to set a multiple tiles are:
TileMap.set_cell
multiple tilesIn a popular use case of procedurally generating a game map, patterns are not very useful. The only tool left is the
set_cell
. Both GDScript and C# when calling that function need to go through a mapping layer that then calls the internal C++ implementation. It's often that hundreds (or thousands) of cells need to be set / changed per frame. Especially in case of dynamic loading/unloading of map segments.I believe that adding an additional functions, something like
set_cells
andset_area
:set_cells
- allows for passing an array (list) of same data as is currently required byset_cell
. This allows for sending a set of potentially not adjacent cells:set_area
- allows for passing data for updating a rectangular area (chunk) of the tile map. Data would take a form of a 2-dimensional array or something. This would offer the most room for optimizations.would yield a number of benefits:
Beta Was this translation helpful? Give feedback.
All reactions