Snake Game project
Author |
Message |
bigr
|
Posted: Thu Apr 15, 2004 8:50 am Post subject: Snake Game project |
|
|
i talked to my teacher about doing this snake game in turing.
http://www.addictinggames.com/worm.html
i notice that on all the tutorials and already posted "snake help" topics, every game is the one where u get food and u get longer. how would i make the code so that the walls are random (but no too hard) and the snake moves up when the left mouse button is clicked and falls down when the left click isn't down. would this involve using a grid like idea for the other snake games.
this is also my first year programming in computer science so bare with me. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu Apr 15, 2004 8:57 am Post subject: (No subject) |
|
|
zylum has a nice snake game writen...
anyways, for walls you just use random
code: |
myGrid(Rand.Int(1,width),Rand.Int(1,height)) := "wall"
|
where myGrid is your 2D array for the playfield.
as for mouse controls
code: |
var x,y,b:int
loop
Mouse.Where(x,y,b)
if b then
put "mouse down"
else
put "mouse up"
end if
end loop
|
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
|
|