Initial Trading and Travel Portal screen.

Approaching the rebel planet Mars.

Program listing on 48K Spectrum.

Text Listing
 ```1 POKE 23693,7: LET s=90: LET c=s: DIM g(9): DIM p(9): CLS : PRINT "\$";c: FOR r=1 TO 9: LET p(r)=p(r)+(r<5)*(p(r)=0)*INT (r*(7+r/2+RND*5)): PRINT 'r;". ";"fuelfoodtechdrugTERAMARSIO RHEAERIS"(r*4-3 TO r*4);" \$";p(r),g(r): NEXT r: INPUT x,y: LET y=y*(y*p(x)<=c)*(g(x)>=-y): LET g(x)=g(x)+y*(x<5): LET c=c-y*p(x): POKE 23620*(x<5 OR x-y),6: INK x-4: FOR i=1 TO 40: BORDER 0: RESTORE : READ k,r,x,y,f,s,r: CLS : CIRCLE 72+x*8,32+y*8,i: PRINT s,AT 13.5+i/5-y,r+x-7;"X" AND r;AT 11,15;"*" AND k=0: BORDER 2*f: BEEP .1,24: NEXT i: DATA CODE INKEY\$-48,r-INT (r/11)+2*(RND<.5) AND r,x+(k=6)*(x<15)-(k=7)*(x>-1),y+(k=8)*(y<13)-(k=9)*(y>1),i>10 AND r,s-f,r-r*(INT (i/5)+3=y)*(r+x=22)*(k=0): POKE 23620*(s>0),5 ```

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 sold and from where travel to other planets can be made. Again, thanks to Einar Saukas for taking the time to look at optimisations and improvements to this game which made the full buying/selling system possible in a one-liner. The original version of the game for comparison is here. The decision was also made to change the game from interstellar to interplanetary in order to make the in-game planets and moons seem more familiar to the player on the trading menu.

Key, showing in-game features of trading screen.

Key, showing spaceflight graphics.

Game FAQ

• Q. What's the backstory?

A. It's the 23rd Century and mankind has just started large scale colonisation of some planets and moons of our solar system. You start off with 90 interplanetary credits, and 90 shield units on your spacecraft. You goal is to buy some goods, travel safely to some other planets and sell the goods (hopefully) at a profit. If you can make \$500 credits, then you can consider yourself to have completed the game. The game is open-ended though, and only ends when your shield units are depleted, which implies the destruction of your spacecraft. Thus the actual goal of the game is to make as many credits as possible until your craft is destroyed, so you can enjoy a good retirement afterwards! This of course assumes that your escape pod system is in good working order!

• Q. Describe the various planets.

A. The first starting planet is the blue TERA (or Earth as we know it). This planet is home of the fledgeling association of solar system colonies, but you will still get attacked here due to the ongoing conflict with the breakaway colonies of Mars.

The red desert planet Mars was the first planet to breakaway from the association with Earth, due to taxation disputes. It is now largely lawless, and ravaged by civil war.

The beautiful moon of IO (appears magenta in this game) is also under attack by rebels from Mars, who are currently attempting a trade blockade with the federation.

The lush green moon of RHEA is now covered in hydroponics bioshperes, giving it a green hue. It exists as a normally peaceful association-friendly agricultural settlement. However, pirates currently operate in the area.

The ice cold dwarf planet of ERIS contains huge underground mining facilities, and although protected by forces from Earth, is right on the edge of the planetary solar system. Expect to get attacked by either side here!

• Q. What are the keys?

A.On the trading screen, keys 1-4 buy goods (which appear in lower case), keys 5-9 and launch the ship to the various destination planets/moons (listed in upper case).

In spaceflight, keys are sinclair joystick 1, or left-6, right-7, down-8, up-9, fire photon cannon-0 or fire. Due to lack of space in the program listing, only one key will register at a time e.g. 'fire' has to be pressed on it's own.

• Q. How much do the goods cost?

A. The prices fluctuate randomly, but stay within certain limits. In general items are priced in the following order of increasing amount:- Fuel, Food, Hi-TECH equipment, Pharmacutecals/Drugs. Although occasionally some items may appear priced out of order, due to extreme market fluctuations.

• Q. How do I buy/sell goods?

A. Firstly type the number 1-4 of the item that you wish to trade in, and press enter. Secondly type the number of units to buy, and press enter. If you wish to sell, then type a negative number of units. If nothing happens after doing this, then the transaction was unsuccesful. This is could happen if either (a) you don't have enough credits to afford the specified quantity of items, or (b) you don't have the number of items in your inventory that you have tried to sell.

• Q. How do you fly to the various moons or planets?

A. Type the number 5-9 of the moon/planet you wish to fly to and press enter. To confirm the destination, type the same number and press enter again. If you don't type the same number as a confirmation then you will be returned back to the trading screen. During your journey to the destination planet/moon, you will be attacked by enemy ships 'X'. Try to shoot them by manouvering your craft such that the photon cannon can hit them. If you don't do this, then the enemy craft will eventually deplete your shileds, destroying your craft.