Snake Game

How to program using vb 2005

Page 1 of 1

11 Replies - 15262 Views - Last Post: 05 March 2010 - 06:38 AM Rate Topic: -----

#1 fearless901  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 10-May 07

Snake Game

Posted 10 May 2007 - 10:27 PM

i need help programming a snake game step by step can anyone help me out :) im using visual basics 2005 Thanks you

This post has been edited by fearless901: 10 May 2007 - 10:45 PM

Is This A Good Question/Topic? 0
  • +

Replies To: Snake Game

#2 capty99  Icon User is offline

  • i am colt mccoy
  • member icon

Reputation: 98
  • View blog
  • Posts: 10,081
  • Joined: 26-April 01

Re: Snake Game

Posted 10 May 2007 - 11:24 PM

i could.
but then you double posted.
Was This Post Helpful? -2
  • +
  • -

#3 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Snake Game

Posted 10 May 2007 - 11:46 PM

I will give you a shove in the right direction.

1. You will need to dynamically create an array of label controls for the game board. 15 x 15 labels is a good place to start, although you can make the board any size you want.
2. You will need an array of integers to represent the snake on the board.
3. You will need to randomly create an apple at different points on the board. When I created mine I just used the "@" symbol for the apple.
4. You will need to specify a color for the board and a different color for the snake. You will use the BackColor of the labels to set the length of the snake.
5. You will need a timer to control when the snake will move.
6. You will need to check for two possible things that will end the game. If the snake hits a wall or if it hits itself.
7. For each apple the snake eats, the length of the snake will increase by one.
8. You will want to track how long the snake gets in order to supply a score for the user.
9. If you use the arrow keys to control the snake then you will need to override the ProcessCmdKey event. However, if you use letters on the keyboard then you can use the KeyPress or KeyDown events.

It really isn't super hard, but will require some serious thought into the mechanics of the game.

Once you get it completed you will end up with something like this screenshot.

Attached image(s)

  • Attached Image

Was This Post Helpful? 4

#4 fearless901  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 10-May 07

Re: Snake Game

Posted 11 May 2007 - 09:58 AM

View Postfearless901, on 10 May, 2007 - 10:27 PM, said:

i need help programming a snake game step by step can anyone help me out :) im using visual basics 2005 Thanks you



yea i know i tried to delte the post on the visual basics but didnt know how to :( sry about the double post

and thxs jayman9 ill try to start working on it :)

This post has been edited by fearless901: 11 May 2007 - 09:59 AM

Was This Post Helpful? 0
  • +
  • -

#5 maganga  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 26-July 07

Re: Snake Game

Posted 26 July 2007 - 06:32 PM

please teach me the codes of snake game i badly neeed it. Using visual basic version 6.0
Was This Post Helpful? 0
  • +
  • -

#6 phongbuj  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-October 09

Re: Snake Game

Posted 08 October 2009 - 03:57 AM

please give source
Was This Post Helpful? 0
  • +
  • -

#7 Guest_CantStandJerks*


Reputation:

Re: Snake Game

Posted 20 February 2010 - 08:42 AM

View Postcapty99, on 10 May 2007 - 10:24 PM, said:

i could.
but then you double posted.



What an arrogant JERK you are!
Was This Post Helpful? 0

#8 capty99  Icon User is offline

  • i am colt mccoy
  • member icon

Reputation: 98
  • View blog
  • Posts: 10,081
  • Joined: 26-April 01

Re: Snake Game

Posted 24 February 2010 - 12:29 PM

View PostCantStandJerks, on 20 February 2010 - 08:42 AM, said:

View Postcapty99, on 10 May 2007 - 10:24 PM, said:

i could.
but then you double posted.



What an arrogant JERK you are!


welcome new guy who as a guest has never contributed to the site or wants to remain anonymous. how about you send me a pm next time to express your feelings and get the true story. or continue being an internet dumbass.
Was This Post Helpful? 0
  • +
  • -

#9 andik666@gmail.com  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 1
  • Joined: 25-February 10

Re: Snake Game

Posted 25 February 2010 - 01:20 AM

i love programming
Was This Post Helpful? -2
  • +
  • -

#10 morningloryy  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 1
  • Joined: 01-March 10

Re: Snake Game

Posted 01 March 2010 - 07:36 PM

yo yo home dawg wats crackin
Was This Post Helpful? -2
  • +
  • -

#11 williamgeorgegardner  Icon User is offline

  • CEO of GeekTelligence
  • member icon

Reputation: 19
  • View blog
  • Posts: 584
  • Joined: 27-December 09

Re: Snake Game

Posted 03 March 2010 - 09:57 AM

View Postphongbuj, on 08 October 2009 - 02:57 AM, said:

please give source

We can't just give you source code, you should at least make a good faith effort to do it yourself and then we can help out with any errors or any problems you run in to and you wont learn any thing if we just give you source code.
Was This Post Helpful? 1
  • +
  • -

#12 PlasticineGuy  Icon User is offline

  • mov dword[esp+eax],0
  • member icon

Reputation: 281
  • View blog
  • Posts: 1,436
  • Joined: 03-January 10

Re: Snake Game

Posted 05 March 2010 - 06:38 AM

What the hell is it with this topic and spam?
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1