https://medium.com/@solarbreeze69/draculark-a-mudlarking-vampire-hunting-game-bbf40361bf1a [ ] DRACULARK: a Mudlarking & Vampire Hunting Game solarbreeze solarbreeze * Follow 6 min read * 2 days ago -- Listen Share Mudlark on the River Thames foreshore by day, then hunt vampires at Carfax Abbey by night. A new game written in APL on the Commodore SuperPET for the River Thames Game Jam of September 2023. Why use an interpreted array language from the 1960s on a vintage Commodore computer? Because APL is fun and easy to learn, and the language's unique character set can be used to represent mudlarking treasures. Two APL workspaces are used, one for the mudlarking section and another for the vampire hunting section. The mudlarking main game function 'G' sets up an array holding the 23 treasure values with TSET. The River Thames foreshore is then painted with MUD. The main game body loops 200 times, reading and processing joystick input with JOY, with WAVES uncovering or washing away treasures each iteration. JOY moves the player to the Carfax ABBEY immediately upon completion of the mudlarking goal. If too few unique treasures are collected, the game ends. The main game loop 'G' TSET creates an array of 23 mudlarking treasures, displayed at the top of the screen with SHOWT MUD paints the foreshore, represented by commas, tildes, and semicolons. MUD calls FILL which fills in areas of the screen that MUD doesn't paint. The sides of the screen can't be fully painted using strings that are quoted in lines of code, so the right margins are addressed with pokes of the comma character byte to the screen memory locations. The top line of the screen is also painted due to text scroll. Some initial treasures are scattered around the foreshore. Presenting the River Thames Foreshore FILL in the rest of the unpainted foreshore area MUD paints the foreshore The JOY function checks if user input came in from the joystick or keyboard joystick, moving the player character right, left, up or down. If the player moved, CHECKSCORE will determine if a treasure was collected from the foreshore. JOY handles joystick movements, or in an emulator, a keyboard WASD joystick CHECKSCORE peeks at the screen memory location the player character is moving onto, and calls SCORE unless the screen location is a comma, tilde, semicolon or a blank space. SCORE determines which treasure was picked up and adds it to the player's inventory of treasures, and then checks if ten unique treasures have been collected. If so, the mudlark's inventory is saved to disk file 'LARKINV' and the Carfax Abbey workspace is loaded to continue playing at the abbey. A technical detail of note when determining how many unique treasures the mudlark has currently collected, FinnAPL library idiom 277 was tried initially, but became noticeably slower as the mudlark's treasure list increased. Idiom 205 was tried instead and found to be much faster and was used instead. Scoring system WAVES is used to sweep away treasures and uncover new treasures. It uncovers one new treasure each turn. Add some code to skip line 5 based on a random number roll if a less generous foreshore is desired. WAVES covers up and uncovers treasures The SAY, SAY2 and SAY3 functions display the names of the treasures as they are collected. They map the value of the character peeked at the treasure screen memory location to the treasure names. These could all be written as one long function, but it's easier to edit when everything fits on a single screen. s s3 Sometimes the player does not collect ten unique treasures, and the game ends here in that case. Only 8 unique treasures If ten unique treasures were collected, the Carfax Abbey workspace is now loaded, and it automatically runs a latent expression 'G' to run the main game loop. The main vampire hunting game body 'G' function loads in the player inventory from the save file 'LARKINV' as stored in the previous Mudlark workspace run. Then the Carfax ABBEY is painted. The main game loop repeats 400 times, taking joystick input and repainting Dracula's position each turn. Main game loop of Carfax Abbey game workspace Carfax Abbey along the River Thames HANDLEJOY allows for movement left and right of the player position and for wooden stakes to be launched at Dracula with SHOOT. SHOOT keeps track of how many times you've hit Dracula. The CRYPT is entered after five hits on Dracula sends him fleeing to the crypt. If the five hit goal isn't met, the game ends here. Hit Dracula with 5 stakes MOVEDRAC uses an orderly "Space Invaders" march to the side then down for screen movement, combined with random jumps downward and upward. This could be improved with a better movement AI, or adding an array of multiple flying vampires. Upon successful completion of the abbey entry, CRYPT paints the coffins in the crypt and then calls CH to display the player's choices. Entering the CRYPT for the final showdown Now is the time to find the courage and strength to do the terrible things that must be done. Lord Godalming helps you steel your resolve. If you did not collect a hammer and stake, a Medieval pilgrim badge, and a crucifix, you won't be able to win the game. Hammer and stake, a holy garden, or Sigillum Dei? GROW a holy garden if a crucifix was collected. Use the SIGIL if a pilgrim's badge was collected. You need the crucifix and pilgrim badge to use these options. HS paints the grim hammer and stake outcome. You need to gather a hammer and stake on the foreshore, or the vampire evil will win. This game was a lot of fun to write and it was a delight to use the APL symbols in a game. A quick playthrough of the whole game Apl Mudlark Mudlarking Vampires Commodore -- -- solarbreeze Follow Written by solarbreeze 0 Followers 6502 and APL enthusiast UFO analyst SkyHub citizen scientist mudlark astrolinguistics author Follow More from solarbreeze An APL Solution to Logiker's Vintage Computing Christmas Challenge 2022 solarbreeze solarbreeze An APL Solution to Logiker's Vintage Computing Christmas Challenge 2022 Let's use Waterloo microAPL on the SuperPET. 3 min read*Dec 28, 2022 -- 1 ChatGPT explains Arthur Whitney's J Incunabulum solarbreeze solarbreeze ChatGPT explains Arthur Whitney's J Incunabulum A line by line code explication 3 min read*Dec 5, 2022 -- SuperPET APL Trek solarbreeze solarbreeze SuperPET APL Trek 1 min read*Jul 18 -- Playing the n-state Busy Beaver game with #ChatGPT as a Turing machine writing transition tables... solarbreeze solarbreeze Playing the n-state Busy Beaver game with #ChatGPT as a Turing machine writing transition tables... Let's play a game called the n-state busy beaver game, where you are a Turing machine, formally defined as follows: you will have n... 3 min read*Dec 6, 2022 -- See all from solarbreeze Recommended from Medium The ChatGPT Hype Is Over -- Now Watch How Google Will Kill ChatGPT. AL Anany AL Anany The ChatGPT Hype Is Over -- Now Watch How Google Will Kill ChatGPT. It never happens instantly. The business game is longer than you know. *6 min read*Sep 1 -- 334 iOS 17 Safari Nikhil Vemu Nikhil Vemu in Mac O'Clock Change These 12 iOS 17 Settings Right Now For a Superior Experience iOS 17's got hell-a-lot features you can't discover thyself *9 min read*5 days ago -- 17 Lists [1] [1] [1] Staff Picks 457 stories*313 saves [1] [1] [1] Stories to Help You Level-Up at Work 19 stories*232 saves [1] [1] [1] Self-Improvement 101 20 stories*638 saves [1] [1] [1] Productivity 101 20 stories*591 saves Be Kind, Be Kind, Be Kind Jonathan Lethem Jonathan Lethem Be Kind, Be Kind, Be Kind Henry James, Mr. Rogers, and the Long Middle 4 min read*Sep 21 -- 132 The End of the Subscription Era is Coming Nick Hilton Nick Hilton The End of the Subscription Era is Coming You're overpaying for your porn (and journalism) 10 min read*Aug 30 -- 220 Why Japanese Websites Look So Different Mirijam Missbichler Mirijam Missbichler Why Japanese Websites Look So Different & how to analyze design choices without jumping to conclusions 8 min read*May 1 -- 201 Let's Start BSU Pre-alpha Test Event! Baby Shark Universe Baby Shark Universe in Baby Shark Universe Let's Start BSU Pre-alpha Test Event! Hello, Baby sharks! 3 min read*Sep 20 -- See more recommendations Help Status Writers Blog Careers Privacy Terms About Text to speech Teams