City 2068

Products: City 2068
Date: 1985
Type: Program
Platform(s): TS 2068
Tags: Game

A post-apocalyptic text adventure set in a deserted Manhattan, where the player must navigate subway tunnels, city streets, a large library, a zoo, and a high-rise to retrieve medical supplies and escape by hot air balloon. The 60-location world is stored in a 60×160 character array (t$()), with room connections, light flags, and danger flags encoded in a parallel numeric array (m(r,d)). Five keys unlock specific doors by modifying the map array at runtime. The variable file carries all game state — room connections, object positions, and starting room — separately from the BASIC listing.

Program Analysis

The TAP file contains both the BASIC program and the variable file in a single block — the author removed the string arrays from the BASIC listing to cut load times, but preserved them in the variable area, where they load together with the program.

Narrative premise

The player has swum across a river into a post-apocalyptic city (implied to be New York) to find food or medicine for a surviving colony. The game opens with a multi-screen text prologue, then drops the player into the world.

World structure

There are 60 locations stored in t$(r), a 60×160 character array. The map is geographically coherent — the city grid uses real Manhattan intersection names (34th St, 42nd St, 47th St; 4th through 8th Ave), supplemented by two subway lines, service tunnels, a large library closely modeled on the NYPL (complete with card catalogue, staff lounge, dumbwaiter shaft, and basement), a Zoo with a curator’s office, a high-rise office building, a fire escape, and a rooftop with a hot air balloon. The world is organized as connected above/below-ground layers linked by elevator and random subway transit events.

Map data

Room connections are stored in a 2D numeric array m(r,d) where d = 1–6 (N/S/E/W/U/D exits), m(r,7) is a light flag, m(r,8) a danger flag, and m(r,9) a readable-message flag. This is used at lines 2110–2230 to resolve movement and set f1/f2/f3. The game uses a “dark room” mechanic: if f1=0 AND the player isn’t carrying the flashlight (li=0), the player is bounced back to the previous room.

Objects

Ten objects are stored in o$(i) (10×26 chars): FLASHLIGHT (LIT), BRASS KEY, BRONZE KEY, STEEL KEY, SCREWDRIVER, COLT .45 AUTOMATIC, METAL BAR, MEDICAL SUPPLIES, GOLD KEY, and one empty slot. Object positions are tracked in o(i): 0 = not placed, room number = present in that room, 99 = in inventory. Inventory is capped at 4 items. The flashlight (o(1)) is the only object with an active secondary effect — carrying it sets li=1, enabling passage through dark rooms. Five keys each unlock a specific door by modifying an exit entry in the m() array at runtime (lines 7020–7070). The screwdriver pries open the library door. The gun and metal bar route to the fight handler, which is non-functional (see below).

Input parsing

The input loop (1000–1010) forces uppercase via CODE i$ range check (65–90) and splits the command string on the first space into verb a$ and noun b$. All verb matching uses the first 3 characters (a$( TO 3)). The engine handles GO, LOOK, QUIT, INVENTORY, BACK, READ, UNLOCK/OPEN, USE [object], EXAMINE, directional commands, GET/TAKE, DROP/PUT, and combat verbs.

Subway/elevator system

Movement into rooms coded as rn=99, rn=98, or rn=97 in the map array triggers the random transit handler at line 7800. The subway has a 50% chance of not moving the player; otherwise it transports between specific paired rooms. Lines 7840 and 7845–7850 contain debug PRINT statements that were not removed — they will display raw variable values and line labels to the player during transit events.

Combat

All combat verbs (KICK, KILL, HIT, STAB, SHOOT, FIGHT) route to line 6600–6610, which immediately jumps to line 1610, the “I don’t know how to” / snarky response handler. There is no implemented combat mechanic despite the danger flag system and m$(r) danger message array being in place.

Win condition

Picking up the MEDICAL SUPPLIES (object 8) and reaching the rooftop (room 60) triggers the endgame. h$(1) contains a philosophical Taoist inscription found on a sign at the roof. h$(2) is the victory message, displayed when f3=2 AND a$( TO 3)="REA" AND o(8)=99 — i.e., the player READs the sign on the roof while holding the medical supplies. The message congratulates the player and provides the author’s mailing address (419 N. Johnson, Ada, Ohio 45810) to request a new adventure.

