Strategy Games Coded In 1 Line ============================== Strategy Games Coded In 1 Line ------------------------------ Both of the below games fit within a single line of ZX-BASIC code. They also fit within the single screen limit so that none of the listings scroll when LIST-ed on a 48K spectrum. To run the games, type 'r' (i.e. RUN) after the game has loaded. Click on any of the below links for relevant game documentation. Both games were developed by Digital Prawn and Einar Saukas. Cave Adventure -------------- The rather imaginative initial in-game screen of Cave Adventure Cave Adventure is a very simple and tiny text adventure. It was created just to see if it was possible make a text adventure in a one-liner, Valid commands: north, south, east, west, inv, look, look [object], get [object], open [object], kill [object] Consider the game completed once you have received the "You Won!" message. Backstory --------- As a young warrior apprentice, you have been chosen by the village elders to seek out the evil menace that lurks in some nearby caves. Once found, you should use any means at your disposal to defeat it. Good luck on your quest... Acknowledgement --------------- Again, thanks very much to Einar Saukas for greatly improving the game, by adding another location as well as further items. Einar also improved the program output and added the inventory command. Sim Town -------- This town building simulation runs from the year 1900 through to 2000. The object of the game is to achieve a highest town population as possible by the year 2000. Key, showing in-game features. Rules Of The Game ----------------- All buildings are placed on the town by first moving the 'game cursor' to the desired location and then pressing a key to build it. Keys are as follows:- 'q','a','o','p' - move the game cursor around the screen 'r' - build a residential block 'c' - build a commercial block 'i' - build an industrial block 'e' - build an electricity generating power plant Buildings cost the following:- residential block - 2 million dollars commercial block - 3 million dollars industrial block - 4 million dollars electricity generating plant - 5 million dollars You start the game with a budget of 20 million dollars. If/when your funds get down to zero (or sometimes a few million dollars below zero), then you can no longer build anything. In that case then you can only build again when your funds have recovered. Funds are generated through tax. Tax is at a fixed level and is only collected once the town population exceeds 20,000. After this point, Tax is collected in proportion to the population of the town. i.e. higher population leads to more tax collected, which in turn leads to more funds available for building. Population will only increase if you have (a) at least one electricity generating station, and (b) the town is "balanced" in terms of having residential, commercial, industrial and electricity plants in reasonable proportions. If the town goes out of balance (too much industry or not enough housing for example), then the population will cease to expand, and may even fall. But overall, for a correctly balanced town, more buildings will generate greater population increases. So in the long run, increasing the total number of buildings in the town will give the player a higher final score. If you get to the point where all your funds are exhausted, and everyone has fled the town (Population 0), then the game is unwinnable from that position, might as well restart and try again. (Can break out with shift-space, and RUN it again). If you can't make any progress in the game then some hints are in the following box. (Drag mouse over to reveal hidden text):- Tips ---- To start off with, build one electricity generating plant, one industrial zone, one commercial zone, and two residential zones. After a few years, some tax will start to be collected. Once your funds are again up to around $10-$20 million or so start expanding further (add an extra commercial zone for example). Add a few more various buildings of different types. If the town goes out of balance (population starts declining), then try to make up for it by building something different. As a rule, more residential areas are needed than commercial zones, which are needed more than industrial zones, which are needed more than electricity plants.