--- title: "Fur Trader" id: 56804 type: "computer_media" slug: "fur-trader" url: "http://localhost/computer_media/fur-trader/" markdown_url: "http://localhost/computer_media/fur-trader.md" published_at: "2024-09-29T01:55:25+00:00" modified_at: "2026-04-03T07:58:52+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2024/09/296_FT.png" excerpt: "Manage hunger, rest, and a pack-horse fortune in this fur-trading survival game where bandits, bed bugs, and starvation all threaten your wealth." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" genre: - name: "Game" slug: "game" taxonomy: "genre" url: "http://localhost/type/game/" - name: "Resource Management" slug: "resource-management" taxonomy: "genre" url: "http://localhost/type/resource-management/" media_contents: - id: 56738 title: "Timex Sinclair Public Domain Library Tape 1007" type: "computer_media" url: "http://localhost/computer_media/timex-sinclair-public-domain-library-tape-1007/" media_type: "Program" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2024/09/296_FT.png" media_type_tags: "Game, Resource Management" --- This is a fur-trading survival game in which the player manages a pack-horse expedition, trading four types of furs (haggis, coyote, ocelot, and rabbit) at randomly located trading posts while managing hunger, rest, and money. Each game tick decrements both hunger and rest counters, and random robbery events can strip furs or cash with roughly a 1-in-25 chance per turn. Exchange rates are randomised per visit to a trading post and locked in until the deal is completed via the `ERV` flag. The computed `GOTO A*1000` at line 200 dispatches to six distinct routines based on the player’s numeric menu choice, a common Sinclair BASIC dispatch idiom. *** ## Program Analysis ### Program Structure The program is divided into functional blocks separated by line-number ranges. Initialisation runs from lines 6–17, the main command menu from 25–200, and the six command handlers occupy the 1000-series through 6000-series blocks. The game-tick engine lives at 7000–7250, death/end-game handling at 8000–8230, and error messages at 9000–9050. | Line Range | Purpose | | --- | --- | | 6–17 | Variable initialisation and jump to game-tick at 7000 | | 25–200 | Main menu display, input, and dispatch | | 1000–1520 | Command 1: Search for trading post | | 2000–2020 | Command 2: Sleep/rest | | 3010–3040 | Command 3: Eat/drink from pack-horses | | 4000–4140 | Command 4: Status check | | 5000–5100 | Command 5: View exchange rates | | 6000–6425 | Command 6: Buy and sell furs | | 7000–7250 | Game tick: decrement counters, random robberies | | 8000–8230 | Death screen and final net-worth calculation | | 9000–9050 | Error/invalid-command messages | ### Computed GOTO Dispatch Line 200 uses `GOTO A*1000` to jump directly to the handler for each of the six commands. Because BASIC evaluates the arithmetic expression, commands 1–6 map cleanly to lines 1000, 2000, 3000, 4000, 5000, and 6000 respectively. This is an efficient alternative to a chain of `IF … THEN GOTO` statements and is a well-known Sinclair BASIC technique. ### Game-Tick Engine Rather than driving the game loop through the menu itself, every action routes back to line 17 (`GOTO 17`), which immediately jumps to the tick routine at line 7000. This means every single player command—including merely checking status—costs one hunger point and one rest point. Lines 7005–7010 decrement `D` (rest counter) and `H` (hunger counter), then check for death conditions before processing random events. ### Randomised Events Two independent robbery checks occur on every turn. Each uses `INT (RND*125)>5`, giving approximately a 96/125 (≈77%) chance of *no* robbery — so roughly a 1-in-5 chance of being robbed each turn. Both fur robbery (line 7050–7110) and cash robbery (line 7210) steal a random fraction of up to half the player’s current holdings using `INT (RND*(X/2))`. ### Exchange Rate Flag (ERV) The variable `ERV` acts as a one-shot latch. When the player first views the exchange rates (command 5), prices are randomised and `ERV` is set to 1 at line 5095. Subsequent views of the rate screen reuse the same prices. After completing a deal (line 6420), `ERV` is reset to 0 so fresh prices are generated at the next post. Line 185 prevents the player from making a deal without first checking the rates, enforcing the intended flow. ### Trading Post Availability Command 1 (search for a trading post) succeeds if `INT ((RND*10)+1) <= 6`, giving a 60% success rate. On success, the flag `T` is set to 1, enabling commands 5 and 6. On failure or after completing a deal, `T` is cleared. There is also a 50% chance the player finds extra food on successfully locating a post (line 1025–1040). ### Death and Net Worth On death (starvation at line 8020, exhaustion at line 8000), lines 8112–8118 calculate the player’s final net worth by valuing all remaining furs at the last known exchange prices (`HFP`, `CFP`, `OFP`, `RFP`) and adding them to cash `M`. This requires that exchange rates have been seen at least once; if the player dies before ever visiting a trading post, these price variables will be uninitialised, which is a latent bug. ### Key BASIC Idioms and Notable Techniques - `PAUSE 32768` is used as a wait-for-keypress on status and exchange-rate screens (lines 4130, 5090, 8220). - `INT A <> A` at line 170 validates that the menu input is a whole number, rejecting fractional entries. - Block graphic characters in line 2014 (`\:'\:' \':\': …`) are used to display a row of bed bugs as an animation. - Input re-validation loops (e.g. lines 6050–6060, 6100–6110) use `GOTO` back to the `INPUT` line rather than using a `FOR`/`NEXT` construct. - Inverse-video text in the error messages at lines 9000, 9020, and 9040 makes them visually distinct from normal output. - Line 7250 jumps to line 20, which does not exist; this is used as an intentional fall-through to line 25 (the menu), a known BASIC technique where execution continues at the next higher line number. ### Anomalies and Minor Issues - Line 3 (`GOTO 7000`) does not exist as line 3; the initialisation sequence at lines 6–17 ends with `GOTO 7000` at line 17, which is correct, but line 6 starts with `LET ERV=0` without a preceding `CLS`, so any screen content from a prior run will remain briefly visible. - At line 6195 the `INT X` truncation is missing for rabbit fur purchase input, unlike all other fur-quantity inputs. This could allow fractional quantities. - The hunger counter `H` and rest counter `D` are only reset by eating (line 3015) and sleeping (line 2005) respectively, but their initial values of 7 mean the player has exactly 7 command turns before dying if they neither eat nor sleep. - Lines 9060–9080 (`CLEAR`, `SAVE`, `RUN`) are unreachable dead code — no path in the program leads to line 9060. ## Source Code ``` 6 LET ERV=0 7 CLS 8 LET HF=5 9 LET CF=50 10 LET OF=100 11 LET RF=200 12 LET H=7 13 LET D=7 14 LET F=5 15 LET M=100 16 LET T=0 17 GOTO 7000 25 CLS 30 PRINT AT 3,0;"YOUR COMMANDS ARE :" 40 PRINT 50 PRINT "<1> LOOK FOR TRADING POST." 60 PRINT "<2> GO TO BED." 70 PRINT "<3> EAT/DRINK FOOD AND WATER." 80 PRINT "<4> FOOD/HUNGER/REST/STORES CK." 90 PRINT 100 PRINT 110 PRINT "COMMANDS AT TRADING POST ONLY." 120 PRINT 130 PRINT "<5> SEE GOING EXCHANGE RATE." 140 PRINT "<6> MAKE A DEAL." 150 PRINT AT 21,0;"WHAT IS YOUR COMMAND ?" 160 INPUT A 170 IF INT A<>A OR A<1 OR A>6 THEN GOTO 9020 180 IF NOT T AND A>4 THEN GOTO 9040 185 IF A=6 AND ERV=0 THEN GOTO 9000 190 CLS 200 GOTO A*1000 1000 IF INT ((RND*10)+1)>6 THEN GOTO 1500 1010 LET T=1 1020 PRINT AT 8,0;"CONGRATULATIONS . YOU HAVE FOUND A TRADING POST." 1025 LET A=INT (RND*2)+1 1030 PRINT 1035 IF A=1 THEN LET F=F+1 1040 IF A=1 THEN PRINT "YOU ALSO MANAGED TO REFILL YOUR STORE OF FOOD ." 1045 PAUSE 300 1050 GOTO 17 1500 LET T=0 1510 PRINT AT 11,0;" BAD LUCK.YOU DID NOT MANAGE TO FIND A TRADING POST ANYWHERE ." 1515 PAUSE 300 1520 GOTO 17 2000 LET A=INT (RND*5)+1 2005 IF A<>1 THEN LET D=7 2010 PRINT AT 10,0;"NIGHT NIGHT.SLEEP TIGHT;MIND THE BUGS DON""T BITE." 2011 PAUSE 300 2012 IF A=1 THEN PRINT AT 15,0;"THE BED BUGS BIT AND YOU DID NOT MANAGE TO GET ANY SLEEP." 2013 IF A=1 THEN PRINT AT 17,0;"" 2014 IF A=1 THEN PRINT AT 18,6;" :':' ':': :':' :':' ':': ':':" 2015 IF A=1 THEN PAUSE 300 2020 GOTO 17 3010 IF F<>0 THEN PRINT AT 11,0;"YOU HAVE NOW TAKEN THE LOAD OFF ONE PACKHORSE." 3015 IF F<>0 THEN LET H=7 3020 IF F=0 THEN PRINT AT 11,0;"BAD LUCK.THERE IS NO FOOD LEFT." 3030 IF F<>0 THEN LET F=F-1 3035 PAUSE 300 3040 GOTO 17 4000 PRINT "FOOD / HUNGER / REST / STORES CK" 4010 PRINT AT 3,0;"YOU HAVE ";HF;" HAGGIS FURS." 4020 PRINT 4030 PRINT "YOU HAVE ";CF;" COYOTE FURS." 4040 PRINT 4050 PRINT "YOU HAVE ";OF;" OCELOT FURS." 4060 PRINT 4070 PRINT "YOU HAVE ";RF;" RABBIT FURS." 4080 PRINT AT 12,0;"YOU CAN SURVIVE ";H;" COMMANDS WITHOUT ANY FOOD." 4090 PRINT 4100 PRINT "YOU HAVE ";F;" PACK-HORSES OF FOOD AND WATER." 4110 PRINT 4120 PRINT "YOU CAN SURVIVE ";D;" COMMANDS WITHOUT ANY REST." 4125 PRINT AT 21,0;"YOU NOW HAVE $";M 4130 PAUSE 32768 4140 GOTO 17 5000 IF ERV=1 THEN GOTO 5040 5005 LET HFP=INT (RND*40)+61 5010 LET CFP=INT (RND*30)+31 5020 LET OFP=INT (RND*20)+11 5030 LET RFP=INT (RND*10)+1 5040 PRINT TAB 9;"EXCHANGE RATE." 5050 PRINT AT 4,0;"HAGGIS FUR =$";HFP 5060 PRINT AT 8,0;"COYOTE FUR =$";CFP 5070 PRINT AT 12,0;"OCELOT FUR =$";OFP 5080 PRINT AT 16,0;"RABBIT FUR =$";RFP 5090 PAUSE 32768 5095 LET ERV=1 5100 GOTO 17 6000 PRINT AT 4,0;"YOU HAVE ";HF;" HAGGIS FURS" 6010 PRINT AT 8,0;"YOU HAVE ";CF;" COYOTE FURS" 6020 PRINT AT 12,0;"YOU HAVE ";OF;" OCELOT FURS" 6030 PRINT AT 16,0;"YOU HAVE ";RF;" RABBIT FURS" 6035 PRINT AT 0,0;"YOU NOW HAVE A TOTAL OF $";M 6040 PRINT AT 20,0;"HOW MANY HAGGIS FURS WOULD YOU LIKE TO SELL ?" 6045 IF HF<=0 THEN GOTO 6090 6050 INPUT X 6055 LET X=INT X 6060 IF X>HF OR X<0 THEN GOTO 6050 6070 LET M=M+(X*HFP) 6075 PRINT AT 0,25;M;" " 6080 LET HF=HF-X 6085 PRINT AT 4,9;HF;" " 6090 PRINT AT 20,9;"COYOTE FURS" 6095 IF CF<=0 THEN GOTO 6140 6100 INPUT X 6105 LET X=INT X 6110 IF X>CF OR X<0 THEN GOTO 6100 6120 LET M=M+(X*CFP) 6125 PRINT AT 0,25;M;" " 6130 LET CF=CF-X 6135 PRINT AT 8,9;CF;" " 6140 PRINT AT 20,9;"OCELOT FURS" 6145 IF OF<=0 THEN GOTO 6180 6150 INPUT X 6153 LET X=INT X 6155 IF X>OF OR X<0 THEN GOTO 6150 6160 LET M=M+(X*OFP) 6165 PRINT AT 0,25;M;" " 6170 LET OF=OF-X 6175 PRINT AT 12,9;OF;" " 6180 PRINT AT 20,9;"RABBIT FURS" 6185 IF RF<=0 THEN GOTO 6220 6190 INPUT X 6195 IF X>RF OR X<0 THEN GOTO 6190 6200 LET M=M+(X*RFP) 6205 PRINT AT 0,25;M;" " 6210 LET RF=RF-X 6215 PRINT AT 16,9;RF;" " 6220 PRINT AT 20,9;"HAGGIS FURS WOULD YOU LIKE TO BUY ? " 6225 IF MM OR X<0 THEN GOTO 6230 6250 LET M=M-(X*HFP) 6255 PRINT AT 0,25;M;" " 6260 LET HF=HF+X 6265 PRINT AT 4,9;HF;" " 6270 PRINT AT 20,9;"COYOTE FURS" 6275 IF MM OR X<0 THEN GOTO 6280 6300 LET M=M-(X*CFP) 6305 PRINT AT 0,25;M;" " 6310 LET CF=CF+X 6315 PRINT AT 8,9;CF;" " 6320 PRINT AT 20,9;"OCELOT FURS" 6325 IF MM OR X<0 THEN GOTO 6330 6350 LET M=M-(X*OFP) 6355 PRINT AT 0,25;M;" " 6360 LET OF=OF+X 6365 PRINT AT 12,9;OF;" " 6370 PRINT AT 20,9;"RABBIT FURS" 6375 IF MM OR X<0 THEN GOTO 6380 6400 LET M=M-(X*RFP) 6405 PRINT AT 0,25;M;" " 6410 LET RF=RF+X 6413 PRINT AT 16,9;RF;" " 6415 LET T=0 6420 LET ERV=0 6425 GOTO 17 7000 CLS 7005 LET D=D-1 7010 LET H=H-1 7020 IF H<0 THEN GOTO 8020 7030 IF D<0 THEN GOTO 8000 7040 IF INT (RND*125)>5 THEN GOTO 7200 7050 LET HF=HF-INT (RND*(HF/2)) 7070 LET CF=CF-INT (RND*(CF/2)) 7090 LET OF=OF-INT (RND*(OF/2)) 7110 LET RF=RF-INT (RND*(RF/2)) 7130 PRINT AT 9,0;" SOME ROBBERS HAVE JUST ROBBED YOUR PACK HORSES OF SOME OF YOUR FURS." 7140 PAUSE 300 7150 CLS 7200 IF INT (RND*125)>5 THEN GOTO 7250 7210 LET M=M-INT (RND*(M/2)) 7220 PRINT AT 9,0;" SOME ROBBERS HAVE JUST ROBBED YOUR PACK HORSES OF SOME OF YOUR MONEY." 7230 PAUSE 300 7240 CLS 7250 GOTO 20 8000 PRINT "YOU DIED DUE TO A LACK OF REST." 8010 GOTO 8030 8020 PRINT "BAD LUCK.YOU STARVED TO DEATH." 8030 PRINT 8040 PRINT "YOU HAD ";F;" PACK-HORSES OF FOOD AND WATER LEFT" 8060 PRINT "YOU COULD HAVE SURVIVED ";D;" DAYS WITHOUT REST" 8080 PRINT "YOU COULD HAVE SURVIVED ";H;" DAYS WITHOUT FOOD/WATER" 8100 PRINT 8110 PRINT "IN YOUR WILL,YOU LEFT :" 8112 LET M=M+(HF*HFP) 8114 LET M=M+(CF*CFP) 8116 LET M=M+(OF*OFP) 8118 LET M=M+(RF*RFP) 8120 PRINT 8130 PRINT "A TOTAL OF $";M;" NET." 8140 PRINT 8150 PRINT "( ";HF;" HAGGIS FURS )" 8160 PRINT 8170 PRINT "( ";CF;" COYOTE FURS )" 8180 PRINT 8190 PRINT "( ";OF;" OCELOT FURS )" 8200 PRINT 8210 PRINT "( ";RF;" RABBIT FURS )" 8220 PAUSE 32768 8230 GOTO 7 9000 PRINT AT 17,0;"% % % % %W%H%A%T% %A%B%O%U%T% %C%O%M%M%A%N%D% %(%5%)% % % % % % " 9005 PAUSE 500 9010 GOTO 25 9020 PRINT AT 17,0;"%P%L%E%A%S%E% %E%N%T%E%R% %A% %C%O%R%R%E%C%T% %C%O%M%M%A%N%D% %." 9025 PAUSE 500 9030 GOTO 25 9040 PRINT AT 17,0;"% %Y%O%U% %A%R%E% %N%O%T% %A%T% %A% %T%R%A%D%I%N%G% %P%O%S%T% %." 9045 PAUSE 500 9050 GOTO 25 9060 CLEAR 9070 SAVE "1029%6" 9080 RUN ```