To start playing you need to download either a pre-built executable archive (found on the releases page) or the source code of the game.
The easiest way to start the game is to run a self-extracting executable archive (see the end of this page to know how to generate one yourself). Pre-built archives for the various versions of the game can be found on the releases page.
To download and start the latest version of the game simply run the following two commands in a terminal.
$ wget https://github.com/phyver/GameShell/releases/download/latest/gameshell.sh
$ bash gameshell.shNote that when you quit the game (with control-d or the command gsh exit)
your progression will be saved in a new archive (called gameshell-save.sh).
It can be run to resume the game where you left it.
Alternatively, you can run the game directly from the source code. In that case, simply download the repository (either by cloning it or by downloading a tarball) and start the game with the following commands:
$ git clone https://github.com/phyver/GameShell.git
$ bash GameShell/start.shYou should not need to change the default options for the scripts, but you
can see a list of available options using the -h flag.
Playing GameShell involves very few game-specific commands. They are
-
gsh goal: displays the current mission's goal. If the goal doesn't fit on the screen, it is paginated with thelessormorecommand. -
gsh check: checks if the current mission is completed. If so, a congratulation message is displayed, and the player starts the next mission. If not, the mission is reset. A player can rungsh checkas many times as she wants. -
gsh reset: if the player messed up the mission by removing an important file, this command will try to reset the mission, without checking for completion first. In rare cases,gsh hardresetmight be necessary. -
gsh help: displays a small message with this very information.
The command gsh exit will quit the current game, but it is customary to use
the sequence Control-d for the same purpose.
In some situations, some other commands are needed. They are described by the
gsh HELP command. Here are the main ones.
-
gsh skip: it has unfortunately happened that some bug prevented a mission to be completed successfully. The commandgsh skipwill cancel the current mission and go to the next one. Running this command will first ask for a password (except in debug mode) to avoid students overusing it. (Just like most othergshcommands, the use of this command is logged.) Note however that skiping a mission that has already been completed doesn't require a password. -
gsh goto N: when the previous command isn't sufficient,gsh goto Nwhich will go directly to missionN. Just likegsh skip, this command will first ask for a password. Note however that going back to a previous mission doesn't require a password. -
gsh protectandgsh unprotect: the directories containing GameShell code and data are neither readable nor writable by the player. (Except in debug mode, or when running from the source repository.) That's to prevent accident where a player inadvertently removes some important file. Those commands reset the read / write permissions. -
gsh auto: if the mission comes with an automatic script (auto.sh), this command will call it. This script is supposed to complete the mission and callgsh check. This is useful for testing purposes, but also if usinggsh skipis not sufficient. For example, if the mission's goal is to create a directory.gsh autowould ensure it is created correctly. Just likegsh skipandgsh goto N, this command will first ask for a password. -
gsh index: this will display the list of available missions, with their status. If you've usedskipandgotoa lot, this might come in handy. -
gsh stat,gsh stat rawandgsh stat raw -vdisplay various statistics about the current game.
The other commands are either self-explanatory (gsh welcome) or only useful
while creating missions (gsh assert ..., gsh test).
Creating an executable archive
The script utils/gameshell_archive.sh is used to create an executable archive to
distribute a (customized) version of GameShell.
By default, it creates an archive with all the missions listed in the
$GSH_ROOT/missions/index.txt file and with all the available translations.
You can choose the missions you want by listing them on the command line:
$ ./utils/gameshell_archive.sh missions/basic/01_cd_tower missions/basic/02_cd.._cellar/ missions/basic/03_cd_HOME_throne/If a directory contains an index.txt file, all the missions listed in it
will be included. You can also give an index.txt file directly on the
command line.
You can customize the archive with the following options
-A: make the archive default to the "anonymous" mode. This is the default.-P: make the archive default to the "passport" mode. For each new game, GameShell will ask for the player's name and email. This is useful in the classroom as it makes it easier to link a game to the corresponding student. (The player can run the archive in anonymous mode with the-Aoption.)-p PASSWORD: you can choose the admin password for the archive. This is also useful in the classroom as we might not want the students to learn of this password. :)-N NAME: if you want the archive and its directory to be called something other than "GameShell", you can set the name with this option.
More options are available and listed in the output of
$ ./utils/gameshell_archive.sh -h