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


part of Santa's Labyrinth, a #Dungeon32 thing

Code in the (v1) robot programming environment interacts with the robot hardware via a varvara-style device at range #d0-#df. Programmers are not obligated to interact with the device directly, and OCI provides the robot.tal convenience library for standard operations, but developers wishing even more control over the interface can interact with it as follows:

robotd0vector*d8actuate
d1d9detected
d2statusdadistance
d3--db--
d4--dc--
d5--dd--
d6--de--
d7--df--

The vector* is evaluated when the robot completes an actuation or encounters an error. On complete actuations, the status register will be set to #00 before vector is evaluated.

The status register is readable, and reads #00 if and only if the robot is idle and can accept a new actuation command.

The actuate port receives a single byte instruction, and initiates that operation for the robot. Operation codes are

  • forward: #02 - move the robot one tile forward
  • backward: #03 - move the robot one tile backwards
  • left: #08 - turn the robot 90 degrees to the left, in place
  • right: #0c - turn the robot 90 degrees to the right, in place
  • set mark: #10 - mark the tile that the robot is standing on
  • erase mark: #11 - remove any mark on the tile the robot is standing on

The robot performs only one actuation at a time, and will ignore commands that overlap.

The detected register is readable, and contains a code usable to identify the nearest object along the robot's line of sight.

  • treasure #01
  • hazard #02
  • wall #04
  • door #08
  • mark #10

If no object is present within the robot's detection range, detected will contain #ff.

The distance register contains the detected object's distance away from the robot, in tiles, as an unsigned byte. A distance of #00 indicates the detected object shares the same tile as the robot. If no object is detected, distance will contain #ff.

detected and distance are only safe to read when status is zero and the robot is idle.


You must log in to comment.