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

Map memory #19053

Closed
Coolthulhu opened this issue Oct 31, 2016 · 11 comments

Comments

Projects
None yet
7 participants
@Coolthulhu
Copy link
Contributor

commented Oct 31, 2016

Discussion started in #17766 but it's worth giving it its own issue.

To sum up:
Almost all roguelikes have map memory. DDA has giant maps that can be easily forgotten, but no map memory. Map memory would be great and lack of map memory is pretty jarring here.

Technical problems:

  • Multiple players mean we can't rely on "last seen" type caches
  • Multiple players mean we can't even have copy-on-modify caches (except for the part in the bubble)
  • Terrain being modified offscreen can't be represented by a simple binary "known", "not known", not even terrain in the bubble
  • What is left is basically copying the entire seen world as separate map - one map for the real world, one map for each player who is capable of remembering

So we'd need almost 2x as much HD space and possibly RAM to make it work.
Still, could just be optional. Possibly with an option to forget the map outside bubble or have an aggressive memory purge on save that would only preserve last n submaps.

Further details:

  • @kevingranade wants a forgetting mechanic. It doesn't really pose a technical problem to add one at the end, the only extra requirement here is remembering when were things remembered to allow forgetting them in order instead of totally randomly.
  • I'd hate to force anyone to play with forgetting mechanic, meaning we'd most likely make it optional, like skill rust or filthy clothing.
@mugling

This comment has been minimized.

Copy link
Contributor

commented Oct 31, 2016

Somewhat relatedly the unmappable nature of labs is an anti-feature. I presume it's modelled on the abyss from DCSS but whereas that level is infinite labs are not so all it does is result in player frustration.

Now if someone wants to write an abyss style level for CDDA that could be interested.

Where does the 'map fog' switch for labs live?

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Oct 31, 2016

Labs just use old mapgen, unlike vaults which are updated.

@mugling

This comment has been minimized.

Copy link
Contributor

commented Oct 31, 2016

But what makes them 'unmappable'?

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Oct 31, 2016

Overmap terrain types being identical, meaning that every tile is just "lab tile".

@epsilon-phase

This comment has been minimized.

Copy link
Contributor

commented Nov 1, 2016

Would it be possible to create additional notation in the saves that define regions as being "seen"?

It could definitely keep the size down, but there would be a lot of complexity shoved into the memory code.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Nov 1, 2016

Would it be possible to create additional notation in the saves that define regions as being "seen"?

No, a single tile can be seen, unseen and "wrongly seen" (changed since it was last seen) by different players.

@epsilon-phase

This comment has been minimized.

Copy link
Contributor

commented Nov 1, 2016

That's not really what I meant by region.

I meant that it would store it as geometric information that describes bounded polygons whenever possible.

the "wrongly seen" parts make this even more challenging to implement that I guess, and would require additional changes in order to determine if something has even changed since it was last seen.

If we were to get rid of the "wrongly seen part" it might be possible to use a bloom filter to store it reasonably efficiently.

That's probably not going to do well here.

@DanmakuDan

This comment has been minimized.

Copy link
Contributor

commented Nov 1, 2016

Speaking of HD/RAM space, the mapping system could use some kind of compression. All the submaps with empty fields have something like a 90% compression rate when zipped on disk. The submap struct could probably be serialized and compressed decently in RAM too.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Nov 18, 2016

Some additional details from previous discussion.

  • The only implementation that seems to meet our needs is to create a
    per-player shallow copy of everything remembered. So we'd store the terrain
    type, furniture, and a list of items. Transient features like fields
    should be ignorable unless I'm missing something.

  • Coolthulu's position:

    As long as the player can remember it outside
    the game, this knowledge shouldn't be hidden
    in game. This only leads to discrepancies
    between what the character does and what
    the character "should" do.

  • My position:

    The only way to avoid that discrepancy is to
    not have the feature (memory) at all. Every
    other solution is going to either remember too
    much or too little according to different
    players.
    Also, permanent eidetic memory of all map features is totally unacceptable.

I can see two solutions that might be good enough.
One is to age memories and have them dissapear, and supply a way for the
player to mark certain things/areas as important. If the number of
important places stays under some threshold, they will be remembered
permanently, but if it exceeds that threshold it starts becoming
unreliable, with a message to that effect.
The other solution is to restrict map memory to features it is reasonable
for the player to recall permanently, such as terrain, furniture, and
presence of items. The player would be responsible for remembering details
such as the location of items they care about.

@lucianposton

This comment has been minimized.

Copy link
Contributor

commented Sep 21, 2017

Almost all roguelikes have map memory. DDA has giant maps that can be easily forgotten, but no map memory. Map memory would be great and lack of map memory is pretty jarring here.

Each roguelike has a different atmosphere. I don't find it jarring in cdda. I seem to be in the minority, but I prefer the dark atmosphere. It thematically fits with the game as I imagine it.

If any such feature were added, I recommend making it optional via a setting or mod.

@Kelenius Kelenius referenced this issue Sep 12, 2018

Merged

Added map memory #25551

3 of 3 tasks complete
@Leland

This comment has been minimized.

Copy link
Contributor

commented Sep 24, 2018

Implemented in #25551

@Leland Leland closed this Sep 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.