Jump to content

~ Classic Snake ~


Achilles
 Share

Recommended Posts

Classic Snake v1.1

New with version 1.1

  • Keep track of high score
  • More equal scoring (e.g. Faster gets more, slower gets less, etc)
  • Fancier "game over" screen (many thanks UEZ)
  • Few changes in GUI to make it a bit more professional
  • Check that screen size fits before updating GUI
  • Hotkey for pause to make pausing more accessible
  • Bug with eating an apple when the snake is shorter than apple weight
  • Bug with eating two consecutive apples
Download here: Snake 1.1.zip

Previous number of downloads: 143

I have lots of ideas for updates; however I wanted to release a fully working version (I hope; let me know if you find bugs of course) while I had one. Here's some of my ideas (feel free to add):

  • Mazes! (Maybe even a custom maze editor so the user can make their own)
  • Different languages (way the code is this would be very easy to do, if someone wants to help out here that would be great)
Edited by Achilles
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

You should definitely check whether the GUI will fit the screen. Even on 'american'... Other than that, Pause and resume options would be great.

Wow.. It's very surprising that I didn't think of checking screen size, especially since it will be very easy to implement. Thanks for that idea.

Just click the screen to pause and then if you hit one of the arrow keys it will resume (or click the screen again).

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

It has an error if you eat the apple before at least 5 parts of the snake appear, also, what happens if you swallow two apples in a row and they are each supposed to grow you 5 spaces, does that work?

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Link to comment
Share on other sites

Its surprisingly hard to click the screen when my right hand is tapping away manically trying to control an uberfast snake... I get the idea though. Perhaps a little accelerator would do the trick, end is a good option there.

Ok, I'll add a hotkey... A long time ago I was working on full _GUICtrlHotkey_* UDF I might pull that up and let the user choose their own hotkey.

Nice little script. I like it a lot.

Thanks!

It has an error if you eat the apple before at least 5 parts of the snake appear, also, what happens if you swallow two apples in a row and they are each supposed to grow you 5 spaces, does that work?

I know the second you mentioned, but the first was news to me. Thanks for mentioning that.

@All: I've added your suggestions to my to-do list and will get on those as soon as I have time.

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

If you want an example of using a hotkey control then I used it in my settings dialog in THE AutoIt Tool, the code for converting etc is at the bottom, including some code for converting to the send style syntax for HotkeySet.

_GUICtrlHotkey_* sounds like a fun project, fairly simple as well (by controls standards that is).

Link to comment
Share on other sites

  • 2 weeks later...

I wondered why I get "only" one explosion when the game is over! But you linked the amount of explosions to reached score. :D

The higher the score the more explosion can be seen!

Nice implementation!

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

  • 3 weeks later...

Error:

\Snake_1.1\GameOver.au3(123,101) : ERROR: _GDIPlus_BrushSetSolidColor(): undefined function.

_GDIPlus_BrushSetSolidColor($explosion_coordinate[$n][$o + 6], $explosion_coordinate[$n][$o + 7])

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

\Snake_1.1\Snake.au3(452,19) : ERROR: AdlibUnRegister(): undefined function.

AdlibUnRegister()

~~~~~~~~~~~~~~~~^

\Snake_1.1\Snake.au3(453,32) : ERROR: AdLibRegister(): undefined function.

AdLibRegister('_Move', $speed)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Snake_1.1\Snake.au3 - 3 error(s), 0 warning(s)

EDIT INFO: AutoitVersion 3.3.0.0

Seems I dont have Adlibregister or Adlibunregister is it part of UDF?

Edited by lordicast
[Cheeky]Comment[/Cheeky]
Link to comment
Share on other sites

EDIT INFO: AutoitVersion 3.3.0.0

Seems I dont have Adlibregister or Adlibunregister is it part of UDF?

No all 3 were added in later versions of AutoIt. You should update to latest stable or something like that.
Link to comment
Share on other sites

A few suggestions

  • Use pause key for pausing, or let user select hotkey
  • Option to use wsad keys instead of arrows
  • Have it pause if you click on a menu while playing
  • Have score be relative to field size as well as time and speed
Edited by Hawkwing

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Link to comment
Share on other sites

  • 1 month later...

If you are still working on this, I would also suggest adding in wsad functionality, and changing how the hotkeys work, so I can use the arrow keys for other stuff when the Snake window isn't selected.

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...