Jump to content

Here it is, the snake game.


Recommended Posts

Good job! Xenogis = Proud of you.

Suggestion: Make a score counter

You should be proud of yourself, you made me come out of my hiding spot and post again (I havn't posted on these forums for quite a while, i think about 2 & 1/2 months now)

<{POST_SNAPBACK}>

Thank you for your high remark and your suggestion(We are looking into it). I am glad we made you come out of your hole :( Edited by quick_sliver007

.

Link to comment
Share on other sites

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Here is some preview screen shoots of the next version.

Please note that the screen shoots you see here maynot be in the next version. All will not be known until it is done and today is the first day we worked on the next version.

Edited by quick_sliver007

.

Link to comment
Share on other sites

One of my old favorites. The following main loop makes the game more responsive to the keyboard presses (which is important in most games). Would it be nice with a different colored snake head? Important after a pause. Shouldn't also the speed increase as the snake grows?

Global $dx = 1
Global $dy = 0
Global $pause = 1
Global $timer = TimerInit()

While 1 
    Sleep(2 + $pause*200); tiny sleep when not pause - otherwise longer

    If _IsPressed(25) Then
        $dx = -1
        $dy = 0
        $pause = 0
    ElseIf _IsPressed(27) Then
        $dx = 1
        $dy = 0
        $pause = 0
    ElseIf _IsPressed(26) Then
        $dx = 0
        $dy = -1
        $pause = 0
    ElseIf _IsPressed(28) Then
        $dx = 0
        $dy = 1
        $pause = 0
    EndIf
    If _IsPressed(20) Then $pause = 1
    
    If $pause = 0 And TimerDiff($timer) > $speedder Then
        move()
        $timer = TimerInit()
    EndIf
WEnd

/ADD: After some playing, I found that high speed polling of the keyboard isn't really required. The following main loop allows you to both pause and unpause with the space bar:

While 1
    Sleep($speedder)
    
    If _IsPressed(25) Then
        $dx = -1
        $dy = 0
        $pause = 0
    ElseIf _IsPressed(27) Then
        $dx = 1
        $dy = 0
        $pause = 0
    ElseIf _IsPressed(26) Then
        $dx = 0
        $dy = -1
        $pause = 0
    ElseIf _IsPressed(28) Then
        $dx = 0
        $dy = 1
        $pause = 0
    EndIf
    If _IsPressed(20) Then
       If $pause = 0 Then $pause = 2
       If $pause = 1 Then $pause = 3
    Else
       If $pause = 2 Then $pause = 1
       If $pause = 3 Then $pause = 0
    EndIf
    If $pause = 0 Then move()
WEnd
Edited by tylo

blub

Link to comment
Share on other sites

Thank you two for the input for the next version. If any body has any ideals just post them.

Also take a look at my high score. :( It's the best I have done yet. I believe it can be beat easy but take a look anyway.

<{POST_SNAPBACK}>

Hey, QS new logo?
Link to comment
Share on other sites

Good response time. Feels like the original. I believe you are correct, a "reverse" kills you in the original.

What about adding walls/obstacles? I read through the discussion and missed any mention of that.

One version I saw allowed a set amount of time to get the food, then a poison was added.

Great AS IS for mindless moments of fun.

Link to comment
Share on other sites

One of my old favorites.  The following main loop makes the game more responsive to the keyboard presses (which is important in most games). Would it be nice with a different colored snake head? Important after a pause. Shouldn't also the speed increase as the snake grows?

Global $dx = 1
Global $dy = 0
Global $pause = 1
Global $timer = TimerInit()

While 1 
    Sleep(2 + $pause*200); tiny sleep when not pause - otherwise longer

    If _IsPressed(25) Then
        $dx = -1
        $dy = 0
        $pause = 0
    ElseIf _IsPressed(27) Then
        $dx = 1
        $dy = 0
        $pause = 0
    ElseIf _IsPressed(26) Then
        $dx = 0
        $dy = -1
        $pause = 0
    ElseIf _IsPressed(28) Then
        $dx = 0
        $dy = 1
        $pause = 0
    EndIf
    If _IsPressed(20) Then $pause = 1
    
    If $pause = 0 And TimerDiff($timer) > $speedder Then
        move()
        $timer = TimerInit()
    EndIf
WEnd

/ADD: After some playing, I found that high speed polling of the keyboard isn't really required. The following main loop allows you to both pause and unpause with the space bar:

While 1
    Sleep($speedder)
    
    If _IsPressed(25) Then
        $dx = -1
        $dy = 0
        $pause = 0
    ElseIf _IsPressed(27) Then
        $dx = 1
        $dy = 0
        $pause = 0
    ElseIf _IsPressed(26) Then
        $dx = 0
        $dy = -1
        $pause = 0
    ElseIf _IsPressed(28) Then
        $dx = 0
        $dy = 1
        $pause = 0
    EndIf
    If _IsPressed(20) Then
       If $pause = 0 Then $pause = 2
       If $pause = 1 Then $pause = 3
    Else
       If $pause = 2 Then $pause = 1
       If $pause = 3 Then $pause = 0
    EndIf
    If $pause = 0 Then move()
WEnd

<{POST_SNAPBACK}>

Thank you for the high remarks and ideals. We have changed the the way it pauses to something similair to what you have suggested and changed to hotkeys.

.

Link to comment
Share on other sites

i cant stop playing it :(

is there a way to get down of the "drug"?? =D

<{POST_SNAPBACK}>

This is the first game that after all of the testing I am not burnt out on palying. Like after making hangman, I didn't even want to play it any more because of all of the testing. By the way, don't OD on this version of snake because the next version is going to be a harder drug for your :( . By the way things are looking with the next version, you will be able to play over five different ways by setting your game play options.

.

Link to comment
Share on other sites

Playing? Never.. I spend more time Playing.. ups, I mean Testing, yeah, that it, Testing, than I spend coding, LOL.

New release with gameplay options, levels, mazes available now!

Thanks to Burrup for the maze images

Thanks to everyone on the forum for general participation.

Check it out, bug reports, enthusiastic praise, and other comments are welcome.

snake_1.2.Au3

601DisengageEnd Program

Link to comment
Share on other sites

Glad to help :(. I really like the options now; Level, Maze, Speed. It gives the user more freedom to set it was they are/were used to playing snake.

<{POST_SNAPBACK}>

The maze was ultimately your inspiration, if you hadn't sent the images they probably wouldn't have happened. Thats why you got the extra 'thanks' line.

Two more mazes are already in the code, but unused yet. Uncomment line 581 if you don't like the snake length not resetting between levels. That will be a start-up option next release.

Need some feedback on how score is calculated.

601DisengageEnd Program

Link to comment
Share on other sites

Hey guys... Sorry, I didn't check in here earlier, but it seems to be the popular topic... I didn't read it all, but I downloaded it and it's fascinating! Keep up the good work, as many have said, I find myself playing this a lot too!! :(

FootbaG
Link to comment
Share on other sites

Hey guys... Sorry, I didn't check in here earlier, but it seems to be the popular topic... I didn't read it all, but I downloaded it and it's fascinating! Keep up the good work, as many have said, I find myself playing this a lot too!! :(

<{POST_SNAPBACK}>

I am glad you like the game. Thank you for the good remarks and the reply.

P.S. If anyone has any suggestions, please give them.

.

Link to comment
Share on other sites

lol

my wrist hurts, 'cause i played the new version about 3 hours without any pause....

man that game makes me horny =D ;-D

<{POST_SNAPBACK}>

Three hours of playing with the snake would make my wrists hurt too. :(

I am glad you like the game. just so you know we(smed and me) have 10 working mazes so far; for the next version. So, go see a doctor about your wrists.

.

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...