Sign in to follow this  
Followers 0
Achilles

~ Classic Snake ~

17 posts in this topic

#1 ·  Posted (edited)

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]

Share this post


Link to post
Share on other sites



Nice little game, online high scores would be great.

I might do that.. Although first I would need to make it so no matter what way you're playing you can get about the same score with the same amount of work..

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
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.

Share this post


Link to post
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]

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Nice little script. I like it a lot.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
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.

Share this post


Link to post
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]

Share this post


Link to post
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).

Share this post


Link to post
Share on other sites

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Really cool


Gnatwork Networks

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

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]

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0