ShellDungeon – Stateless Dungeon Game for a UNIX-Shell (CLI) – Add Commands in the programs argument

In Action

See also the following considerations: Experimentelle Archäologie: Das (fehlende) Genre der Shell-Argument-Only-Games

Mission

The following game is an experiment in developing a game that could have been played on a mainframe in the 1960s, controlled only from the shell. In other words, there were no internal game queries for input. The inputs are defined in advance.

Result [Shortdescription]

The result is a dungeon game called ShellDungeon. The game is only executed via the shell command “shelldungeon” and parameters.

$ shelldungeon
$ shelldungeon ww

The first command shows the start, each subsequent command shows the result of the actions.

Story

$ shelldungeon

A is the Avatar.

The game – Ingamescreen

  ######## +*  ####U############
  #F#^ oo# *+  # W             #
  # #  oo#     #               #
  # ## #########               #
  #  # FO      #         ##    #
  ## ######### #####           #
  #     X o O# XXX             #
  #I ^######o# ###       ^^^   #
  # A #Foo     # #   ^      ####
  ############## ############   
ELEMENTS
   A: PLAYER* 
   #: WALL 
   X: CLOSED DOOR 
   O: BIG BARREL 
   o: SMALL BARREL 
   F: KEY 
   U: EXIT 

   DECORATION
   I: PILLAR 
   T: PILLAR 
   .:SMALL STONE
   _:?

   SPRITES
   W: DRAGON - KILLS YOU
   v: CAT

Action

You play on the Shell. All movements etc will be added to the Shell Argument.

  COMMANDS (WASD MOVEMENT + E FOR ACTION)
   a:LEFT
   d:RIGHT
   w:UP
   s:DOWN
   e: ACTION // DESTROYS THINGS oOW 

Go up one step:
./shelldungeon w


Go up two steps:
./shelldungeon wd

You moved right into a spear. -30 Health!

Best Gameplay-Feeling

The best gaming experience comes from playing it in a real shell.

  1. Start
  2. Add Movement/Action (WASD+E Command)
  3. Press Return
  4. Watch Result
  5. Press Cursor up, last Commands come back
  6. GOTO 2

This makes it seem almost like a classic interactive game.

Ressources

Your ressources: Health, Keys & Gold

Keys & Doors

A closed door.

Collect keys by walking over them.

Doors open automatically when a key is present.

Destroy things

With the Command e – you can destroy everything that is 1 or less fields away.

You can destroy barrels (Oo) or hit the dragon.

Mechanics

The game is lost when you have no health left (running into walls, touching spears, being bitten by the dragon) with GameOver or when you find the exit (U).

or you get to the Exit.

PrintOut or InGameHistory

Of course all is documented in the ShellLog.

