Zombie Dice
-----------

By Andy Jenkinson (uglifruit) for comp.sys.sinclair Crap Games Competition 2021.

For ZX Spectrums (with AY Chips)

I.e. 48K models with an external AYchip eg. Melodik AY-3-8192 Soundbox or ZX-AY add-on.

Or 128K models.

Or 48K models, but silently. 


A Dice Game for 0 to 8 player.


Be the first zombie to feast on 13 or more brains.

1. Take three dice, roll 'em.

2. Keep the "brains" you roll to one side, put the "shotguns" to the other side.

3. You can re-roll the "runners" plus more dice from the pool (always making the total rolled back up to three).

... or you can 'bank' the "brains" you have, and pass on the next player.

But watch out - if you ever have more than three "shotguns" your go is over and you bank no brains at all!

The winner is the person with the most brains (13 or over at the end of a full round of everyone playing)


Note: Red dice have more shotgun faces (and less brains), free dice have more brain faces (and less shotguns).





FEATURES:
---------

1. A CONVERSION OF AN ACTUAL GAME - that is alright.  It's not a *great* game, it's an okay game of chucking dice.  https://en.wikipedia.org/wiki/Zombie_Dice designed by Steve Jackson.  But not the *other* Steve Jackson who founded Games Workshop and wrote "Warlock Of Firetop Mountain" "Fighting Fantasy" novel with Ian Livingstone.  (However he IS the Steve Jackson who *did* write a couple of the FF novels in the same series - two Steve Jacksons working on the same book series - so confusing - what are the odds?). Incidentally, if you're interested in the FF book series, I recommend Johnathon Green's excellent history "You Are The Hero" (both the original and the less essential "Part 2", but "Part 2" seems to be out of stock everywhere, and doesn't look like it's getting a reprint any time soon). 

2. AN OKAY LOADING SCREEN.  With a mildly interesting provenance.  When I'm not messing around with ZX Spectrums, or doing music things (or work), I also moonlight doing Teletext Art.  I was asked to make some pieces to contribute to 2020's "Monstober" Teletext Art fest, and one I made was this:  https://twitter.com/andyuglifruit/status/1322803023157092352  It was a pretty good piece/joke that I've recycled here as a loading screen for Zombie Dice, slightly touched up.


3. AY MUSIC THROUGHOUT:  I've reused my interrupt driven AY music driver to plays AY music in the background - and here I've made a slightly soulless AY rendition of "Zombie" (The Cranberries, 1994, written by Dolores O'Riordan).  Upon exiting to BASIC you'll need RANDOMIZE USR 49093 to stop the music.

4. A BIG SCALABLE FONT.  That I made with DATA STATEMENTS and calculated RESTOREs.  It's too slow to use a lot, but I thought made a nice title font, and when you scratch your initials in.  I am considering turning this scalable font into a m/code routine as I think I can 'do' it in m/code (with effort).  Its data format is crap in BASIC data statements (numbers being stored as 5 bytes + text per number) - but in m/c I am confident I can get this down to just 8 bytes per character.  Anyway, I'm not doing that here - this is the inefficient slow version.  It's quite pretty though.

5. A.I. AND COMPUTER OPPONENTS.  They actually *do* play an okay game (it's a mainly luck based game anyway) - but the A.I. opponents don't do anything too daft, and try not to take too many risks (unless they are a long way behind feel they need to catch up).

6. PRESS ANY KEY responses are done for you, if it is a computer opponent's go.  And it tells you what it's selected.  I thought that was a nice touch.  It also means...

7. COMPUTER VS COMPUTER MODE!  You can set it playing against itself!  And it does, until one of it wins.  If you play it in an emulator and speed it up when playing against itself it is a bit like the end of War Games.  But it never declares that the only winning move is not to play, or asks you if you'd like to play a game of chess, unfortunately.

8. An interesting partial screen clear technique using the 'Input' area of the screen.  Well I thought it was interesting.

5. FORCED 48K MODE.  The initial loader forces a 128K Spectrum into USR0 48K mode. (Based upon Slavomir Labsky's work (https://busy.speccy.cz/tvorba/usr0.htm).  It means that exiting to basic with the music playing doesn't crash the computer (as it does in 128K mode, thanks to the memory paging).

6. A NEW FONT (2):  I used my (not proportional) Font Editor to make a grizzly UPPERCASE only font.  That I then chose to not really use for the bulk of the game.  When you're "entering your initials" you can type with it and enjoy it.  I left this as a simple 'input' to allow this, though a three letter only inkey$ input would have been better at error trapping.  The lower case font is a bit... inconsistent in height.

10. UDGs.  When the game "initialises" it defines a handful of UDGs for the game.  I did this in a way I've never done before in the BASIC listing.

11. VAL$.  I used VAL$!  By setting the dice pool variable p$ as "d$(1)d$(1)d$(1)d$(2)d$(2)" (for a pool that has three of dice type 1, and two of dice type 2 etc, I used "VAL$(p$(1 to 5))" to access them.  It wasn't a very efficient way - but at least I used it!  And it also alerted me to the fact that zmakebas - the text to BASIC utility I was using didn't compile VAL$ correctly.  It made it into VAL then a $ sign.  It is indicative of how uncommon VAL$ is that I contacted Russel Marks (the author  of zmakebas) who provided me with a fix patch and has now put out his first update in *years* to correct this, and told me he was amazed he'd never noticed this bug - and seemingly neither had anyone else.  ZMakeBas Version 1.2a is now available here: https://zgedneil.nfshost.com/zmakebas.html if anyone else needs VAL$ adding to their copy.




Enjoy Zombie Dice!

Andy, July 2021.