Omega-TI Posted October 1, 2017 Share Posted October 1, 2017 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. 97132170 REM FOR CONVERSION TO LEVEL II, JUST ADD - 290 RANDOM180 REM THIS PROGRAM CONSUMES 3340 BYTES290 RANDOM300 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=11010 CLS:P=0:PRINT"HAMURABI, I BEG TO REPORT THAT IN YEAR";L;":"1020 IFC=1THEN10351030 PRINTC;"PEOPLE STARVED, AND";:GOTO10401035 PRINT" 1 PERSON STARVED, AND";1040 IFB=1THEN10481045 PRINTB;"PEOPLE CAME TO THE CITY.":GOTO10501048 PRINT" 1 PERSON CAME TO THE CITY."1050 IFJ>0THEN11001060 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=5761310 INPUT" BUY HOW MANY ACRES";I:I=INT(ABS(I)):IFI=0THEN15001360 J=I*K:IFJ<=DTHEN14001380 GOSUB9000:GOTO13101400 D=D-J:H=H+I1500 PRINT@576," * YOU ARE BUYING";I;"ACRES. "1505 IFI>0THEN16501510 PRINT@640," "1520 PRINT@704," "1530 Q=640:PRINT@Q,"";1540 INPUT" SELL HOW MANY ACRES";I:I=INT(ABS(I)):IFI=0THEN15701550 IFI<HTHEN15701560 IFI=HTHEN99991565 GOSUB9000:GOTO15401570 P=1:PRINT@640," * YOU ARE SELLING";I;"ACRES. "1580 GOTO16001600 H=H-I:D=D+K*I1650 Q=P*64+6401670 PRINT@Q," "1680 PRINT@Q+64," "1690 PRINT@Q,"";1700 INPUT" HOW MANY BUSHELS SHALL WE DISTRIBUTE AS FOOD";I1710 I=INT(ABS(I))1740 IFI<=DTHEN17701750 GOSUB9000:GOTO17001770 D=D-I:C=A-INT(I/20):B=O:IFC>=0THEN18501810 B=-C/2:C=01850 Q=P*64+7041860 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>HTHEN19601940 J=INT(I/2):IFJ<=DTHEN19801960 GOSUB9000:GOTO19001980 IFI>10*ATHEN19601985 CLS1990 D=D-J:F=RND(5):G=F*I:E=INT((D+G)*.07*RND(0)) =D-E+G:J=RND(11)-12060 B=INT(B+(5-F)*D/600+1):IFB<=50THEN21002080 B=502100 A=A+B-C:L=L+1:GOTO10109000 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 RETURN9999 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. Quote Link to comment Share on other sites More sharing options...
LASooner Posted October 1, 2017 Share Posted October 1, 2017 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. :-) Quote Link to comment Share on other sites More sharing options...
JamesD Posted October 1, 2017 Share Posted October 1, 2017 The most popular derivative of this game is probably Santa Paravia and Fiumaccio Quote Link to comment Share on other sites More sharing options...
Mad Hatter Posted October 1, 2017 Share Posted October 1, 2017 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. Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted October 1, 2017 Share Posted October 1, 2017 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 Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted October 2, 2017 Share Posted October 2, 2017 An excellent version was released by TI 4 Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted October 2, 2017 Author Share Posted October 2, 2017 Ooooooh! Nice... Listing? Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted October 2, 2017 Share Posted October 2, 2017 (edited) Ooooooh! Nice... Listing? The program was in the book BASIC Computer Games from 1978. Edited October 2, 2017 by sometimes99er 2 Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted October 2, 2017 Author Share Posted October 2, 2017 hammurabi.txt The program was in the book BASIC Computer Games from 1978. Many thanks! I saved it. Since I have day off tomorrow, I'm going to enjoy and play it! Quote Link to comment Share on other sites More sharing options...
JamesD Posted October 3, 2017 Share Posted October 3, 2017 Hammurabi was also one of the early programs Apple sold for the Apple II along with Star Trek. Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted October 8, 2017 Share Posted October 8, 2017 Many thanks! I saved it. Since I have day off tomorrow, I'm going to enjoy and play it! You're welcome. So, did you enjoy it? 1 Quote Link to comment Share on other sites More sharing options...
LASooner Posted October 10, 2017 Share Posted October 10, 2017 hammurabi.txt The program was in the book BASIC Computer Games from 1978. That is the book I used 1 Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted October 10, 2017 Share Posted October 10, 2017 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. 4 Quote Link to comment Share on other sites More sharing options...
+Schmitzi Posted October 10, 2017 Share Posted October 10, 2017 Sounds a little bit like LA-36-Terminal on a PDP-11/34 1 Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted October 10, 2017 Share Posted October 10, 2017 ASCII tapes are fun. . . Quote Link to comment Share on other sites More sharing options...
LASooner Posted October 11, 2017 Share Posted October 11, 2017 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. Looks exactly like the paper tape terminal I used in the Army in my RATT rig. 1 Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted October 12, 2017 Share Posted October 12, 2017 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.) 2 Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted October 12, 2017 Share Posted October 12, 2017 I managed to lose my rifle when I was in the army. I had to pay $855 to cover the loss. I'm starting to understand why a Navy captain always goes down with his ship. 2 Quote Link to comment Share on other sites More sharing options...
RickyDean Posted October 12, 2017 Share Posted October 12, 2017 I managed to lose my rifle when I was in the army. I had to pay $855 to cover the loss. I'm starting to understand why a Navy captain always goes down with his ship. So you were 'that guy' 1 Quote Link to comment Share on other sites More sharing options...
+acadiel Posted October 12, 2017 Share Posted October 12, 2017 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-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. There was actually a good TI BASIC rendition of this on one in the IUG library.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.