Random game
Random game
Random game
Short description
			
Abyss is a trading strategy game, created for the "NOMAM Basic Ten-Liners 2014" competition. The entire code, written in the Turbo Basic XL language, is 10 lines long. The end of the universe is coming. Of course, as a space trader, you are concerned solely with earning as much money as possible before the Armageddon arrives on day 1000. You can fly your ship around the galaxy, with 10 colonized planets, plenty of uninhabited planets, and black holes which keep appearing. You begin the game with 150$ and with your cargo hold empty, except for fuel. Money can be earned by buying and selling various wares on the planets (but you can only sell wares to planets where there is demand), as well as by completing missions - get to a specified planet before a specified day to receive a cash reward. One of the wares - ore - can be also acquired by landing on uninhabited planets. The ship's cargo hold has a limited capacity, but can be expanded for a hefty price. Flying around space consumes fuel; being low on fuel prevents you from mining ore, and running out of fuel causes a game over. Black holes are also dangerous, as they destroy parts of the cargo hold, and escaping them consumes a lot of fuel. Link to description source
Abyss Abyss Abyss Abyss Abyss Abyss
Listing 1
0 DIM M$(800),​N$(11),​P(10,​10),​E(10),​F(10),​B(10):​GRAPHICS 0:​COLOR 149:​TEXT 0,​6,​"ABYSS":​POKE 755,​0:​L=150:​E(0)=10:​E(9)=10:​AM=ADR(M$):​SM=DPEEK(88):​G=SM+420
1 FOR I=0 TO 9:​POKE AM+(I*240+RAND(39)+400) MOD 800,​33+I:​POKE AM+RAND(39)+I*80+40,​84:​FOR J=0 TO 9:​P(I,​J)=RAND(200)-100:​NEXT J:​NEXT I:​POSITION 7,​15:​? "v1.3 by Jakub Debski '2014":​WHILE STRIG(0):​WEND
2 MOVE AM,​SM,​800:​R=PEEK(G):​POKE G,​94:​POKE 710,​32*(E(0)<5)+128*(R=80):​E(0)=E(0)-(R=80):​IF (R=84)&(E(0)>4):​POKE AM+G-SM,​111:​E(3)=E(3)+E(9):​E(9)=0:​T=0:​ENDIF
3 IF T:​D=D+1:​IF NOT D MOD 5:​E(0)=E(0)-1:​E(9)=E(9)+1:​R=RAND(800):​IF PEEK(AM+R)=0:​POKE AM+R,​80:​ENDIF:​ENDIF:​ENDIF:​IF D>=K:​R=RAND(20):​K=D+R+15:​Q=(20+D)*5+RAND(D*15):​Z=(Z+8) MOD 10:​ENDIF
4 POSITION 2,​20:​? "FUEL:​";E(0);" DAY:​";D;" MIS:​";CHR$(Z+65);"-";K;"-$";Q;" ":​IF E(0)<1 OR D>999:​?:​? "GAME OVER":​WHILE STRIG(0):​WEND:​RUN:​ENDIF:​S=STICK(0):​S=(S=7)-(S=11)+40*((S=13)-(S=14)):​IF S:​T=S:​ENDIF
5 H=G+T:​IF H MOD 40<>31 AND H>=SM AND H<SM+800:​C=PEEK(H):​IF C<59 AND C:​C=C-33:​CLS:​POSITION 13,​0:​? "PRICE PLANET SHIP":​IF C=Z:​L=L+Q:​K=0:​ENDIF:​GOTO 6:​ENDIF:​G=G+T:​ENDIF:​PAUSE 8:​GOTO 2
6 RESTORE:​Y=Y+((S=13)-(S=14)):​Y=ABS(Y) MOD 10:​X=(S=7)-(S=11):​FOR I=0 TO 9:​READ N$:​J=I*2+1:​POSITION 33,​J:​? CHR$(32+(I=Y)):​IF I=Y OR T OR I=9:​IF T:​R=D-B(C):​IF R>50:​R=50
7 ENDIF:​A=P(C,​I)+RAND(R)-RAND(R):​IF ABS(A)>99:​A=99*SGN(A):​ENDIF:​IF I=0 OR I=9:​A=ABS(A):​ENDIF:​P(C,​I)=A:​F(I)=1.7^I*10:​F(I)=INT(F(I)-F(I)*A/200):​POSITION 0,​J:​? N$:​POSITION 13,​J:​? F(I):​ENDIF:​POSITION 20,​J:​? P(C,​I);" ":​POSITION 28,​J:​? E(I);" "
8 IF I=Y AND X AND T=0:​A=SGN(P(C,​I)):​IF E(I*(A<0)+9*(A>0)) AND L>A*F(I):​L=L-A*F(I):​P(C,​I)=P(C,​I)-A:​E(I)=E(I)+A:​IF I<9:​E(9)=E(9)-A:​ENDIF:​ENDIF:​ENDIF:​ENDIF:​NEXT I:​T=0
9 S=STICK(0):​?:​? "$";L;" ":​IF NOT STRIG(0):​B(C)=D:​POKE 77,​0:​GOTO 2:​ENDIF:​GOTO 6:​DATA FUEL,​FOOD,​ANIMALS,​ORE,​MACHINES,​ROBOTS,​MEDICINES,​WEAPONS,​GEMS,​CARGO HOLD	

This is non-commercial site, its content is based on Atari 8-bit home computer contents and references.
If you feel your rights are violated by showing/using any part of contents of your product represented on this page, please contact me immediatelly so I can remove it!