Jump to content

Recommended Posts

Posted (edited)

Hi all,

I got bored so I decided to rewrite Mike Singleton / Postern's excellent 1983 Spectrum game Snake Pit.

It's a fairly faithful recreation with a couple of minor tweaks over the original. All the assets are embedded into the script so there are no extra files required.

Credit to UEZ for the File to Base64 String functions and for _GDIPlus_ScaleImage and to Tom Vernooij for _ArrayRandom.

The code is way to large for a code box so I'll just attach the file.

Comments welcome but I probably won't be spending much time improving any of the multitude of inefficiencies. I'm not a programmer, I'm more of a fiddler so don't expect to see best practices for variable/function naming or just about anything else.

Known bugs. Occasionally pressing 'S' to restart doesn't work correctly, I can't be bothered to fix it so just press 'S' again.

                     Speed is inconsistent. I tried to dynamically adjust the sleep but just made it worse.

Object of game:

While $playerAlive = True

    AvoidSnakes()

    Eat Eggs($lotsOf)

    EatSnakesStartingFromTail()

    IncreaseSpeedAndStartAgain()

WEnd

Enjoy!

SnakePit.au3

Edited by kev51773
Posted

thanks

its cool :)

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...