Publisher: Amstrad Computer User – Numero: 02 – Ottobre/Novembre 1984 – Recupero codice: Francesco Fiorentini
Dopo alcuni listati dedicati al BBC Micro, torna a far parlare di se’ nella nostra rubrica dedicata ai listati recuperati dalle riviste degli anni ’80, l’Amstrad CPC.
Come gia’ accennato nei precedenti articoli dedicati a questo computer, il Basic con cui e’ equipaggiato e’ estremamente evoluto e versatile. In questo listato comunque non si vedeono molto queste caratteristiche, essendo il programma piuttosto semplice.
Il gioco che andiamo a proporvi e’ Kingdoms di Mark R Harrison, un gioco derivato da uno dei classici del Basic per eccellenza: Hammurabi. Hammurabi è considerato il capostipite dei giochi manageriali, e la sua eredità è stata raccolta da molti home computer dell’epoca. Il caso di Kingdom per Amstrad CPC è probabilmente un esempio emblematico.
Un ponte tra epoche: Questo adattamento dimostra come la semplice logica matematico-testuale di Hammurabi fosse facilmente adattabile ai limiti (e alle prime interfacce) dei computer domestici di inizio anni ’80.
Origini e diffusione: Tradotto dal BASIC di David Ahl, Kingdoms ricalcava fedelmente le meccaniche di Hammurabi, ma le arricchiva con alcuni colpi di scena per renderlo più accessibile.
Gameplay classico: Anche in Kingdoms devi gestire un popolo per alcuni anni: dai da mangiare ai cittadini e semini raccolti, affrontando attentati e raccolti variabili. Il pericolo di essere deposto per fame cronica rende ogni scelta critica.

Titolo: Kingdoms
Piattaforma: Amstrad CPC
Linguaggio: Locomotive Basic
Versione originale: Mark R Harrison
Pubblicazione: Amstrad Computer User – 01 Agosto/Settembre 1984
Recupero codice: Francesco Fiorentini
Anno: 2023
Download: Bustout.dsk
Note: Emulatore suggerito, WinAPE.

Scopo del gioco
Lo scopo del gioco é veramente semplice, devi dar da mangiare ai cittadini e seminare raccolti, affrontando attentati e raccolti variabili


