Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Grid Snake
Index -> Programming, Turing -> Turing Submissions
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Mr. T




PostPosted: Sun Nov 06, 2005 7:53 pm   Post subject: Grid Snake

Last year, for my grade 10 FP, I made Uncle Worm (basically Snake with a few modifications) but I had no time to implement a grid system, as suggested by others. Anyway, I decided to try out the grid (shown to me by jamonathin), and turn it into a working snake game. So here (attached file) is snake at its most basic level. I will add updates when I find the time.
Note: In my version, you are allowed to go through walls without losing a life. Wink



GridSnake.zip
 Description:
:)

Download
 Filename:  GridSnake.zip
 Filesize:  275.41 KB
 Downloaded:  476 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Sun Nov 06, 2005 8:11 pm   Post subject: (No subject)

Not bad, you could try to improve response/reaction time though. Not much to say... An alright beginning, you don't really need to see the grid though...
Mr. T




PostPosted: Sun Nov 06, 2005 8:13 pm   Post subject: Alex's Opinion

1. I used the grid just to show (visually) that all the elements of the game correspond to the grid.
2. Ya, I noticed that it is difficult to make sharp turns. Why could that be?
3. I tried using whatdotcolour to prevent food being drawn on the snake's body, but to no avail. Why could that be?
MysticVegeta




PostPosted: Mon Nov 07, 2005 8:08 pm   Post subject: (No subject)

I never die.
Cervantes




PostPosted: Mon Nov 07, 2005 8:27 pm   Post subject: Re: Alex's Opinion

Pwned wrote:
1. I used the grid just to show (visually) that all the elements of the game correspond to the grid.
2. Ya, I noticed that it is difficult to make sharp turns. Why could that be?
3. I tried using whatdotcolour to prevent food being drawn on the snake's body, but to no avail. Why could that be?

2. Probably due to keys being pressed when the delay is going on. Check out how I solved this problem in my snake.

3. Possibly problems with when you're drawing and when you're updating and when you're whatdotcolour checking. But the bottom line is: Don't use whatdotcolour! A grid system makes condition checking collision exceedingly easy.

Disclaimer: I have not run the program.
Mr. T




PostPosted: Mon Nov 07, 2005 9:16 pm   Post subject: Alex's Opinion

MysticVegeta wrote:
I never die.

Confused
[Gandalf]




PostPosted: Mon Nov 07, 2005 9:56 pm   Post subject: Re: Alex's Opinion

Pwned wrote:
MysticVegeta wrote:
I never die.

Confused

Laughing
I can't remember, but it is either impossible or very hard to lose in your game...
Mr. T




PostPosted: Mon Nov 07, 2005 10:23 pm   Post subject: Alex's Opinion

Run into yourself, and your death shall be quick and painless. Laughing
Sponsor
Sponsor
Sponsor
sponsor
MysticVegeta




PostPosted: Mon Nov 07, 2005 11:45 pm   Post subject: (No subject)

here is how I calculated the probabilty of running into your self:

Some factors are:

1) Immediate turns

I think thats the only thing that can cause running into oneself
lets further view that shall we?

When do you take immediate turns?

1) food spawns really close to the previous one

probabilty of that is 1/10 = 10 percent

also, when you take immediate turn because the food is spawned near it, what are the probabilty that when you take a double turn you hit yourself which means that your length is great. Great length probabilty is indeterminate because the length keeps on increasing so i would say the probability of you hitting yourself is somewhere around 5-10%

Which means winnning chances are 90-95%. Sorry if this was offensive to teh creator. did i win?
Mr. T




PostPosted: Tue Nov 08, 2005 8:29 pm   Post subject: Alex's Opinion

There is no 'winning,' only losing. As your snake grows larger, it becomes easier to get entangled in yourself and die.
MysticVegeta




PostPosted: Tue Nov 08, 2005 9:58 pm   Post subject: (No subject)

I assume for the player that by that time i.e reaching a large large size, the player will be bored to death because he hadn't died once. So will automatically quit the program, thats a win for the user/game.
Mr. T




PostPosted: Tue Nov 08, 2005 11:09 pm   Post subject: Alex's Opinion

Getting bored of a classic game like snake is communism, Stalin.
MysticVegeta




PostPosted: Wed Nov 09, 2005 2:47 pm   Post subject: (No subject)

Each game has a critical level where the person gets bored, no matter what game it is, XBox, ps2, pc, each game does. No offense but this game shows a little more symptons
Mr. T




PostPosted: Wed Nov 09, 2005 4:00 pm   Post subject: Alex's Opinion

Maybe if you have the attention span of a dead animal.
Cervantes




PostPosted: Wed Nov 09, 2005 4:31 pm   Post subject: (No subject)

Can we cut back on the harshness, Pwned? MysticVegeta is only offering constructive criticism.

On another note:
Pwned wrote:

There is no 'winning,' only losing.

What if you fill the map up with yourself? You'd die the next step, but I think that should constitute a win. Smile
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 20 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: