-
Notifications
You must be signed in to change notification settings - Fork 44
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
Feature flags #555
Comments
There's one big problem with this example: you seem to be confusing terrains with terrain graphics. It doesn't make any sense whatsoever to swap terrains, but swapping terrain graphics makes perfect sense and is already done when loading legacy scenarios. Side note: We shouldn't use flag names like |
I think we would want to change terrains in some cases, for example if you load a new-format scenario that uses old-style terrain transitions and you want to free up those 12 terrain slots per transition, you'd want to swap all occurrances of the 12 specific transition types into the 1 smart transition terrain. Then add the feature flag to the scenario so that change doesn't happen again wiping out whatever terrains you use in the fresh places.
Well, we could theoretically change terrains multiple times. They'd need to be disambiguated. |
You're right in one sense – the chance that you'd want to change terrains to use automated transitions is quite high. But is that even possible to automate? You would need to convert the terrains themselves to use transitions, and you would need to update the maps to replace all the old transition tiles with the correct base tile. I guess maybe it could be automated for the built-in terrains (id < 90) as long as their images haven't been changed from the default. Maybe even if the images have been changed… if I recall correctly, changing the images in legacy BoE didn't alter the transition behaviour in the editor?
Sure, but using an issue number is a terrible way to do that. There's no guarantee that the project will always be hosted on GitHub. We can disambiguate by appending a version number or a date instead. |
Yeah, fair enough. |
Both scenarios and game builds should have a StringMap containing newly added features that they incorporate. Game builds should write this map into replays, so replays can know which features were present when the replay was made.
In a sense this is like creating an extensible, piecemeal concept of "Legacy."
Like if we ever rearrange terrains i.e. in #414, scenarios created following that change should have a file with the flag "TerrainChange414" in it. Then,
fileio_scen.cpp
can check each scenario it loads for that flag. If it's absent, it will swap the terrain numbers of the scenario as necessary to match the updated engine expectations.I guess it should also theoretically not make swaps on terrain types that have been overridden from bladbase
The text was updated successfully, but these errors were encountered: