

Game description:
-----------------

Title: "TENacious Maze Race"
Platform: MSX
Author: Rodrigo Gonzales
Nick: Rodrivas78
Language: MSX-BASIC v1.0
Category: EXTREM-256

Files:
------
TENACMAZ.BAS: BASIC file
TENACMAZ.TXT: Code in text format 
tenacious_maze_race.png: Screenshot 
TENacious_Maze_Race.dsk: Disk image for emulator
readme.txt: Description
------------------------------------------------------

Links:
------
GitHub:
https://github.com/rodrivas78/MSX/tree/master/BASIC_10_Liners/TENacious_Maze_Race

To play it online:
https://msxpen.com/?code=-M0TTRF06pWs3pZxc7bI


Game Instructions (be sure to read the "Additional Rules" below):
-----------------

This is a two player race, in which scores whoever crosses the maze and 
first reaches the "end zone" of his own color (on the opposite side 
of the screen). Avoid touching the walls of the maze or this will cause
you to return to the beginning of the path.

 Controls:
 ---------

 Keyboard:
  - ARROWS to control the BLUE player 
  - SPACEBAR to skip the current maze

 Joystick: 
  - DIRECTIONAL PAD (joystick) to control the RED player
  - BUTTON (1) to skip the current maze


Additional Rules:
-----------------

 - Mazes without exit

 Along the game will appear some mazes that has no exit, that is, 
there's no way to the other side. If it is clear for BOTH players (or 
better, if BOTH players agree) that the current maze has no exit, than
one player must hit the SPACE BAR (on keyboard) or the JOYSTICK BUTTON 1
to generate another maze and the game can continue. WARNING: If someone 
hit the SPACEBAR or BUTTON accidentally, in a hasty manner or with a 
wrong judging perception, then he will have to give a point to the
adversary by letting him run alone on the next maze.


Tips:
----
   - Play in full screen.
   - Increase the volume (the game has some sounds).


Easy (slower) Mode:
-------------------

To let the game more slow and actually easier, just change the
variable "R" in line 10. Instead of R=3, change to R=2. 


Emulation:
---------
The game should work well on almost any MSX emulator, but I 
would like recommend BlueMSX or openMSX.

Load Instructions:
1. Start BlueMSX .
2. Drag & drop disk image "TENacious_Maze_Race.dsk" to the BlueMSX main window.
3. Press "play" button (little arow on the top) or  LAlt+F9
4. The game will start automatically
-------------------------------------------------

 To restart the game press "CTRL + STOP" (on a real MSX) or 
"CRTL + PgUp" on an emulator, then press F5 or type RUN and 
press Enter.


A little about the code:
------------------------

10 PRINT Mazes:
- The mazes are generated by a single line, a small variation of the 
famous(*) one-liner: "10 PRINT CHR$ (205.5 + RND (1)):: GOTO 10",  
enshrined by users of Commodore 64. We can find it on line 20:

20 ...FOR A = 0 TO 31 : PRINT#1, CHR$(203.3+RND(1)); : NEXT...


Collision Detection:

- Collision detection is done by the POINT command (lines 30 to 60),
which returns in the variables "N","Q","C" and "G" the color values ​​under the 
position coordinates of each player. 

The controls and movements of the players are on lines 70 and 80.

The main Loop of the game occurs between lines 30 and 90.

------------------------------------------------------------------------------

(*)
 To learn more about this one-liner I recommend reading the very interesting book:
"10 PRINT CHR$(205.5+RND(1));: GOTO 10" - The MIT Press (various authors)
The book can be downloaded for free through the following link:
http://trope-tank.mit.edu/10_PRINT_121114.pdf


All files can also be found on my GitHub:
https://github.com/rodrivas78/MSX/tree/master/BASIC_10_Liners/TENacious_Maze_Race


Rodrigo Gonzales
Twitter: @rodrivas78
e-mail.: rrivas2009@gmail.com



