Text Adventure Game (almost) purely data driven and written in BASICA/GWBASIC
Saturday, April 6, 2019, 11:00 PM
Posted by Administrator
I finished an almost playable version of my almost pure data driven Text Adventure Game, which is written in BASICA (GWBASIC). It was done just for fun, to show that modular programming is also possible with an old programming language.
It is *very easy* be modified to have a totally different story line, because most of the game flow is stored in DATA lines.
These DATA lines look like this (excerpt):
4110 DATA "Grass,1,the border,0"
4120 DATA "Grass,1,grassland,0"
4130 DATA "Grass,1,Stones,2,Plants,1,stony ground,0"
4140 DATA "Grass,1,Stones,2,grassland with stones,0"
4150 DATA "Grass,1,Insects,1"
4160 DATA "Grass,1,Trees,1,Nuts,4,a forest,0"
4170 DATA "Grass,1,Trees,1,Nuts,4,a forest,0"
4180 DATA "Grass,1,Trees,1,Nuts,4,a forest,0"
4190 DATA "Grass,1,Trees,1,Nuts,4,Stones,2,a forest and stones,0"
Each object has it's "object" or "item" type in a following number.
There is a type 0 for a description (only), and another type 9 for special descriptions.
The rest of the types are consumable, can be used as a weapon or can be killed ;-)
The map is a rectangle with 11 fields (height and width), but this can be easily changed, too. Also, the descriptions which are shown for each item type can be changed easily.
Just take a look into the source code (at the end all data is listed).
This is still Version 0.90 and contains an extra bug (for testing, line 4060), and has a command not ready implemented, "DRINK" (but the rest is working fine).
Take a look at the running program, I made a video and uploaded it on youtube (see "related link").
The source code of version 0.90 can be downloaded >
here<.
Added later: Meanwhile I finished the program to be fully functional, see >
here<.