-
Notifications
You must be signed in to change notification settings - Fork 0
Description
A typical access search involves maintaining a set of accessible nodes (Spots) and alternately trying edges outward from the accessible set and accessing locations inside the accessible set. We can't quite do this with a traversal graph and context parameters that could affect accessibility.
OoTR solves this for its context parameters in different ways:
- age: child and adult maintain different sets of nodes
- time of day: marks accessible nodes as combinations of the times of day available, using sources of time changes for a flood-fill-like algorithm
We can apply the same concept here, keeping track of combinations of modes for each Spot that is accessible in some mode. Edges will act as filters that only let certain modes through.
The challenge then comes in how to keep track of the combinations of modes available. For small context parameters (where there are only a few options) we can use bitflags. If there are too many options (say, more than 32) or it's an integer context variable, that might not be plausible or efficient. It would be better to say "we can achieve [these/all] values" based on the sources we have. Given access to a save point in AV2, for example, we can achieve any energy needs under 300, and any edges out that cost, say, 100 will mark the new nodes as achieving under 200, etc.
Essentially, we'll have to classify context variables based on how they're used. Here are some ideas so far, based on what we have in AV2:
- modals (enums) - when we typically set and test them for specific values and there aren't many
- loadouts - when we set combinations of specific values (or even separate enums/contexts)
- refillables - when sources exist to reset to a certain amount, usually used as prices or threshold checks
- points - prices or threshold checks, but there aren't reusable sources (i.e. they come from collecting items)
- positional - type is a Spot. Most likely these can only be set to the current position or specially. Warping to them might generally be a no-op, but it could allow for greater context accessibility, such as when in AV2 the drone can set a save point and Indra can warp there.
- map - easier to treat this like a location or item and "collect" it during the first sweep.
Even with all this, it might be useful to collapse nodes connected by mutual free edges.