[()()()()()()()()()()()()()()()()]
[   (                            ]
[  )\ )   SHELLDUNGEON           ]
[ (()/(    0.5                   ]
[  /(_))                         ]
[///////////////////###//////////]

[ THE ARGUMENT ONLY ADVENTURE ] 
[ IDEA&CODE GAMELABZ/CHLUDENS ] 

  PLAY : ./shelldungeon [CMDS]
  CMDS : [MOVE wasd] [ACTION: e] 
         [HELP: h] 
  TRY  : ./shelldungeon h 
         > help 

  TRY  : ./shelldungeon wwh 
         > up up help 


[  HEALTH: 100 KEYS:0 GOLD: 0  ]

  ######## +*  ####U############
  #F#^ oo# *+  # W             #
  # #  oo#     #               #
  # ## #########               #
  #  # FO      #         ##    #
  ## ######### #####           #
  #     X o O# XXX             #
  #I ^######o# ###       ^^^   #
  # A #Foo     # #   ^      ####
  ############## ############   

YOU WAKE UP IN A DARK DUNGEON.  
YOU HEAR A ROARING DRAGON! 
ESCAPE!!!!! 


! USE CURSOR IN SHELL TO GET LAST 
!  COMMAND AND ADD NEXT CMD 


NX-37028:dungeons_cli rbauer$ ./shelldungeon w

[  HEALTH: 100 KEYS:0 GOLD: 0  ]

  ######## *+  ####U############
  #F#^ oo# +*  #w              #
  # #  oo#     #               #
  # ## #########               #
  #  # FO      #         ##    #
  ## ######### #####           #
  #     X o O# XXX             #
  #IA^######o# ###       ^^^   #
  #   #Foo     # #   ^      ####
  ############## ############   

> MOVED UP


NX-37028:dungeons_cli rbauer$ ./shelldungeon ww

[  HEALTH: 100 KEYS:0 GOLD: 0  ]

  ######## +*  ####U############
  #F#^ oo# *+  #w              #
  # #  oo#     #               #
  # ## #########               #
  #  # FO      #         ##    #
  ## ######### #####           #
  # A   X o O# XXX             #
  #I ^######o# ###       ^^^   #
  #   #Foo     # #   ^      ####
  ############## ############   

> MOVED UP


[..]

Technical

The game was developed in C so that it could actually be tried out on a mainframe with a TTY or terminal.

DevIDE

Specifically, an online IDE was used.

https://www.jdoodle.com/c-online-compiler

Source-Code

/*

SHELL-DUNGEON 0.5

PROJECT-DOCUMENTATION: https://research.swissdigitization.ch/?p=7826
IDEA & CODE: rene.bauer@zhdk.ch

OnlineIDE: https://www.jdoodle.com/c-online-compiler
  
die:      dwhhhhhh
solution: wwwwawwwsssdssdddddeddeedssaaeaeaadddddddwwdddawwaaaaaeeaaawwededaassddddddddsddsddd
end: 		wwwwawwwsssdssdddddeddeedssaaeaeaadddddddwwddawwaaaaaeeaaawwedwedsaassddddddddssddddddddddwdddwwssadsdwwwwaaaaaaaaaww

*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

// exe
int version = 5;

char *execName;   
char *execCmds;


int actIndex = 0;
char lastCmd = ' ';

// vars
int money = 0; // score
int keys = 0;
int health = 100;

// world
const int playFieldWidth = 30;
const int playFieldHeight = 10;

int playerX = 2;
int playerY = playFieldHeight-2;
int playerCmdIndex = 0; // where are we?

char inv[] = "SWORD";


char executedCommand[30] = "";
char executedCommandArg[30] = "";



// y | x
char playField[10][30] = {
                "######## +*  ####U############",
                "#F#^ oo# *+  # W             #",
[...]

Installation MacOS X

Download Source Code

// open terminal

// create file (or move to the download folder in the terminal - with > cd "xyz")
$ nano ./shelldungeon.c
// copy paste in source code
ctrl-x

// compile (forget the warnings)
$ cc ./shelldungeon.c -o shelldungeon
$ ./shelldungeon

// not running?
$ chmod 755 ./shelldungeon

Download Mac Compiled Version:

If you dont get it to compile it, here the compiled mac version (ARM)

Windows Version:

Use VisualStudioCode to compile it.

Findings: Genre Shell Argument-Only Input Games

The question now is, were there any games that worked like a command with an argument? So far, none have been found.

Requirements

Input: The input must come from outside as an argument. Example: > game input

This leaves only two possibilities for a game: Single input – Multiple inputs

Single input 1x

This variant seems to be possible only with very simple games.

It could be something like tossing a coin. You enter the input: coin 1. The program takes a random number and compares it with the coin. This game would be endless. The question is whether it would be an interesting game.

You could also imagine a more complex game like a maze, where you enter your moves in advance and see how far you can get in the maze. > labyrinth Uri

A kind of strategy game would also be possible. You enter what you want to use for the unknown battlefield. Of course, this is all very unentertaining (from today’s gaming perspective) if you don’t know what scenario you’re facing.

The whole thing would thus be a kind of autobattler as a genre.

TwiceInput 2x

Another possibility here would be to start the program at least twice. The first time without input, you see one possible level. Then you start the same program again with the parameters. And then it’s already a quite interesting setting.

A similar concept can already be seen at the gameplay of Oregon trail. There you buy things that you use afterwards.

MultiInput 2+x

The 2-input game (without saving any data as files) can of course also be opened. It doesn’t matter how often you call up the game with parameters. It’s simply a matter of solving a specific goal.

Of course, the game loses control over the number of attempts here. One could also argue that normal games do this too, since you can simply start over. The conscience of “how good the player” is therefore lies with the player and not with the game. And it is clear that the bigger the game, the less likely the trick of starting over is. Perhaps this is why computer games strive to make the game as long as possible. The commitment increases with the length of time spent in the game and the desire to continue what has been “achieved.”

Genre

Certainly, this type of game is not particularly interesting once there are stop-and-go games with input/returns like in MUDs (Basic) or directly “controlled” games via keyboard. In this respect, these computer games fall short. Nevertheless, such games would also be interesting because they could have been played on the first mainframe computers, even on teletypes/printers!

Unfortunately, there are no artifacts to prove this, because many experiments from the early days of mainframes were not documented or were even deliberately “deleted” because mainframes should not be misused for such purposes. However, if you look at all the software on Plato Systems (still playable today), it becomes clear that people tried out a lot of things. So it is unlikely that this software did not exist. Another hint is the 101 BASIC Games. There are many programs here that simply do something, such as generating a random maze, etc., which people then solve on paper. See also BASIC 101 1973 – Paper often printed out & then display games.

ShellDungeon

ShellDungeon is quite entertaining, considering its limitations. It is essentially a turn-based action-game.

When played smoothly, it comes close to the experience of the first truly interactive dungeon games on PlatoSystems, for example. Of course, it does not function interactively like those games. So the world doesn’t keep moving. Nevertheless, when you’re trying to get around the dragon (wW), for example, you do get the occasional rush of adrenaline that you know from classic action games.

In this sense, ShellDungeon has been developed further than originally intended, where the idea was more of a story-driven autobattler. However, this approach can also be tried out in the following experiment (unfortunately in German).

Here you define the Parameters and than the story start and takes out of the parameters the usable objects. https://www.and-or.ch/zureichoregontrail This could of course also be a simple shell-command/exe.

It will be interesting to see whether such games and similar ones can be found on old tapes at some point. And if so, how different these games were in contrast. Perhaps more in the elearning area of this systems .-)

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert