Jump to content
IGNORED

If anyone out there is bored...


Omega-TI
 Share

Recommended Posts

This old TRS-80 game while very simple is addicting as heck, so if anyone wanted to convert it into TI format and maybe even add some fancy screen display routines, I'm sure it'll get a lot of play. It could even be used as 'starter code' for a more advanced version. Anyway even in just BASIC or Extended BASIC, it'll be fun and could give a newbie coder some enjoyment.

 

 

 

30 REM * * * * * * * * * * * * * * * * * * * * * * * * * * *
40 REM * WHAT THE INSTRUCTIONS DON'T TELL YOU (ON PURPOSE) *
50 REM * IS THAT: *
60 REM * 1. YOU BUY OR SELL LAND AT ITS CURRENT *
70 REM * VALUE AS LISTED. *
80 REM * 2. EACH PERSON NEEDS 20 BUSHELS FOR FOOD.*
90 REM * 3. EACH PERSON CAN PLANT A MAXIMUM OF *
100 REM * 10 ACRES. *
110 REM * 4. EACH ACRE COSTS .5 BUSHELS TO PLANT. *
120 REM * THESE ARE THINGS YOU SHOULD DISCOVER FOR YOURSELF *
130 REM * AS YOU PLAY HAMURABI. NOW AREN'T YOU ASHAMED FOR *
140 REM * READING THIS?!? *
150 REM * * * * * * * * * * * * * * * * * * * * * * * * * * *
160 REM MODIFIED BY JOHN OLSEN, BOX 181, NEWBERG, OR. 97132
170 REM FOR CONVERSION TO LEVEL II, JUST ADD - 290 RANDOM
180 REM THIS PROGRAM CONSUMES 3340 BYTES
290 RANDOM
300 CLS:PRINT:PRINT:PRINT"HAMURABI -"
310 PRINT"WHERE YOU GOVERN THE ANCIENT KINGDOM OF SUMERIA."
320 PRINT"THE OBJECT IS TO KEEP THE KINGDOM GROWING."
330 PRINT:PRINT"(IF YOU WANT TO QUIT, SELL ALL YOUR LAND)"
340 PRINT:PRINT:PRINT:INPUT"PRESS ENTER TO BEGIN YOUR REIGN";A$
400 A=100:B=5:C=0:D=2800:E=200:F=3:G=3000:H=1000:J=1:L=1
1010 CLS:P=0:PRINT"HAMURABI, I BEG TO REPORT THAT IN YEAR";L;":"
1020 IFC=1THEN1035
1030 PRINTC;"PEOPLE STARVED, AND";:GOTO1040
1035 PRINT" 1 PERSON STARVED, AND";
1040 IFB=1THEN1048
1045 PRINTB;"PEOPLE CAME TO THE CITY.":GOTO1050
1048 PRINT" 1 PERSON CAME TO THE CITY."
1050 IFJ>0THEN1100
1060 A=A-INT(A/2):PRINT" THE PLAGUE KILLED HALF THE PEOPLE."
1100 PRINT" THE POPULATION IS NOW";A;"."
1120 PRINT" WE HARVESTED";G;"BUSHELS AT";F;"BUSHELS PER ACRE."
1130 PRINT" RATS DESTROYED";E;"BUSHELS, LEAVING";D;"BUSHELS IN STORAGE."
1150 PRINT" THE CITY OWNS";H;"ACRES OF LAND."
1170 K=16+RND(6):PRINT" LAND IS WORTH";K;"BUSHELS PER ACRE."
1200 PRINT@518,"HAMURABI . . ."
1300 PRINT@576,"";:Q=576
1310 INPUT" BUY HOW MANY ACRES";I:I=INT(ABS(I)):IFI=0THEN1500
1360 J=I*K:IFJ<=DTHEN1400
1380 GOSUB9000:GOTO1310
1400 D=D-J:H=H+I
1500 PRINT@576," * YOU ARE BUYING";I;"ACRES. "
1505 IFI>0THEN1650
1510 PRINT@640," "
1520 PRINT@704," "
1530 Q=640:PRINT@Q,"";
1540 INPUT" SELL HOW MANY ACRES";I:I=INT(ABS(I)):IFI=0THEN1570
1550 IFI<HTHEN1570
1560 IFI=HTHEN9999
1565 GOSUB9000:GOTO1540
1570 P=1:PRINT@640," * YOU ARE SELLING";I;"ACRES. "
1580 GOTO1600
1600 H=H-I:D=D+K*I
1650 Q=P*64+640
1670 PRINT@Q," "
1680 PRINT@Q+64," "
1690 PRINT@Q,"";
1700 INPUT" HOW MANY BUSHELS SHALL WE DISTRIBUTE AS FOOD";I
1710 I=INT(ABS(I))
1740 IFI<=DTHEN1770
1750 GOSUB9000:GOTO1700
1770 D=D-I:C=A-INT(I/20):B=O:IFC>=0THEN1850
1810 B=-C/2:C=0
1850 Q=P*64+704
1860 PRINT@Q-64," * YOU ARE DISTRIBUTING";I;"BUSHELS. "
1870 PRINT@Q," "
1880 PRINT@Q+64," ";
1890 PRINT@Q,"";
1900 INPUT" HOW MANY ACRES SHALL WE PLANT";I:I=INT(ABS(I))
1910 IFI>HTHEN1960
1940 J=INT(I/2):IFJ<=DTHEN1980
1960 GOSUB9000:GOTO1900
1980 IFI>10*ATHEN1960
1985 CLS
1990 D=D-J:F=RND(5):G=F*I:E=INT((D+G)*.07*RND(0)) :D=D-E+G:J=RND(11)-1
2060 B=INT(B+(5-F)*D/600+1):IFB<=50THEN2100
2080 B=50
2100 A=A+B-C:L=L+1:GOTO1010
9000 PRINT@Q+128," ";
9001 PRINT" ";
9010 PRINT@Q,"";
9020 PRINT"--> HAMURABI! THINK AGAIN -- YOU ONLY HAVE "
9030 PRINT"--> ";A;"PEOPLE,";H;"ACRES, AND";D;"BUSHELS IN STOREHOUSES."
9040 RETURN
9999 CLS:PRINT:PRINT:PRINT:PRINT:PRINT"YOU HAVE SOLD ALL YOUR LAND."
10000 PRINT:PRINT"THE GAME IS OVER, AND YOU CAN GO BACK TO BEING YOURSELF."
10001 PRINT:PRINT"BYE":FORT=1TO9999:NEXTT:CLS:END

 

 

 

Who knows, if the finished product is good enough, someone here might even convert it into an FR99/FG99 .BIN. :) :thumbsup:

Link to comment
Share on other sites

I'm pretty sure Hamurabi goes back to early university mainframe days, I actually converted this from a big book of basic games back in the early 80's but I have no idea where any of my TI tapes are or if they even survived post moving out of my mom's house. She was kind of ruthless with the stuff we left. In retrospect it was weird behavior for someone who claims to be a genealogist. :-)

Link to comment
Share on other sites

There is a version of this available as a door game for Heatwave. Unfortunately it isn't being used as I recall it was quite buggy and would crash the BBS.

I recall a few versions of the program out there long ago, for XB and/or BASIC. Certainly not a new game. IIRC, the heatwave door game was converted for BBS use by another SysOp. The program was pretty ugly and prone to crashing; I didn't deem it worth my time to try to fix it ;)

Link to comment
Share on other sites

I borrowed that book from the library, and we (Morten or Bjarke) typed in Hammurabi on a PDP-something. It had no display, just typewriter, and used papertape for storage. Luckily that was all we did as we got ABC-80 and Sinclair (Timex) computers. Apart from TI-59 and Atari VCS.

 

gallery_11132_2023_3365.jpg

 

 

Looks exactly like the paper tape terminal I used in the Army in my RATT rig.

  • Like 1
Link to comment
Share on other sites

And I was the guy who had to fix those teletypes when one of the users used creative modification techniques on them. (Like the fist print I found in the center of the keys on a Model 28 keyboard--the fist smashed all of the keys in that area down because the user was mad at his girlfriend and decided destroying something would be fun stress relief. He was not amused when he got the bill for the replacement parts.)

  • Like 2
Link to comment
Share on other sites

This old TRS-80 game while very simple is addicting as heck, so if anyone wanted to convert it into TI format and maybe even add some fancy screen display routines, I'm sure it'll get a lot of play. It could even be used as 'starter code' for a more advanced version. Anyway even in just BASIC or Extended BASIC, it'll be fun and could give a newbie coder some enjoyment.

 

 

 

30 REM * * * * * * * * * * * * * * * * * * * * * * * * * * *

40 REM * WHAT THE INSTRUCTIONS DON'T TELL YOU (ON PURPOSE) *

50 REM * IS THAT: *

60 REM * 1. YOU BUY OR SELL LAND AT ITS CURRENT *

70 REM * VALUE AS LISTED. *

80 REM * 2. EACH PERSON NEEDS 20 BUSHELS FOR FOOD.*

90 REM * 3. EACH PERSON CAN PLANT A MAXIMUM OF *

100 REM * 10 ACRES. *

110 REM * 4. EACH ACRE COSTS .5 BUSHELS TO PLANT. *

120 REM * THESE ARE THINGS YOU SHOULD DISCOVER FOR YOURSELF *

130 REM * AS YOU PLAY HAMURABI. NOW AREN'T YOU ASHAMED FOR *

140 REM * READING THIS?!? *

150 REM * * * * * * * * * * * * * * * * * * * * * * * * * * *

160 REM MODIFIED BY JOHN OLSEN, BOX 181, NEWBERG, OR. 97132

170 REM FOR CONVERSION TO LEVEL II, JUST ADD - 290 RANDOM

180 REM THIS PROGRAM CONSUMES 3340 BYTES

290 RANDOM

300 CLS:PRINT:PRINT:PRINT"HAMURABI -"

310 PRINT"WHERE YOU GOVERN THE ANCIENT KINGDOM OF SUMERIA."

320 PRINT"THE OBJECT IS TO KEEP THE KINGDOM GROWING."

330 PRINT:PRINT"(IF YOU WANT TO QUIT, SELL ALL YOUR LAND)"

340 PRINT:PRINT:PRINT:INPUT"PRESS ENTER TO BEGIN YOUR REIGN";A$

400 A=100:B=5:C=0:D=2800:E=200:F=3:G=3000:H=1000:J=1:L=1

1010 CLS:P=0:PRINT"HAMURABI, I BEG TO REPORT THAT IN YEAR";L;":"

1020 IFC=1THEN1035

1030 PRINTC;"PEOPLE STARVED, AND";:GOTO1040

1035 PRINT" 1 PERSON STARVED, AND";

1040 IFB=1THEN1048

1045 PRINTB;"PEOPLE CAME TO THE CITY.":GOTO1050

1048 PRINT" 1 PERSON CAME TO THE CITY."

1050 IFJ>0THEN1100

1060 A=A-INT(A/2):PRINT" THE PLAGUE KILLED HALF THE PEOPLE."

1100 PRINT" THE POPULATION IS NOW";A;"."

1120 PRINT" WE HARVESTED";G;"BUSHELS AT";F;"BUSHELS PER ACRE."

1130 PRINT" RATS DESTROYED";E;"BUSHELS, LEAVING";D;"BUSHELS IN STORAGE."

1150 PRINT" THE CITY OWNS";H;"ACRES OF LAND."

1170 K=16+RND(6):PRINT" LAND IS WORTH";K;"BUSHELS PER ACRE."

1200 PRINT@518,"HAMURABI . . ."

1300 PRINT@576,"";:Q=576

1310 INPUT" BUY HOW MANY ACRES";I:I=INT(ABS(I)):IFI=0THEN1500

1360 J=I*K:IFJ<=DTHEN1400

1380 GOSUB9000:GOTO1310

1400 D=D-J:H=H+I

1500 PRINT@576," * YOU ARE BUYING";I;"ACRES. "

1505 IFI>0THEN1650

1510 PRINT@640," "

1520 PRINT@704," "

1530 Q=640:PRINT@Q,"";

1540 INPUT" SELL HOW MANY ACRES";I:I=INT(ABS(I)):IFI=0THEN1570

1550 IFI<HTHEN1570

1560 IFI=HTHEN9999

1565 GOSUB9000:GOTO1540

1570 P=1:PRINT@640," * YOU ARE SELLING";I;"ACRES. "

1580 GOTO1600

1600 H=H-I:D=D+K*I

1650 Q=P*64+640

1670 PRINT@Q," "

1680 PRINT@Q+64," "

1690 PRINT@Q,"";

1700 INPUT" HOW MANY BUSHELS SHALL WE DISTRIBUTE AS FOOD";I

1710 I=INT(ABS(I))

1740 IFI<=DTHEN1770

1750 GOSUB9000:GOTO1700

1770 D=D-I:C=A-INT(I/20):B=O:IFC>=0THEN1850

1810 B=-C/2:C=0

1850 Q=P*64+704

1860 PRINT@Q-64," * YOU ARE DISTRIBUTING";I;"BUSHELS. "

1870 PRINT@Q," "

1880 PRINT@Q+64," ";

1890 PRINT@Q,"";

1900 INPUT" HOW MANY ACRES SHALL WE PLANT";I:I=INT(ABS(I))

1910 IFI>HTHEN1960

1940 J=INT(I/2):IFJ<=DTHEN1980

1960 GOSUB9000:GOTO1900

1980 IFI>10*ATHEN1960

1985 CLS

1990 D=D-J:F=RND(5):G=F*I:E=INT((D+G)*.07*RND(0)) :D=D-E+G:J=RND(11)-1

2060 B=INT(B+(5-F)*D/600+1):IFB<=50THEN2100

2080 B=50

2100 A=A+B-C:L=L+1:GOTO1010

9000 PRINT@Q+128," ";

9001 PRINT" ";

9010 PRINT@Q,"";

9020 PRINT"--> HAMURABI! THINK AGAIN -- YOU ONLY HAVE "

9030 PRINT"--> ";A;"PEOPLE,";H;"ACRES, AND";D;"BUSHELS IN STOREHOUSES."

9040 RETURN

9999 CLS:PRINT:PRINT:PRINT:PRINT:PRINT"YOU HAVE SOLD ALL YOUR LAND."

10000 PRINT:PRINT"THE GAME IS OVER, AND YOU CAN GO BACK TO BEING YOURSELF."

10001 PRINT:PRINT"BYE":FORT=1TO9999:NEXTT:CLS:END

 

 

 

Who knows, if the finished product is good enough, someone here might even convert it into an FR99/FG99 .BIN. :) :thumbsup:

 

 

There was actually a good TI BASIC rendition of this on one in the IUG library....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...