4255

Find your way out of an electronic labyrinth

DescriptionThis is a microcontroller version of a 1984 elektor game (dutch edition: Elektuur, march 1984, page 42).
You must find your way out of a labyrinth of 16x16 cells. But you can see only the cell you are actually in.
There are walls on some sides, openings or eventualy a gate for which you need a key.
To make things nastier there are also a few traps in which you can enter but never leave (Hotel California).
But you will also get some help messages to warn you or to tell you where (aproximately) you are.
The original game was build around a 2kB EPROM, a lot of TTL chips and 22 LED's.
My new version contains a microcontroller and an LCD display.

This is the first step, to test if the game can be realised in a simple way.
To make things easy for me I use an existing Elektor platino board with no need for additional hardware.
The platino is equipped with a 4x20 LCD-display, a rotary encoder and an additional pushbutton.
Jumper settings are described in the sketch. Processor on my platino is an ATmega328.

Operation of this test versionat startup a menu is shown with 4 lines (picture 1). By rotating the encoder the required line can be selected.
the switch on the encoder can be considered as "yes", the additional button as "no".
line 1 = (re)start game: yes=start game, no=continue pending game
line 2 = select game: not operational yet; there is only one game
line 3 = game with key: yes=you also need to find a key for a gate somewhere, no=no key needed
line 4 = additional help: yes=show the cell number you are in, no=no info

After selecting line 1 and pressing a key the game is started (picture 2).
On the left of the display the cell you are in is shown. Solid walls are represented bij blocks,
openings by dots and a gate by 'x'. On the far right of the display the traveling direction is shown (N, E, S, W).
The direction can be changed by rotating the encoder. By pressing the encoder key you enter the next cell in the
traveling direction (if possible). By pressing the additional button the menu appears.
On the right part of the first line some instructions are shown such as the aproximate position you are or a warning
that you are near a trap. The second line shows if you found the key. The fourth line shows additional help (if selected).

Development targetsAs this is a first test, I have some wishes for the future:
- add the other 7 labyrinths from the original version (after check)
- replacement of the encoder by 4 pushbuttons 
- sound
- software to build and check labyrints on a PC
- display playing time
- more additional help for players
- grafic OLED instead of LCD, eventually with touchscreen
- three dimensional labyrinths (size 8 x 8 x 8)
- stand alone (without Arduino)
At this moment I can't yet promise all wishes will ever be realised.