Text-Maze

Play with your Puppy.
Post Reply
Message
Author
TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

Text-Maze

#1 Post by TecnoGuy458 »

EDIT: second edition is out. (v2.x)

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
mazesearch.sh is located in the

Code: Select all

MAZE
directory and searches for the main maze files (.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
explanation:
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
1=wall
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/
note on controls in versions 2.2 or later:
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
First is the control settings. where "w" would mean pressing the "w" key.
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"
next is the system settings area. here you can enable/disable debugging mode. as well as specify a terminal emulator to use. (used by play-text-maze-2.sh to start the program.)

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
Attachments
Text-Maze-v2.4.pet
Text-Maze-v2.4 (newer 3D perspective view system (faster)
-(much) faster display time
-simpler maze selector.
(28.1 KiB) Downloaded 239 times
Text-Maze-v1.1.pet
Text-Maze-v1.1 (older 2D TOP-down view system (slower)
(16.84 KiB) Downloaded 260 times
Last edited by TecnoGuy458 on Sun 17 Apr 2016, 11:53, edited 6 times in total.

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

Text-Maze

#2 Post by TecnoGuy458 »

screenshots of similar.MAZE
Attachments
text-maze-v2.2.jpg
Text-Maze-v2.x view system (version shown is v2.2)
(41.75 KiB) Downloaded 797 times
capture21943.jpg
Text-Maze-v1.x view system
(27.36 KiB) Downloaded 977 times
Last edited by TecnoGuy458 on Thu 11 Feb 2016, 01:42, edited 1 time in total.

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

#3 Post by TecnoGuy458 »

second edition (v2.x) is here! (see first post)

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

#4 Post by TecnoGuy458 »

UPDATE: v2.2 is out.

->finished switching over to the new lookup routine.

->reworked the controls to use "wasd" for mvement and "q" to quit. as a default key-map. (key-map can be changed in the config file (see first post)

->add config file (see first post)

->update TIMG to v3.1

TecnoGuy458
Posts: 123
Joined: Mon 26 Jan 2015, 20:38
Location: Ohio

UPDATE: v2.4 is out

#5 Post by TecnoGuy458 »

-first off, the v2.* display system has been sped up (again).
this was done using a T-IMG to escape code converter, which makes the draw time (very) fast.

(NOTE: this is not going to cause a significant speed up in the 1.x versions, due to the compositor being the major culprit of their slowness.)

-also, the maze selector has been reworked as a numbered list based one.
each maze is given a number and you enter a number(and press enter) to choose a maze.

Post Reply