424242424242424242424242424242424242424242 2 4 4 MINES OF MAGRATHEA 2 2 ================================== 4 4 Original Spectrum version entered 2 2 for CSSCGC 2021 by Paul E. Collins 4 4 This SAM Coupé UPGRADE! entered 2 2 for CSSCGC 2022 by Jim Waterman 4 4 (programmed 27-29 November 2022) 2 2 4 424242424242424242424242424242424242424242 Background / Waffle and bunk ============================ "Of all sad words of tongue and pen, the saddest are these: it might have been..." - John Greenleaf Whittier; used as the opening line to my review of Paul's official submission of this game for the CSSCGC last year: https://www.rickdangerous.co.uk/csscgc2021/review041.html I'd been asking for entries for the SAM Coupé all the way through my tenure of the 2021 CSSCGC, and I didn't get any. "Mines of Magrathea" was the closest I came to getting one; Paul E. Collins had written it using SimCoupe, then fallen foul of the bizarre way that .MGT disc emulation works on both Spectrum and SAM Coupé emulators; data had been saved to the disc image, but the disc hadn't been updated before he quit the emulator and it reverted to its previous (blank) state. Paul submitted a hastily rewritten Spectrum version instead, shoved it on a .TAP file and called it a day. When I saw that the game was barely more than 1K and wouldn't have troubled a 16K Spectrum with its memory use, Paul admitted that the SAM Coupé version had been no more than this with the idiosyncratic sound effects that are built into its BASIC. Nevertheless, I sent him a list of suggestions for a "Mines of Magrathea II" which would take advantage of all the SAM Coupé's many enhancements over the Spectrum. And I typed his Spectrum listing into the SAM Coupé in under nine minutes, just to show that it was easy to recover. "Ahh I can't be bothered. If it is so easy, you can do it. I hereby disclaim all rights in my EXCELLENT mine game and give it to the public domain." - Paul E. Collins, 6 October 2021, after repeated badgering mentioned in the above paragraph... So, Paul, if you can't be bothered, I will be. And after a bit of a refresher on SAM Coupé BASIC (I hadn't touched it at all since "Resistance Is Futile" at the end of 2020), this was the product of three days' programming, with Paul's original code at its core that only needed the bare minimum of modification to make it work on the SAM Coupé. Everything else is extra embellishments, are there are a lot of them. "It might have been", no longer. It *is*. The story of the game (an abridged version is included in the in-game instructions ===================== that make great use of the SAM Coupé's 64-column MODE 3!) Ford Prefect never was very responsible with money. Give him a wad of Altairian dollar bills and it'll take him all of a few minutes to blow the lot, whether it's on Pan-Galactic Gargle Blasters, stuffing his face with Arcturan mega-donkey steaks, canoodling with a cheap floozy who may or may not be Eccentrica Gallumbits, a luxury massage session with a Damogranian pom-pom squid at one of Han Wavel's spas, or any combination of these. So, the day that Ford decided to steal a Dine-O-Charge card from the Hitch-Hiker's Guide To The Galaxy's accounting department, and hack it to remove the credit limit, it's safe to say he was not about to change his ways. Ford has been so reckless with the card that he has left a hole in the Guide's bank account to the tune of... are you ready for this? 1,329,063 Altairian dollars. Worse still, he seems to have forgotten that the Guide is now owned by the Vogons, who will chase him to the ends of the Universe - and beyond, if necessary, or even if not - to recoup every penny he owes. Not just because the debt needs to be settled, mind; the important part of the job to the Vogons is to file the paperwork that states the money has been reclaimed from the errant employee. And that is what they will do with the fanatical zeal for which they are infamous. There is only one way Ford can think of to be able to repay his enormous debts, and avoid a horrific session of torture at the hand of Prostetnic Vogon Jeltz and his legendarily sadistic poetry recitals. It is well known that the business of building bespoke planets has made the Magratheans rich beyond even Zaphod Beeblebrox's wildest dreams - and they have to keep all their cash stashed away somewhere. The Galactic banks can't deal with such vast amounts as the interest they'd have to pay would cripple them even harder than having to deal with exchanging a stack of eight Ningis for one Triganic Pu. Have you ever tried to handle a triangular rubber coin 6,800 miles wide? Have you tried to handle eight of them, even though their combined value wouldn't even buy a Freddo? Thought not. Ford must descend into the Mines of Magrathea, where he will find some bags of what the local population would consider piffling small change. However, he still remembers the one time he visited Magrathea, and particularly how a couple of guided missiles were launched at the Heart of Gold just for being there; it wasn't what anyone would consider a friendly welcome. The subterranean caves are no different; the Magratheans are not fond of losing their fortune, and being in suspended animation until the Galactic economy recovers enough to need their business again (i.e. once the Galactic Economic Forum have been suitably dealt with...), they can't defend it themselves, so they've laid mines (exploding things) in their mines (where ore comes from). Is anyone confused yet? I didn't mean you, Arthur, you're always confused. Carry on with trying to get the Nutri-Matic Drinks Synthesiser to make tea, or at least not something entirely unlike it. For extra protection, the mines have been engineered by the Sirius Cybernetics Corporation to be programmably invisible to intruders, who will be blown to tiny bits before they even know they've triggered the trap. Fortunately for Ford, the Sirius Cybernetics Corporation's reputation for build quality is right up there with the likes of British Leyland and all those Chinese warehouses who made off-brand electronics that were gleefully ripped to pieces by a tall, hairy, gay Scotsman living on the Isle of Man in the early 21st Century. The invisibility feature doesn't quite work properly, and Ford will get a couple of seconds to plan his route through each cave before the mines vanish out of sight. This should be enough to dodge the traps, swipe the sack of cash, and get out of the cave to count it in safety. It is possible, probable even, that the Guide's accounting department are so annoyed by Ford's flagrant abuse of the Dine-O-Charge card that they will add interest to the amount he owes, up to 30% if he's really unlucky. This will mean more trips though the caves - and they get ever more dangerous as every cave has one more mine than the last. He'd better hope all those Pan-Galactic Gargle Blasters haven't given him permanent short-term memory damage. Controlling the game ==================== After all that, there really isn't all that much of a game beyond what Paul E. Collins brought us a year ago! As it was in the original, you control Ford Prefect, with the same control keys - QAOP - and you must pick up the sacks of cash, avoiding where the mines are that you can't see on screen for more than a couple of seconds. Unlike the original, you will have to make it back to the starting point without being detonated into a million shreds of Betelgeusian flesh and bone, and only then will you find out how much is in the sack. The average value is 65,535 Altairian dollars, but it could be as little as 10,000 or just over 120,000 - the amount is random ("I'M A VEGETARIAN!" - no, not that one) but is weighted towards the central value by a cubic equation that didn't require consultation with Deep Thought, Marvin, Eddie, or any other AI. There is also a skill level to be selected from 1 to 4; 1 is the easiest, in which there are only 20 mines in the first cave, and no chance of interest to be paid on your "loan". For each level above 1 there is an increase of 10 mines in the first cave, and there will be a 10% rise in the maximum possible interest charged. Interest is selected at random, so skill level 4 might still require only 0.1% interest... but don't "bank" on it! Marvin just told me I should stop making dreadful puns because it's making him very depressed. With no interest charged, it could take as few as 11 caves to gain the amount required for victory; then again, it could take up to 133 caves if your luck is as bad as Marvin's, and with the maximum amount of interest on skill level 4 it could take 173 caves! These are extreme cases, though - not to mention that they would require a genuine random number generator (i.e. one based on Brownian motion such as ERNIE), which the SAM Coupé (and every other computer) does not have. The most likely scenario is that Ford will need to loot 20 to 30 caves to avoid the poetic wrath of the Vogons. Development log =============== 26 November 2022: A year and a bit after the initial entry, and long after my occupation of CSSCGC Towers had ended, I visited the Crash Live event in Walsall, talked to Simon Goodwin and saw one of the prototypes of the SAM Coupé that still worked... and I remembered that I owed Andy Jenkinson a SAM Coupé game for this year's CSSCGC. 27 November 2022: - Redefined the UDGs to use the SAM's UDG function (in its own idiosyncratic way). - Added extra UDGs, i.e. the rocks around the border, the Altarian dollar sign, and modified those that were already there. - Redefined the SAM's default palette to the BRIGHT colours (0-7) and some extras (8-10,15) with entries 11-14 reserved to make weird effects (see below). - Junked the use of ATTR which SAM Mode 4 won't handle; what is a mine and what isn't is determined by the array m$; arrays c and d have been kept in to make the temporary display of the mines easier. The treasure is also detected by this array, also keeping variables e and f. - Reverted Paul's screeching sound effects to (mostly, but not always) use the SAM's inbuilt sound effects. The FANFARE procedure is very simple at this stage. - "YOUR HEAD A SPLODE" - swapping palette entries for colour #11 to "animate" the mine, DRAW with no colour clash, and CSIZE to make the text bigger. 28 November 2022: - Gave the game a high score (which is held in the character data for CHR$ 168 so it doesn't get overwritten by RUN) and a proper ending, whether it's "You're Winner!" or "You fail it!" - Made sure there's a "Play again?" option afterwards (that works)... - Changed the scoring system; each bag of treasure holds a random value from 10,000 (RND=0) to 121,070 (theoretically, RND=1) Altairian dollars with the central value (RND=0.5) weighted around 65,535. A total of 1,329,063 is required for victory. - Added an introduction, with a HUGE TEXT title that has more palette-swapping effects, the Hitch-Hiker's Guide To The Galaxy theme tune, and the option for skill levels (1 = 30 mines, 4 = 60 mines, you fill in the rest). - Added some instructions, using Mode 3 to cram a lot of text into the screen, QL-style. 29 November 2022: - Tweaked the instructions. - Ford must now leave every cave to complete each stage. - Changed the skill levels: 1 = 20 mines up to 4 = 50 mines, and one mine is added to every new cave. Also, a random amount of interest is added to the target amount, with maximum levels of 10%, 20% and 30% for the three higher skills. - Changed the colours - I'd suggested to Paul that the caves should be grey, and I'd made them brown all along; the SAM's brown is a bit too much like dark orange (the opposite problem to the C64!), so now the colour of the background and the surrounding rocks can be easily changed with the variables bg and ro. - Tested GET for the movement routine and found it was significantly slower than INKEY$. It's used for "press this key to continue" routines, though. The Hitch-Hiker's Guide To The Galaxy has the following to say on the subject of memes and other strange details found in this game: ================================================================== *beep* *beep* ... ... *BUZZZZZ* For anyone still unaware of the significance of the amount that Ford owes: https://en.wikipedia.org/wiki/Mad_(magazine)#Gaming For anyone still unaware of the origin of "YOUR HEAD A SPLODE": https://www.youtube.com/watch?v=R22zSrpeSA4