GITHUB:https://github.com/ThomasTheSpaceFox/Text-Maze-2
text maze uses various bash scripts to allow the player to solve mazes.
lookup.sh -used in wall detection logic
T-IMG.sh -used to display the current maze view.
play-text-maze.sh -runs the game in the terminal designated in
NOTE: for versions 2.2 and later this has changed. see text-maze.conf section below.
Code: Select all
term.config.txt
Code: Select all
MAZE
each maze is made up of 2 files: where sample is the maze filename
sample.MAZE -contains all necessary info about the maze.
sample.MOD.txt -maze data file.
sample.MAZE looks like this:
Code: Select all
sample maze
sample.MOD.txt
11
9
2
2
9
2
name
.MOD.txt file
sizey -maze size Y (lines)
sizex -maze size X (columns)
starty -player start Y (lines)
startx -player start X (columns)
endy -player end goal Y (lines)
endx -player end goal X (columns)
where Y1 X1 is the number at line 1 column 1
sample.MOD.txt looks like this:
Code: Select all
111111111
101111111
100010011
101110101
101000101
100010001
101110111
101111111
101111111
101111111
111111111
0=path
please ensure starting and ending positions are on paths.
note that no path is along the edge of the maze, that there is at least one wall (1) space between the player and the edge of the maze at all times. this is necessary due to how text-maze 2, determines witch T-IMG image to present as the current maze view.
game is installed in
Code: Select all
/usr/local/Text-Maze-2/
you can change the keymap in the config file. see below.
text-maze.conf
the config file is named:
Code: Select all
text-maze.conf
Please note that the key map is case sensitive.
Code: Select all
# controls
#up/forward
UKEY="w"
#down/backward
DKEY="s"
#left
LKEY="a"
#right
RKEY="d"
#quit
QUITKEY="q"
Code: Select all
#system settings
#terminal emulator to use
THETERMINATOLUSE="urxvt"
# turn debugging on(1) or off(0)
DEBUG=0
2 mazes are included:
sample.MAZE -original test maze used during development
similar.MAZE -maze identical to the one shown in text-maze's icon