Program tiny rovers to do your bidding! Or rescue stranded astronauts - your call.

Lunar Logic is an exploration and puzzle game featuring a proprietary programming language inspired by assembler. For each command you will need to find a physical piece of paper to feed into one of your four processors.

This is my submission to the cre8 jam and I'm happy the game is in a halfway decent state and can be played through completely. This version includes some basic commands and levels - I have some ideas for more levels, but had to struggle already to fit everything into a pico8 cart.

* Lunar Logic Rover Warranty Does Not Cover Deployment On Mars

How to play

Since this is a Pico8 game, the controls are kept minimal: only the arrow keys and two buttons are used throughout the game: X and the key to the left of it (Z, Y or W - depending on your keyboard) which in the game is shown as O.

You are controlling a lunar rover who had the unfortune to be stranded on mars during an emergency rescue operation. Equipped with a emergency rescue tether, the rover is tasked with reaching crew members in the martian caves and extract them to safety. BUT: inside the caves the radio signals controlling the rover no longer work. The rover needs to be programmed to reach the injured crew member - once the rover is close enough we can activate the extraction by pressing and holding the down key.

The tutorial gives an introduction on how to move and execute tasks on the surface. The programming part is a bit cryptic - not least because the lunar logic rovers process physical pieces of cryptographically secured command paper tokens (to avoid unlicensed use of their rovers). To program the rover, you will have to collect the commands you need.

How to edit a program

Once you have collected a few commands, you can create programs by selecting one of the 4 processors and press O to edit. The left side shows the current program, the right side shows available commands. User the cursor keys to move the yellow indicator around. Press X and up or down to move commands, remove them by pressing X and right, add new commands by pressing X and left. When the argument of a command is selected you can change the value of the argument up or down by pressing X and up or down. If you have the very top bar selected you can move to other programs or start/stop a program.

How do these rovers work?

Each rover has 4 processors, each with its own program, program pointer, main register and stack. Many commands interact with the register and/or stack, e.g. R# takes the value from the register and turns right by this many degrees. ADD adds a value to the register, etc. To show/hide a help text for each command, press up when focusing the header of the program editor. The processors can run at the same time and issue competing motor commands. They can also access a shared memory bank with 15 slots. Processors can also start or stop other processors with the START and STOP commands.

There was an integrated documentation system in the game, but due to the token and memory limitations of pico8 I had to remove it for now and move it to its own cart (linked from lexaloffle):


Here is a text version of the documentation:

operating manual

congratulations on your purchase of a lunar logic robust rescue rover l2r3.
your new rover has many capabilities and can be controlled either by remote control via the included rc remote, or by running using programs on the 4 available processing units with lunar script tokens. the rescue edition l2r3 has an emergency rope pulley which will be automatically deployed once a rover enters a cave and allows speedy extraction of rescued personnel or equipment.

remote control

to activate the remote, use the arrow keys to select the remote and press the O button (y/z/w). To move forward press U, to turn, press L or R. to interact with objects or use the emergency extraction, press D.
your rc remote can control the rover as long as a radio connection can be established. when exploring caves, only the recovery option will be available, but the rover can work autonomously when programmed accordingly.

recovery

to activate the recovery function in caves press D.

using programs

the l2r3 can run 4 programs in parallel. to start a program exit the remote by pressing O, select program A,B,C or D with L or R and press X to start the program. the program can be edited by pressing O, but the program needs to be stopped.

programming

lunar script uses high quality cellulose programming tokens cpts. reading a token will execute an action and the processor will move on to the next token in the sequence, unless the token specified otherwise.

fwd8 -- move forward 8 steps
r90  -- turn right 90 deg
fwd8 -- move forward 8 steps

memory

each processing unit contains a special memory [register] # which can influence what a token does. a token can also set the register to some value.
additionally, each processing unit has access to a memory [stack] and a [memory bank].

register

the register can contain values of different types, such as numbers or [symbols].

stack

the stack allows access only to the most recent element (last in first out) via the tokens push and pop.

push
pop

memory bank

the memory bank has 16 slots, which can be accessed via symbols. each slot can be written to, or read from.

write S -- writes what is currently in the register to S
read S  -- copies what has been saved into the register

parameters

some tokens accept parameters which can be changed when editing a program.

fwd 15 -- move forward 15 steps
       -- can be changed to any number

in hard mode, token parameters need to be provided through the program stack.

how to program

to edit a program, select processor unit A,B,C or D and press O. use your cursor keys L or R to select what to edit. use U and D to select a token, move a token, change a parameter

symbols

tokens that consume or produce symbols understand the following set of symbols, which can have different meaning in different context.

★
웃 - person, e.g. a crew member
♥
⌂ - home
● - caves
⧗ - broken devices
☉ - tokens 
◆
🐱 - lifeforms
♪  - music or sounds
😐 - robot
⬆️ - up
⬇️ - down
⬅️ - left
➡️ - right

your memory bank can store one value for each of these symbols per processor.

Future Features

A number of features didn't get done in time or didn't get worked into a map: 

  • Documentation needs to be more cryptic
  • The scan command currently doesn't do much except 'it turns blue'. 
  • The 'sense' command is still buggy, so building a maze solving Braitenberg vehicle doesn't currently work. 
  • Making the puzzles harder, but still solvable is also a task for future me.
  • puzzles that require the memory slots and multi processor coordination
  •  Hard mode: instead of allowing parameters for commands, everything has to be put on the stack!

Feedback/Questions

Let me know what you think! This is my first released game and it was very rushed. I'm happy it's out, although there is so much more I wanted to do.

Download

Download
lunarlogic_0.8 cart image 39 kB
Download
lunarlogic_docs.p8.png cart image 13 kB
Download
lunarlogic_windows.zip 995 kB
Download
lunarlogic_osx.zip 3 MB
Download
lunarlogic_linux.zip 755 kB
Download
lunarlogic_raspi.zip 2 MB