Computer Science Canada Snake program |
Author: | white_dragon [ Sat Feb 07, 2004 5:13 pm ] |
Post subject: | Snake program |
tis is my snake program but i dunno how to make it so than 2 ppl can press a key at the same time and the snake moves. also, i dunno how i make it so when a person collides with the other person, it stops. can someone help me? . i am hopelessly confused. i only spent about 3 months in turing............ |
Author: | Andy [ Sat Feb 07, 2004 5:14 pm ] |
Post subject: | |
read up on Input.Keydown |
Author: | white_dragon [ Sat Feb 07, 2004 5:18 pm ] |
Post subject: | |
tks. but i still dunno how 2 put it back into da program |
Author: | santabruzer [ Sat Feb 07, 2004 5:37 pm ] | ||
Post subject: | |||
... enjoy:
|
Author: | Paul [ Sat Feb 07, 2004 5:39 pm ] | ||
Post subject: | |||
This is the basic movement with Input.KeyDown
Edit: Darn it, santabruzer is faster again... I was experimenting with erasing its tail after its gone a bit. |
Author: | white_dragon [ Sat Feb 07, 2004 5:39 pm ] |
Post subject: | |
lol tks. i got some lines from ur program and got da idea. but i still don't how 2 make some borders so it doesn't go past it. |
Author: | santabruzer [ Sat Feb 07, 2004 5:43 pm ] |
Post subject: | |
the hardest thing in this program.. was the fact that you have to keep the snake size.. i was thinking of using a flexible array, when i attacked the challenge.. and then i got bored.. was i on the right path? |
Author: | Paul [ Sat Feb 07, 2004 5:45 pm ] |
Post subject: | |
Hehe, I have no idea, I thought about storing the co-ordinates in an array or something, then when the snake went a certain distance, you'd draw white dots at those previous coordinates, but my idea is probably stupid. |
Author: | Cervantes [ Sat Feb 07, 2004 5:52 pm ] |
Post subject: | |
do it the whatdotcolour way in the Input.KeyDown part, whenever an arrow key is hit, a counter goes up. you'd need an array to hold the x and y values of the snake's body circles thingys. then when the counter = 10 or whatever, make the counter go down by 1 (so it = 9) and draw a white dot over the last x and the last y in the array. for collisions, use whatdotcolour |
Author: | white_dragon [ Sat Feb 07, 2004 6:02 pm ] |
Post subject: | |
thank u all sincerely for your help! i come here very often 2 look for help n i always get it!!!!!!!!!!1 u guys are all so nice. i'm only 11 years old n my class mates n teacher hate me. i guess tat's how life is.......... *sigh* tks for all the help |
Author: | recneps [ Sun Feb 08, 2004 4:08 pm ] |
Post subject: | |
you can take turing at 11 yrs old?! and for the keydow with more than one person, you gotta put each if statement separately (if blah end if if blah end if) |
Author: | the_short1 [ Sun Feb 08, 2004 6:07 pm ] |
Post subject: | |
nice... Post as a .exe when its done... it willl be a hit with my sis.. shes addicted to that Game..... |
Author: | white_dragon [ Mon Feb 09, 2004 4:37 pm ] |
Post subject: | |
yeah. i did skip tat many grades. lol |
Author: | the_short1 [ Mon Feb 09, 2004 5:03 pm ] |
Post subject: | |
crazy.... i think it would kind of suck to be that young in high school.... everyone would think u a weak little sh!t cuz ur younger and start beating you up....... but then u got braging rights to be smarter then people that are like 4 years older then you.. hahhahah.... Anyway.... it would be kinda cool if you made you steps in incriments Maybe integrate into this.... I think it is a Wicked Grid program and the movement rocks.... Also a idea....<<ask the user to input player 1 Color,name, and player 2 name and color... then when you crash you can say who lost... and to colorfy it too....Have FUn.,.,.,. |
Author: | Paul [ Mon Feb 09, 2004 5:04 pm ] |
Post subject: | |
Ah, my eyes, you can't look at that program for too long, the lines are too close together. And it says battleship . |
Author: | the_short1 [ Fri Feb 13, 2004 5:18 pm ] |
Post subject: | |
i got it off compsci while back,.,...i like it cuz of smooth movement... i forget who made it.... |