Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TileMapLayer] Add set_cells to set multiple cells at once #98996

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SpazElectro
Copy link

Adds TileMapLayer::set_cells to set multiple cells at once using an array of Vector2i positions, similar to TileMapLayer::set_cells_terrain_connect and TileMapLayer::set_cells_terrain_path.

Why? It's ~3 times faster than setting each tile manually in GDScript.

@Mickeon
Copy link
Contributor

Mickeon commented Nov 10, 2024

While I do understand the need of this, it would be nice having a formal proposal to gather interest, as well as proving how much faster it is with benchmarks.

@SpazElectro
Copy link
Author

Sure thing! Here is a sample benchmark scene, on my machine I get this result: Internal implementation average: 851µs, User implementation average: 2973µs, Improvement: 3.493537x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants