Taipan! (Atari 8-Bit) by Eric Carr
A downloadable game
Taipan! - BASIC 10Liner Contest 2026
==============================================
Author: Eric Carr
Language: Atari BASIC
Platform: Atari 8-bit
Category: PUR-80
Video:
Requirements:
System: Any Atari 8-bit with built-in BASIC
Emulator: Atari800MacX, Fujisan, Altirra
Background
==========
Relive the excitement of 19th century trading, as you battle pirates and trade to amass a large fortune!
This is a minimal version of Taipan, a 1979 game for 8 bits, based on the book by the same name.
You start in Hongkong with $200. How quickly can you trade up to a fortune of one million?
Gameplay
========
There are three areas of interaction:
1) Port Summary
2) Trading
3) Fighting Pirates
Port Summary
============
This lists available ports, indicating which one you are at now.
It also lists each good, the current price at this port, and how many you own.
Commands:
- Enter 1 through 5 to TRAVEL to another port
- Enter 6 through 9 to TRADE that good
NOTE: Every time you enter a port, the price of goods will change. Each port has its own range of prices for each good. This is set randomly at the start of each new game. Keep an eye of which ports tend to go low or high on each good to optimize your routes.
Trading
=======
This is the heart of the game!
When you select a good to trade, the game prompts you for a quantity to buy or sell. For convenience, the game tells you the maximum amount possible to sell and buy, indicated by "S:" and "B:"
Commands:
- Enter a positive number to buy
- Enter a negative number to sell
NOTE: Your ship has a capacity of 100 units, restricting how much you can buy even if you have more money.
Fighting Pirates
================
Occasionally you will encounter pirates while traveling. You exchange rounds firing on each other.
The display indicates the # of remaining pirate ships and the percent of damage (% DMG) your ship has received.
Commands:
- Press [Return] to fire on the pirates
- Alternatively, enter 1 before pressing [Return] to attempt to flee
After your move, pirates will attack you, increasing your percent damaged. If you you are damaged 100%, your ship sinks and your game is over.
If you manage to sink all pirates, you LOOT some money!
NOTE: Every time you enter a port, a small percent of your ship's damage is repaired.
WINNING
==================
The game has no built-in win condition. You can play as long as you like. Press [BREAK] and type RUN to start over.
Try to amass 1 million within the following timespans to earn these titles:
70 Days - Novice trader
55 Days - Experienced trader
40 Days - Master trader
Code Overview
=============
Line 0 : Initialize the game
Line 1 : Arrive at new port
Line 2-3: Display Port Summary
Line 4 : Accept Input: Navigate or Initiate Trading
Line 5 : Handle Trading
Line 6-8: Fight Pirates
Line 9: Navigation
Notable Variables
=================
S$ - Temporary port/goods name
G$ - "We are at this port" indicator
G(1-4) - Cost of good at current port (updated each new port arrival)
G(6-9) - Quantity of this good the player owns
G(10-29) - Relative cost of each good at each port (caculated at game start)
F - Your Free units of storage for goods. Starts at 100 (utilizing FOR loop in line 0)
D - Your ship's damage percent. Starts at 0
M - Your money. Starts at 200
L - Current port. Starts at 1
T - Current day. Starts at 1
V - Input in port summary. Used to choose new Location or Good to trade
Q - Input in trading. Also, number of pirate ships remaining during a fight
Line by Line explanation
========================
0DI.S$(9),G$(9),G(99):F.F=6TO99:G(F)=(F>9)*(RND(0)*4+2):N.F:M=200:V=1:G$="*. ":?
Initialize the game
- Initialize arrays and starting money and port
- Determines random cost range for Goods at each port
1T=T+1:L=V:F.I=1TO4:?"..";:V=G(6+L*4):G(I)=INT(INT(RND(0)*(V+I)+V)*5^I+.1):N.I:?
Arrive at new port
- Increments the day and calculates price of goods at this new port
- NOTE: Due to an exponential rounding bug in Basic REV A (and Altirra Basic), I have to add +.1 to ensure the same output as Basic REV B and C.
2?:?"Day ";T:?:RES.:F.I=1TO5:REA.S$:?I;"=";S$;G$(2-(I=L)):N.I:?:F.I=6TO9:REA.S$
Display Port Summary
- Display the current day and list of ports. Start looping details of Goods
3?I;"=";S$,"$";G(I-5),G(I):N.I:?:?"$";M:D.Hongkong,Shanghai,Nagasaki,Singapore
Display Port Summary
- Details of goods and current money available. Port names as DATA
4T.4:I.V:ONV<1ORV>9ORV=L GOTO4:ONV<6GOTO9:B=INT(M/G(V-5)):S=-G(V):IFB>F THENB=F
Accept Input: Navigate or Initiate Trading
- Gets port destination or good to trade.
- If good, computes maximum allowed to sell and buy
5?"S:";S,"B:";B:T.5:I.Q:ONQ<S ORQ>B GOTO5:G(V)=G(V)+Q:F=F-Q:M=M-G(V-5)*Q:G.2
Handle Trading
- Display maximum to sell and buy.
- Validate and perform trade, then loop back to line 2 to redisplay port summary
6?:?"Pirates x ";Q:?D;"% DMG>RET=*>1=Flee":T.7:I.R:ONRND(0)<.4GOTO1:?"Fail";:G.8
Fight Pirates
- Display # of pirates and your ship's damage
- Accept input on action
- Attempts flee if commanded. If fleeing fails, skip attacking the pirates
7H=INT(RND(0)*Q/2)+1:Q=Q-H:?:?"We SINK ";H;:IFQ=0THENM=M+T*10:?" & LOOT $";T*10
Fight Pirates
- Attacks pirates a random amount, reporting how many are sunk
- If all pirates are sunk, give/display loot
8ONQ=0GOTO1:H=INT(RND(0)*9):D=D+H:?", receive DMG ";H:OND<100GOTO6:?"DIED.*":RUN
Fight Pirates
- If pirates have been defeated, goto 1 to arrive in new port
- Otherwise, pirates attack for random damage
- If your damage is >=100%, display game over message and restart game
9D=INT(D*.9):Q=INT(RND(0)*T/2)+3:G.1+5*(RND(0)<.4):D.Manila,Rice,Arms,Silk,Opium
Navigation
- Reduce your ship damage when leaving port
- Determine number of potential pirates (Q)
- Randomly go to pirate fight, or proceed to port
- City and Goods names as DATA
| Status | Released |
| Author | BASIC 10Liner |
| Genre | Strategy |
| Tags | 10liner, 8-Bit, atari, atari800, atarixl, basic |
| Content | No generative AI was used |
Install instructions
Starting the game
=================================
Boot to BASIC with the ATR, and enter: RUN "D:TAIPAN.BAS"


Comments
Log in with itch.io to leave a comment.
This is remarkable!