Qui di seguito trovate il codice da copiare sul vostro Amstrad CPC.
Potete copiare il listato ed incollarlo su un emulatore come WinAPE.
Attenzione – Ci siamo resi conto che nel listato i caratteri ‘>’ e ‘<‘ potrebbero venir sostituiti dai rispettivi encoding html ‘>’ e ‘<’. Nel caso, sostituite questi valori nel listato prima di copiarlo sull’emulatore.
Listato: Bustout – Amstrad CPC – Locomotive Basic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150 10 REM ************************
20 REM * KINGDOMS 26:AUG:84 *
30 REM ************************
40 REM * MARK R HARRISON *
50 REM ************************
60 REM
70 ON BREAK GOSUB 1490
80 ON ERROR GOTO 1500
90 GOSUB 320
100 GOSUB 1190
110 IF k$="y" THEN GOSUB 480
120 INK 0,1:INK 1,24:INK 2,22:INK 3,3
130 PAPER 0:PRINT 1:BORDER 1:MODE 1
140 FOR y=1984 TO 1993+INT(RND*3)
150 cc=c:af=0
160 GOSUB 650
170 GOSUB 740
180 GOSUB 1190
190 LOCATE 1,12:PRINT SPACE$(240);SPACE$(240):LOCATE 1,12
200 IF k$="n" THEN c=cc:GOTO 160
210 GOSUB 970
220 IF b=0 THEN 290
230 IF a=0 THEN 280
240 GOSUB 650
250 e=4:GOSUB 1190
260 IF RND<0.75 THEN e=5:GOSUB 1190:GOTO 280
270 e=6:GOSUB 1190:GOTO 300
280 NEXT y
290 GOSUB 650
300 GOSUB 1350:'end
310 GOTO 90
320 REM initialisation
330 CLS
340 INK 0,1:INK 1,24:INK 2,22:INK 3,3
350 PAPER 0:PEN 1:BORDER 1:MODE 1
360 c$=CHR$(164)+" Mark R Harrison AMSOFT Version 1.1"
370 ck$="KINGDOMS"
380 v$="Version 1.1"
390 a=INT(500+RND*500) : 'acres of land
400 b=INT(2500+RND*2500) : 'population
410 c=INT(75000+RND*25000) : 'sacks of corn
420 e=0
430 RANDOMIZE TIME
440 LOCATE 1,1:PRINT ck$:PRINT
450 PRINT c$
460 PRINT :PRINT "Do you want instructions Y/N"
470 RETURN
480 REM instructions
490 INK 0,13:INK 1,0
500 PAPER 0:BORDER 13:PEN 1
510 MODE 2
520 PRINT ck$;TAB(25);C$ :PRINT
530 PRINT "You are in control of the simple economy of a small empire. Each year, every member of your community requires six sacks of corn to provide enough food to survive and is capable of planting three sacks of corn. Exactly ten sacks of"
540 PRINT "corn are required to plant corn on one acre of land. Using less than 60% of the available land causes some land to become barren, similar to using more than 60% of the land increases the available arable land."
550 PRINT
560 PRINT "At the start of each year you must decide how many sacks of corn you will allocate to planting and the land and the amount of the population of you empire. The amount of corn that is produced from the fields is dependent on the quantity"
570 PRINT "of corn planted and the quality of the harvest. Every member of the population who cannot receive six sacks of corn in excess will die through starvation while every six sacks of corn will enable one new person to be born; however, the"
580 PRINT "population cannot increase by more than three fold. If more than 30% of the empire population dies then beware of an assassination attempt!"
600 PRINT
600 PRINT "Press any key to continue in response to any user messages at the base of the screen. At the end of your period of control, a score will be awarded dependent on the quality of your leadership. A record of the best score is kept."
610 PRINT
620 PRINT TAB(15);"PRESS ANY KEY TO COMMENCE - good luck!!"
630 IF INKEY$="" THEN 630
640 RETURN
650 REM display screen
660 LOCATE 13,1:PRINT ck$
670 LOCATE 13,3:PRINT "Year";y
680 PAPER 2:PEN 3
690 LOCATE 6,6:PRINT USING "&###,##,##,##";"Population ";b
700 LOCATE 6,7:PRINT USING "&###,##,##,##";"Sacks of corn";c
710 LOCATE 6,8:PRINT USING "&###,##,##,##";"Acres of land";a
720 PAPER 0:PEN 1 : rem avevo messo paper 2 pen 3
730 RETURN
740 REM data entry
750 LOCATE 1,10:PRINT "Enter number of sacks of corn to:"
760 LOCATE 1,12:PRINT SPACE$(120):LOCATE 1,12
770 INPUT "Plant";cp:cp=INT(cp)
780 IF cp>c THEN e=1:PRINT CHR$(7):GOSUB 1190:GOTO 760
790 IF 10*a<cp THEN e=2:PRINT CHR$(7):GOSUB 1190:GOTO 760
800 IF cp<0 THEN e=3:PRINT CHR$(7):GOSUB 1190:GOTO 760
810 IF cp>3*b THEN e=7:PRINT CHR$(7):GOSUB 1190:GOTO 760
820 c=c-cp
830 PAPER 2:PEN 3
840 LOCATE 6,7:PRINT USING "&###,##,##,##";"Sacks of corn";c
850 PAPER 0:PEN 1
860 LOCATE 1,12:PRINT SPACE$(120):LOCATE 1,12
870 INPUT "Eat ";cq:cq=INT(cq)
880 IF cq>c THEN e=1:PRINT CHR$(7):GOSUB 1190:GOTO 860
890 IF cq<0 THEN e=3:PRINT CHR$(7):GOSUB 1190:GOTO 860
900 c=c-cq
910 PAPER 2:PEN 3
920 LOCATE 6,7:PRINT USING "&###,##,##,##";"Sacks of corn";c
930 PAPER 0:PEN 1
940 LOCATE 1,12:PRINT SPACE$(120):LOCATE 1,12
950 PRINT "Plant";cp:PRINT "Eat ";cq:PRINT TAB(15);"Correct Y/N"
960 RETURN
970 REM calculate new values
980 aa=cp/10:bb=cq/6
990 IF bb>2*b THEN bb=3*b
1000 ap=aa*100/a: a=INT(a+(ap-60))
1010 IF bb/b<0.7 THEN af=1
1020 b=INT(bb)
1030 hv=RND
1040 c=c+INT(4*cp*(hv+0.5))
1050 LOCATE 1,12:PRINT SPACE$(120):LOCATE 1,12
1060 PAPER 2:PEN 0
1070 e=INT(hv*5+1)
1080 IF e=1 THEN e$="Very poor harvest"
1090 IF e=2 THEN e$="Poor harvest"
1100 IF e=3 THEN e$="Average harvest"
1110 IF e=4 THEN e$="Good harvest"
1120 IF e=5 THEN e$="Excellent harvest"
1130 e=0
1140 LOCATE 10,15:PRINT e$
1150 FOR tt=0 TO 2500:NEXT tt
1160 PAPER 0:PEN 1
1170 LOCATE 1,15:PRINT SPACE$(40)
1180 RETURN
1190 REM user messages
1200 IF e=0 THEN 1310
1210 IF e=1 THEN e$="Insufficient supply of corn"
1220 IF e=2 THEN e$="Insufficient fertile land"
1230 IF e=3 THEN e$="Positive values only"
1240 IF e=7 THEN e$="Insufficient labour force"
1250 IF e=4 THEN e$="BEWARE !!! assassination attempt"
1260 IF e=5 THEN e$="You were lucky - take more care"
1270 IF e=6 THEN e$="You have been shot - dead !!"
1280 PAPER 3
1290 LOCATE 1,24:PRINT e$
1300 e=0
1310 k$=INKEY$:IF k$="" THEN 1310 ELSE k$=LOWER$(k$)
1320 PAPER 0
1330 LOCATE 1,24:PRINT SPACE$(40)
1340 RETURN
1350 LOCATE 1,10:PRINT SPACE$(200)
1360 k$=""
1370 LOCATE 1,10
1380 s=INT(b*c*a/1E+09)
1390 IF af=1 THEN s=0
1400 PRINT "Your region has come to an end":PRINT
1410 PRINT "You have been awarded";s;"points":PRINT
1420 IF s>h THEN h=s
1430 PRINT "The best score obtained today is";h:PRINT
1440 PRINT "Do you wish to play again Y/N ?":PRINT
1450 k$=INKEY$:IF k$="" THEN 1450 ELSE k$=LOWER$(k$)
1460 IF k$="n" THEN CLS:NEW
1470 IF k$<>"y" THEN 1450
1480 RETURN
1490 STOP :'break
1500 GOTO 70
