One Line Space Trader (Old Version)

Initial Trading and Travel Portal screen.

Approaching the rebel planet TAVO.

Program listing on 48K Spectrum.

Text Listing
1 POKE 23693,7:
 LET s=90:
 LET c=9:
 LET g=0:
 CLS :
 FOR r=1 TO 10:
 PRINT AT 0,0;"$";INT c,AT r*2,0;r;". ";"FUELFOODTECHDRUGLUXYTERATAVOGRELPNIRCOLB"(r*4-3 TO r*4):
 NEXT r:
 LET k=CODE INKEY$-48:
 LET t=k*(k>0)*(k<6)*(c>0):
 LET g=g+t:
 LET c=c-t:
 POKE (k<6 OR k>10)*23620,6:
 INK k-5:
 RESTORE :
 READ c,x,y,m,k:
 FOR i=1 TO 40:
 BORDER 0:
 CLS :
 CIRCLE 128+x*8,88+y*8,i:
 PRINT AT 0,0;s,AT 7+INT (i/5)-y,m+x;"X" AND m;AT 11,15;"*" AND k=0:
 RESTORE :
 READ d,d,d,d,d,k,n,m,x,y,f,s,m:
 BORDER 2*f:
 NEXT i:
 DATA c+g*(.7+RND),0,0,16,51,CODE INKEY$-48,SGN (RND-.5),m+n*(m+n>12)*(m+n<20),x+(k=6)*(x<8)-(k=7)*(x>-8),y+(k=8)*(y<6)-(k=9)*(y>-6),i>10 AND m,s-f,m*(1-(7+INT (i/5)-y=11 AND m+x=15 AND k=0)):
 POKE 23620*(s>0),5

Variable list
a
b
c total cash owned by player 
d dummy variable to increment DATA pointer
e
f set to 1 if player is being fired upon by enemy ship
g total value of goods on board
h
i planet distance counter & vertical position of enemy ship
j
k keypress value
l
m horizontal position of enemy ship
n attempted random horizontal movement of enemy ship
o
p
q
r row counter for printed menu
s shield units remaining
t value of single transaction
u
v
w
x horizontal co-ordinate of player in spaceflight
y vertical co-ordinate of player in spaceflight
z

Download the game

About the game

An attempt to fit a space trading type game into a single line of code. One Line Space Trader features five visitable planets, enemy craft that attack the player and can be shot down. There's trading screen where goods can be bought and travel to other planets can be made.

Key, showing in-game features of trading screen.

Key, showing spacefilght graphics.

Game FAQ

Back to Sinclair stuff index