Bugs and anomalies

  1. Line 1244 — NEXT inside IF. The reverse-scan loop FOR i= LEN c$ TO 1 STEP -1: IF c$(i)=" " THEN LET c=i: NEXT i uses NEXT i inside the IF body. In Spectrum BASIC this functions as a CONTINUE (skipping to the next iteration when the space is found), which is a valid idiom but rarely used.
  2. Object 10 is blank. The tenth entry in o$() is empty. The loop FOR i=1 TO 10 will attempt to print or match against it, producing a blank result with no effect.
  3. GOLD KEY (o(9)) has no unlock handler. Lines 7020–7070 handle the brass, bronze, steel, and screwdriver items. There is no corresponding handler for the gold key. It can be picked up but cannot be used.

Content

Appears On

Related Products

A post-apocalyptic text adventure set in a deserted Manhattan, where the player must navigate subway tunnels, city streets, a large...

Related Articles

Related Content

Image Gallery

City 2068

Source Code

    1 ON ERR GO TO 9990
   10 REM                              WELCOME, my curious and         clever friend. Every city       has its hidden corners and      here you are. To cut Load       times I've deleted the          arrays, but they are still      in the variabe file.                                            Feel free to make a back-       up, I'd do the same. But,       please respect the time         I've put in, and let me         make a few bucks to             support my hobby, without       "unauthorized" competition
   20 CLS : PRINT AT 10,0;"          CITY 2068 ";AT 20,6;"© 1985 C. W. ASSOCIATES"
   25 PRINT AT 21,0;"Review Copy: SyncWare News"
   30 INPUT "Press ENTER to continue ";d$
   40 CLS : PRINT "   As the heat of day slowly    warms you, you waken.  You dimlyremember swimming across the    river during the night.  You    took a desperate risk to reach  the city in hope of finding foodor medicine for the survival of"
   45 PRINT OVER 1;AT 5,28;"____";AT 6,3;"________"
   50 PRINT "the colony.  You recall a long, terrifying night of stumbling   along darkened streets, hearing odd noises."
   55 PRINT '"   You must learn to move about in this strange environment     where each action must be       described.  I will assist you   where I can.  Use words like GO,LOOK, etc.  Try many commands."
   57 PRINT OVER 1;AT 12,12;"_____"
   60 PRINT AT 19,0;"   I understand some abbreviatedwords and some multiple-word    commands."
  115 INPUT "Press ENTER to begin";d$
  120 CLS : BORDER 5: PRINT AT 8,0;t$(r)
 1000 REM  INPUT 
 1010 PRINT : POKE 23658,8: INPUT "What next? ";i$: IF i$="" THEN GO TO 1010
 1020 PRINT i$: LET j$=i$
 1030 IF CODE i$<65 OR CODE i$>90 THEN GO TO 1010
 1100 REM  Survival Index 
 1200 REM  INTERPRET INPUT 
 1210 FOR i=1 TO LEN i$-1: IF i$(i)=" " THEN LET c=i: GO TO 1230
 1220 NEXT i
 1230 LET a$=i$(1 TO (c-1)): LET b$=i$(c+1 TO ): IF c=LEN i$ OR c=LEN i$-1 THEN LET b$="": GO TO 1250
 1235 IF LEN a$<3 THEN LET a$=a$+"  "
 1240 IF i$(c+1)=" " THEN LET b$="   "
 1242 LET c$=b$
 1244 FOR i=LEN c$ TO 1 STEP -1: IF c$(i)=" " THEN LET c=i: NEXT i
 1246 LET c$=c$(1 TO i)
 1250 IF d=0 THEN GO TO 1280
 1255 REM  IF DANGER PRESENT 
 1260 IF d>0 AND a$( TO 3)="FIG" THEN GO TO 6600: REM attack then input 
 1270 IF d<0 AND a$( TO 3)="FIG" THEN PRINT m$(r): GO TO 1010
 1280 IF d=0 AND a$( TO 3)="FIG" THEN PRINT "Fight what?": GO TO 1010
 1282 IF a$( TO 3)="HEL" THEN PRINT "There's not much help for any ofus in this world.  You can help yourself by using your          imagination and paying careful  attention to my comments.  Try  combinations of commands.       Certain words only work at      specific times.": GO TO 1010
 1290 IF a$( TO 3)="LOO" THEN PRINT t$(r)
 1292 IF a$( TO 3)<>"LOO" THEN GO TO 1300
 1294 FOR i=1 TO 10: IF o(i)=r THEN PRINT "There is a ";o$(i): LET g=1
 1295 NEXT i
 1298 IF a$( TO 3)="LOO" THEN GO TO 1010
 1300 IF a$( TO 3)="QUI" THEN GO TO 9990
 1302 IF a$( TO 3)<>"INV" THEN GO TO 1310
 1303 PRINT "You are carrying:"
 1304 FOR i=1 TO 10
 1306 IF o(i)=99 THEN PRINT "   ";o$(i)
 1308 NEXT i: GO TO 1010
 1310 IF a$( TO 3)="BAC" THEN LET r=ro: PRINT t$(r): GO TO 1010
 1315 IF f3=2 AND a$( TO 3)="REA" AND o(8)=99 THEN PRINT h$(2): GO TO 1010
 1320 IF f3=1 AND a$( TO 3)="REA" THEN PRINT h$(1): GO TO 1010
 1323 IF a$( TO 3)="UNL" OR A$( TO 3)="OPE" THEN GO TO 1640
 1325 IF a$( TO 3)="USE" THEN GO TO 7000+(20 AND b$( TO 3)="BRA")+(30 AND b$( TO 3)="BRO")+(40 AND b$( TO 3)="STE")+(50 AND b$( TO 3)="SCR")
 1327 IF r=33 AND a$( TO 3)="EXA" OR r=60 AND a$( TO 3)="EXA" THEN PRINT "There seems to be something     written here.": GO TO 1010
 1330 IF a$( TO 3)="N  " OR a$( TO 3)="NOR" THEN GO TO 2000
 1340 IF a$( TO 3)="S  " OR a$( TO 3)="SOU" THEN GO TO 2000
 1350 IF a$( TO 3)="E  " OR a$( TO 3)="EAS" THEN GO TO 2000
 1360 IF a$( TO 3)="W  " OR a$( TO 3)="WES" THEN GO TO 2000
 1370 IF a$( TO 3)="U  " OR a$( TO 3)="UP " THEN GO TO 2000
 1380 IF a$( TO 3)="D  " OR a$( TO 3)="DOW" THEN GO TO 2000
 1400 REM  INTERPRET 2ND WORD 
 1410 IF a$( TO 2)="GO" AND a$(3)=" " THEN LET a$=b$: GO TO 1260
 1420 IF a$( TO 3)="GET" AND g=1 THEN GO TO 2500
 1430 IF a$( TO 3)="TAK" AND g=1 THEN GO TO 2500
 1440 IF a$( TO 3)="DRO" THEN GO TO 2800
 1450 IF a$( TO 3)="PUT" THEN GO TO 2800
 1460 IF a$( TO 3)="KIC" THEN GO TO 6600
 1465 IF a$( TO 3)="KIL" THEN GO TO 6600
 1470 IF a$( TO 3)="HIT" THEN GO TO 6600
 1480 IF a$( TO 3)="STA" THEN GO TO 6600
 1490 IF a$( TO 3)="SHO" THEN GO TO 6600
 1600 REM  NO LEGAL COMMANDS 
 1610 LET z1=RND
 1620 IF z1<.5 THEN PRINT "I don't know how to ";j$ : GO TO 1010
 1630 IF z1>=.5 THEN PRINT 
 1640 PRINT "  And how do you suggest that I ";j$: GO TO 1010 
 2100 REM  EXECUTE MOVEMENT 
 2110 LET rn=m(r,0+(1 AND a$(1)="N")+(2 AND a$(1)="S")+(3 AND a$(1)="E")+(4 AND a$(1)="W")+(5 AND a$(1)="U")+(6 AND a$(1)="D"))
 2120 IF rn=0 THEN PRINT "You can't go that way": GO TO 1010
 2130 IF rn>0 THEN LET ro=r: LET r=rn: LET g=0
 2200 REM  CHECK FLAGS 
 2210 LET f1=m(r,7): REM f1=light
 2220 LET f2=m(r,8): REM danger
 2230 LET f3=m(r,9): REM message
 2245 REM  EVALUATE FLAGS 
 2250 IF f1=0 AND li=0 THEN PRINT "It is too dark to really see    anything, so you step back ": PRINT : LET r=ro: PRINT t$(r): GO TO 2300
 2255 PRINT t$(r)
 2260 IF f2<>0 THEN PRINT "There is danger here!"'m$(r)
 2300 REM 
 2305 FOR i=1 TO 10
 2310 IF o(i)=0 THEN GO TO 2330
 2315 IF o(i)=99 THEN GO TO 2330
 2320 IF o(i)=r AND RND<.5 THEN PRINT : PRINT "Something is here! It's a"'"   "; o$(i): LET g=1: GO TO 2330
 2325 IF o(i)=r THEN PRINT : PRINT "You seem to have found a "'"  ";o$(i): LET g=1
 2330 NEXT i
 2340 PRINT 
 2350 GO TO 1010
 2500 REM  PROCESS GET/TAKE 
 2505 IF b$="   " THEN PRINT "What should I get?": GO TO 1010
 2510 LET k=0
 2515 FOR i=1 TO 10
 2520 IF o(i)=99 THEN LET k=k+1
 2522 IF k=4 THEN PRINT "You can't carry any more.  You  will have to put something else down if you want to carry the   ";c$: GO TO 1010
 2524 NEXT I
 2526 FOR i=1 TO 10
 2530 IF b$( TO 3)=o$(i, TO 3) AND o(i)=99 THEN PRINT "You already have the "'c$: GO TO 2600
 2535 IF b$( TO 3)=o$(i, TO 3) AND o(i)=r THEN LET o(i)=99: PRINT "O.K.": GO TO 2600
 2540 NEXT i
 2590 PRINT "There is no ";c$'"here.  Maybe you meant somethingelse."
 2600 IF o(1)=99 THEN LET li=1
 2700 GO TO 1010
 2800 REM  PROCESS DROP/PUT 
 2810 FOR i=1 TO 10
 2820 IF b$( TO 3)=o$(i, TO 3) AND o(i)=99 THEN LET o(i)=r: PRINT "Dropped!": LET li=0+(1 AND o(1)=99): GO TO 1010
 2830 NEXT i
 2840 PRINT "You can't drop it, if you don't"'"have it": GO TO 1010
 6600 REM  FIGHT ROUTINE 
 6610 GO TO 1610
 7000 REM                                UNLOCK ROOM
 7020 IF o(2)=99 AND r=15 AND b$( TO 3)="BRA" THEN LET m(15,3)=16: LET m(16,4)=15: PRINT "Unlocked!": GO TO 1010: REM Brasskey-Storeroom                           
 7030 IF o(3)=99 AND r=2 AND b$( TO 3)="BRO" THEN LET m(2,4)=6: PRINT "You brush dust and grime away   from the lock and, with much    difficulty, manage to open it.": GO TO 1010: REM Bronzekey-Stairway                         
 7040 IF o(4)=99 AND r=20 AND b$( TO 3)="STE" THEN LET m(20,1)=21: PRINT "To the sound of straining motorsthe elevator door slowly opens.": GO TO 1010: REM Steelkey-Elevator                      
 7050 IF o(5)=99 AND r=29 AND b$( TO 3)="SCR" THEN LET m(29,2)=32: PRINT "You struggle for a minute and   finally manage to pry open the  door": GO TO 1010: REM Screwdriver-Library              
 7060 IF o(2)=99 AND r=43 AND b$( TO 3)="BRA" THEN LET m(43,4)=44: PRINT "Unlocked!": GO TO 1010: REM Brasskey-elevator                          
 7070 IF o(7)=99 AND r=44 AND b$( TO 3)="MET" THEN LET m(44,2)=55: PRINT "You resist the temptation to    smash the window and eventually pry it open.": GO TO 1010
 7700 PRINT "Objects are funny.  First, you  need to have them, and then     you've got  to use them just    right.": GO TO 1010
 7800 REM  SUBWAY OR ELEVATOR 
 7820 IF rn<99 THEN GO TO 7860
 7830 IF RND<.5 THEN LET rn=0: GO TO 2120
 7840 LET rn=5: PRINT t$(5);"L.7840  rn;ro;r";rn;ro;r
 7845 IF r=4 THEN LET a$="E": PRINT "7845": GO TO 2100
 7850 IF r=17 THEN LET a$="W": PRINT "7850": GO TO 2100
 7855 GO TO 2120
 7860 IF rn<98 THEN GO TO 7900
 7870 IF RND<.5 THEN LET rn=0: GO TO 2120
 7880 LET rn=9: PRINT t$(9)
 7885 IF r=10 THEN LET a$="E": GO TO 2100
 7890 IF r=8 THEN LET a$="W": GO TO 2100
 7895 GO TO 2120
 7900 IF RND<.5 THEN LET rn=0: GO TO 2120
 7910 LET rn=21: PRINT t$(21)
 7915 IF r=20 THEN LET a$="U": GO TO 2100
 7920 IF r=43 THEN LET a$="D": GO TO 2100
 7930 GO TO 2120
 9000 SAVE "CITY 2068" LINE 1
 9010 STOP 
 9990 OUT 255,64

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

People

No people associated with this content.

Scroll to Top