-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 more granularity to overmap vision #75236
Add more granularity to overmap vision #75236
Conversation
Quite an interesting and logical addition. |
Very exciting! |
2c5e636
to
d309d36
Compare
This looks AMAZING! Thank you so much for putting all this hard work in. |
It looks like clang is having some warnings from this. Unless I'm misreading it? |
e6381a0
to
2df7c36
Compare
I believe the errors (flake8, clang-tidy, the enum thing) should be fixed now. Thanks for the fix (e6381a0) to the enum issue, but I've changed it to act the same as the map display, and only count cities that have the center known at details or better. If just seen at any level is enough, I can change it back. |
On the overmap, there is either no information about a tile, or full information. This is limited, and makes scouting a fairly boring affair of going to high places with binoculars for full map information, and it gives a lot of meta information. Replace that with five levels of vision: unseen, vague, outlines, details, full. This just does the grunt work of adding the levels, and working them through all the various places they're needed.
Now that there's different levels of overmap vision, change the displayed map information based on it. To reduce the load of specifying this data for all of the overmap terrains, this is specified in a separate oter_vision type that overmap terrains reference. For a given vision level, the name, symbol, and color level of the terrain will be replaced with those specified in the oter_vision it references. If the oter_vision doesn't have an entry for that vision level, the information from the overmap terrain will be shown. If the oter_vision specifies that it should blend with adjacent tiles at that vision level, a suitable adjacent tile will be chosen instead, and the information for that tile (depending on vision level) will be shown. The prefixing used for tileset ids is messy, but it's constrained and the tiles overmap works. Adjust the code that reveals tiles to reveal at these various different levels. It's nothing exciting, and there are a lot of improvements to be made, but it works well enough to showcase the feature.
Clean up some terrains with copy-from, and add vision levels to most of them. There are lots of options to add more and change these around. Here's just a start.
Ease debugging by allowing revealing overmaps at any vision level.
2df7c36
to
10d0f1c
Compare
Very exciting indeed. But, can we at least make out the tallest buildings in the city? For sure, a six-storey building would stand out from the among the surrounding one or two storey houses. |
Summary
Features "Add different levels of vision to the overmap"
Purpose of change
On the overmap, there is either no information about a tile, or full information. This is limited, makes scouting a fairly boring affair of going to high places with binoculars for full map information, and it gives a lot of meta information.
Describe the solution
Replace unseen/seen with five levels of vision granularity: unseen, vague, outlines, details, full.
Unseen and full (seen) work as before, but the three middle levels provide increasing amounts of information about an overmap tile as it becomes more visible.
To avoid spending the next year adding all these details to every overmap terrain in the game, I added an
oter_vision
type that specifies the display information for vague/outlines/details, and overmap terrains reference whichoter_vision
describes them. In this, overmap terrains can specify that at certain vision levels, they blend in with the environment, in which case the overmap terrain displayed at that tile will be replaced with one of the surrounding overmap terrains. This is used to hide roads and other details at the "vague" vision level.Additionally, some map overlays (e.g. hordes) are hidden unless vision of a tile is details or better.
The adjustments to make the map reveal at different vision levels are pretty rough, and I think that whole thing needs to be rewritten, but I've already been working on this PR for too long. Right now it gives more and more detailed vision than I think it should (without spending a decent bit of time explicitly scouting, I think most of the map should be vague or outlines unless quite close to the player), but it can be generous until the work to improve it is done.
If you're reviewing, you may find it handy to review by commits.
The first commit does the boring work of replacing seen: true/false with an enum everywhere it's referenced. The second commit builds on that by providing the infrastructure to actually display these different vision levels differently. The third commit uses that infrastructure to provide vision levels to all/most of the overmap tiles in the game. The fourth commit just lets you debug reveal the overmap at any vision level.
Describe alternatives you've considered
Continuing to work on this for weeks and never publishing it. There's a bunch of decisions I made here with how to specify this information, what vision levels go with certain overmap terrains, etc. that I could second-guess forever.
Testing
Run around, explore the map, climb things, grab binoculars, etc.
Here's some maps I've got:
Gray, the city I started in, where I know all about what's in town.
Up north is Monmouth, and I can't tell what the buildings are there.
Over to the east and after climbing a radio tower, I can see a large building, some rural buildings, and a map I read has revealed some of a town down south.
Some roads lead off to some features that I can't see yet, because they blend in with the landscape.
I go over to investigate them, finding trailheads and a shooting range, and revealing more of the town (there's some large buildings near the edge)