santaslabyrinth

Moodboard for an imaginary game

In January 2023 every day I made a room with a robot in it, and maybe wrote a little program for the robot in the room. This was also mixed in with rules, lore and rechosted inspirations. Nowadays this is just posts that evoke a particular feeling. Probably like 80% rechosts from @randochrontendo

posts from @santaslabyrinth tagged #Dungeon23

also:

This is part of Santa's Labyrinth, a #Dungeon32 thing

"setmark" makes a mark on the current tile, detectable by "look mark" and "touch mark".

#v0
define charge_treasure
    touch treasure
    if yes forward
    if yes finish
    repeat
end charge_treasure

define charge_mark
    touch mark
    if yes forward
    if yes finish
    repeat
end charge_mark

define reset_on_mark
    # assume we're facing away from the
    # conveyor belt to start.
    left
    look mark
    if yes charge_mark
    # "charge_mark" may have overwritten
    # the condition register, but it'll
    # always overwrite it with "yes"
    if yes left
    if yes finish

    right
    right
    look mark
    if yes charge_mark
    if yes right
    if yes finish

    # seeing the mark in neither
    # direction, we're either out
    # of visual range or
    # we're standing on it.
    # This is either a non-problem if
    # we're a lot faster than the belt,
    # or will solve itself pretty soon if
    # we're a lot slower than the belt.
    # In any case, just turn around.
    right
end reset_on_mark

define grab_goodies
    # starting on the mark, facing the belt
    forward
    right

    # we rely on the robot
    # being able to outrun the conveyor belt
    # and the conveyor belt always having
    # a treasure somewhere upstream
    do charge_treasure
   
    right
    forward
    do reset_on_mark
    repeat
end grab_goodies

forward
setmark
do grab_goodies


Objects are hazard, treasure, wall, and door.

The robot can detect objects with the touch command (which checks the tile immediately in front of the robot) and the look command (which checks forward in a ray from the robot until it hits an obstruction or a minimum range)

touch and look commands have particular forms associated with each object type, for example:

look hazard
touch wall
look treasure

When running a detection command finds an object, the robot's conditional register is set.

#v0
# move forward, unless there is a hazard there
touch hazard
if no forward