-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add CnC map generator support #21702
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
Add CnC map generator support #21702
Conversation
8ce7676 to
b102921
Compare
b102921 to
2559e58
Compare
PunkPun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In snowy maps we generate way too much snow. It's usually used quite sparingly.
Unless one picked the overgrown or woodlands gen type, I think all the details are too sparce. Incase enclosed areas are generated with the onstruct option, then there may be enough details.
Usually a lot of the details in TD are added through actors and rivers and roads. And the current generator adds roads very sparingly and lacks a lot of the actors. No rivers as well
On temparate tileset generation can become very slow, something is getting bottlenecked?
Beach errors are quite common. You can also crash the game by choosing bounds in water
I should be able to adjust that using MultiBrush weights.
Fixing this starts getting into another set of non-trivial code changes, but the extra details could equally benefit RA maps. As such, it might be better to do the detail adding in a separate PR. (I'd propose a later PR, because then you can then at least test CnC skirmishes.) Some ideas:
Can you quantify this? (Map size?, Generator settings?, Time taken?) I'm aware of a O(actor_count**2) slowdown after generation when it's copying actors over to the map, which can be very significant for large tree-dense maps.
I can probably tweak some things to relax the tiling constraints here or stricten the inputs to tiling.
|
Wait, I'm being dumb I know what you mean! |
Having done some recent profiling, I'm not sure if this is likely to be the bottleneck in your case. I think it only applies to very very large maps. However, EditorActorLayer.Add and EditorActorLayer.Remove are, in general, quite slow. Here is some left-heavy profiling of a few generations of 128x128 Rocky and Overgrown maps. Note that the repeated generation during the same editor instance consumes significant time to remove actors as well as adding them.
My understanding is that these costs are editor-specific and won't apply to any maps generated directly via some skirmish UI, so might be somewhat unimportant in future. |
Turns out there was a bug I introduced during one of my many refactors! I have created a PR for the fix: #21704 |
#21705 should fix that. |
Adds map generator support for CnC (all tilesets), largely on par with RA. Most tilesets do not have a complete set of beach templates and therefore do not support terrain settings involving water. DESERT is the only tileset supporting water. Unlike in RA, water is not playable space in CnC (no naval units), so only terrain settings with small bodies of water are available. Most changes are configuration (tileset and map generator config), with just a small number of code changes.
395f88f to
3b7d43b
Compare
PunkPun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this was quite the improvement
Adds map generator support for CnC (all tilesets), largely on par with RA.
Most tilesets do not have a complete set of beach templates and therefore do not support terrain settings involving water. DESERT is the only tileset supporting water. Unlike in RA, water is not playable space in CnC (no naval units), so only terrain settings with small bodies of water are available.
Most changes are configuration (tileset and map generator config), with just a small number of code changes.
Depends on #21700