Vixen
caa30e12
csharp
public sealed class ExplorationSection

A character's discovered points and lifted fog, as a profile section.

Read the guide page for this →

Remarks

The largest section by a long way, and the one whose size is a design decision. Fog is a bitmap — one bit per cell — so a 256×256 map is a kilobyte and forty maps is forty kilobytes. It is written on the same cadence as a level because it is the same kind of thing: revealing a cell twice reveals it once.

⚠ A map's fog is written with the size it was written at, and refused on load if the map has been resized. A bitmap read into a grid of a different width is not wrong in a way anybody notices — it is a character whose explored map has quietly become diagonal stripes. Losing the fog for one map on the patch that resized it is the honest outcome; ExplorationRecord.RestoreFog is what enforces it and this only records that it happened.

⚠ The discovered points are seated silently. Discover with a null context skips the requirements and still raises Found and Completed, so a login would toast every landmark the character has ever visited and play the map-complete fanfare again. ExplorationRecord.Seat is the door for exactly that reason.

Fields and properties (3)

  • public const int Version

    The format this reads and writes.

  • public ProfileSectionId Id

    What names it.

  • public int Resized

    How many maps could not be restored because they had been resized.

Methods (4)

  • public ExplorationSection(ExplorationRecord record, CheckpointPolicy? checkpoint = null)

    Makes one over a character's record.

  • public void Touch()

    Says something moved, so the next checkpoint writes.

  • public ReadOnlyMemory<byte> Save()

    Writes what it holds.

  • public void Load(ReadOnlyMemory<byte> bytes)

    Reads what it held.

Used by (1)

  • ExplorationSectionTestsVixen.Live.Gameplay.Tests