-
Notifications
You must be signed in to change notification settings - Fork 53
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
waypoints and portals #1356
waypoints and portals #1356
Conversation
a56f824
to
213cd25
Compare
Looks fun! I'm travelling but hope to be able to look at this within the next few days sometime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks cool! Just a few questions/comments.
correctedWaypoints = | ||
binTuples $ | ||
map | ||
(\x -> (wpName $ wpConfig $ value x, fmap (offsetWaypoint upperLeft) x)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the upperLeft
here as a vector to apply an offset
Oops, |
Closes #144. This builds upon portals support (#1356) # Demo scripts/play.sh --scenario data/scenarios/Testing/144-subworlds/subworld-mapped-robots.yaml --autoplay --speed 2 [![asciicast](https://asciinema.org/a/vC13dW8M1S8t2b1J4XkW80U1q.svg)](https://asciinema.org/a/vC13dW8M1S8t2b1J4XkW80U1q) # Future work * Augment portal definitions with an optional "relative orientation" attribute, that can turn the player around when passing through the portal (#1379) * Specify whether portal performs instant transportation or whether `move down` is required (#1368)
Previously, the logic to wrap horizontally was hand-coded, both for the player (using a dedicated monitor robot) and for ghosts (who, as system robots, implemented the teleportation themselves). Now that we can use built-in portal functionality (#1356), no custom logic is needed to handle the teleportation. A (much-simplified) monitor robot still observes the base robot to award the hidden "World wrap" goal. ## Demo scripts/play.sh -i data/scenarios/Challenges/hackman.yaml --autoplay --speed 6
Portals are a prerequisite to subworlds (#144).
However, portals as a first-class feature have utility that is independent of subworlds. The Hackman scenario (#1135), for example, currently has to provide redundant implementations of portal logic for the
base
robot and for system robots. Furthermore, the locations specified in these bespoke portal implementations are hard-coded in the.sw
file, so are brittle with changes to the map.Demos
Portal and waypoint semantics
Waypoints
Waypoints are introduced as an intermediate abstraction to better accommodate substructures.
A
waypoint
command, independent of portal mechanics, is also introduced to allow system robots to query named locations.map
), or within themap
via thepalette
.unique
flag is set totrue
for one of the instances of that waypoint name.Portals
(entrance, exit)
pairs of waypoints.entrance
is a bare waypoint name, but theexit
is a waypoint name paired with an optional subworld name. Omitting the subworld name implies a portal that exits to the same subworld as its entrance.entrance
.Obstructions
Other musings