# I just want to create Snake Game in Visual Basic



## RaoPatel (Jan 22, 2012)

*I just want to create this game in Visual Basic*

Hey friends, i have the good java coding knowledge and i am quite interested with this VB IDE. because of it's simplicity. So i just trying to create Snake game in this API. but however i don't have that much of information. I get some ideas and concept over here Snake Game Logic, :dance: this really helps but i just want to know more :thumb: so if any ideas or help for this then please help.


----------



## TLF_KoBE (Jan 23, 2012)

I've done something like this in Visual Basic .Net

If you have good java knowledge then why not code something like this in C#? It shares the same IDE as VB.Net and has similar syntax to that of Java.

Have you tried coding this on your own? If so where are you at on it? I could simply link you to my source but that wouldn't be beneficial to you if you are trying to learn!


----------



## RaoPatel (Jan 22, 2012)

Thanks for your suggestion TLF_KoBE, but however i just need some logic and some easy concept for creating this project. I just want to know from where i should start this project. :blush:


----------



## TLF_KoBE (Jan 23, 2012)

What I did with mine was this:


I had two timers
One that drew a snake on the form
Each timer tick checked for food/snake collision
 
One that erased the snakes tail as it moved
 
I had two arrays that stored the coordinates (for the erase line to follow)
One that held the x-coordinates
One that held the y-coordinates
 
I used an integer to store the distance that the erase line followed the snake line. Each food collision increased the gap.
I kept track of the snake direction by remembering the lastKey pressed
Is this enough to get you started? If you would like pseudo code or some specific code examples then let me know.


----------

