Part One!
To download all the code samples for part one of this series, open a terminal and install Git via sudo apt-get install git . Next run git clone https:// github.com/ azuregate/ lxfpython textadventure. git . The files download to the ‘lxfpython adventure’ folder in your home directory.
MAPPING YOUR WORLD
If you prefer not to install extra software, the terminal on most Linux distros can run Python perfectly well. To execute a script, just use the python3 command plus the filename, such as python3 adventure1.py .
KEEPER OF THE KEYS
For simplicity, we’ve placed all the code for the game in one simple script. A competent Python programmer would probably split a game into several files then call on them from the main script. Read more at: https:// docs.python. org/3/tutorial/ modules.html
Text adventure
Don’t miss next issue, subscribe on page 16!
OUR EXPERT
Back in the day, budding game designers would create the maps for their text adventures using graph paper and a lot of patience. You’re welcome to try this if it tickles your fancy, but there are more modern alternatives.