-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
selecting terrain brush on wrong layer can have massive consequences #1632
Comments
Re-uploading and including a spindump from a permanent lock. Spindump-062817-terrain-lock-this-one-is-a-permanent-hang.txt Spindump-062817-terrain-brush.txt I'll try to get a repro' case posted here. |
Steps to reproduce:
addlsheet1.png.zip |
So, this is due to a combination of factors:
The solution would be:
|
Yeah, I think so too. I haven't thought this far ahead yet... but hopefully finding the transitions will be much faster with the hash maps already in place. I imagine the eventual "wang brush" will be able to match the functionality of the terrain brush |
This is mainly useful for making the brush work on infinite maps, but in general it is good to prevent the tool from going crazy when it doesn't have a complete set of transition tiles. The area modified by the tool is now limitd to the maximum distance between any two terrains, as counted by the number of transitions needed. A 'checked' boolean was added to each Cell so that the terrain tool can use the chunked allocation logic of TileLayer, while still having a fast place to store whether it processed a certain location or not. This helps a lot with issue #1632
While making the Terrain Brush work for infinite maps, I had to apply some kind of limit to the area affected by the brush. This also helped a great deal in resolving this issue, though the wait is still considerable. It is only processing for about 5 seconds on my machine after the above change, which is definitely less fatal. |
This is mainly useful for making the brush work on infinite maps, but in general it is good to prevent the tool from going crazy when it doesn't have a complete set of transition tiles. The area modified by the tool is now limitd to the maximum distance between any two terrains, as counted by the number of transitions needed. A 'checked' boolean was added to each Cell so that the terrain tool can use the chunked allocation logic of TileLayer, while still having a fast place to store whether it processed a certain location or not. This helps a lot with issue #1632
This is mainly useful for making the brush work on infinite maps, but in general it is good to prevent the tool from going crazy when it doesn't have a complete set of transition tiles. The area modified by the tool is now limitd to the maximum distance between any two terrains, as counted by the number of transitions needed. A 'checked' boolean was added to each Cell so that the terrain tool can use the chunked allocation logic of TileLayer, while still having a fast place to store whether it processed a certain location or not. This helps a lot with issue mapeditor#1632
With the Wang Brush now improved such that it could entirely replace the Terrain Brush (see #2888) I think we have also resolved this issue. This is because in addition to limiting the area it is changing, it only searches those tiles which have Wang colors assigned, rather than iterating the whole tileset. I've opened the example attached in #1632 (comment) and while it still can't do anything useful with "oworld1 mountains", it's now very responsive. It's also fast while editing with any of the more properly set up terrains. I hope it still helps you, @Bobjt, but in any case thank you again for your amazing support of Tiled! |
Tiled doesn't freeze but hangs the main thread for quite some time if I select the wrong layer in conjunction with the terrains brush. Stack trace attached (though it may not be needed).
Uploading Spindump-062817-terrain-brush.txt…
Steps to reproduce:
The hang is avoided if I first fill the new layer with a tile that exists in the selected terrain. I didn't search for existing issues, so apologies if this is a duplicate report.
The text was updated successfully, but these errors were encountered: