The case 'Press a' is inside the "Key Press" event for the the "Form Events". To get to this sub you need to select from the Drop down "Form Events" on the left, and the then "Key Press" on the drop down on the right. To answer the second question, I use this to teach grade 10 high school, 15 year olds.
The score is actually pretty simple. Whenever the head of the Snake hits mouse you need to increment the score. So, something like: Score.text += 10 This would increase the score by 10. And you would place it in the Collission withmouse sub.
It is in the drop down window on the RIGHT. The drop down window on the LEFT needs to set to FORM EVENTS, I just added a link in the Video Description, it has some screen shots. In the screen shots I use the click event. So in this case you will need to select Key Press not Click
Great vid Corbin By the way im trying to do this in Vb 6.0 and when i try to create the head (im using shapes instead of pictureboxes) gives me Error "91", im working with "with" too and the error is in this line With Vibora(tamano) .height = 300 when i play it, its says Object variable or With block variable not set (Error 91) even though i've created an array (i declared it as shape) . Please help me!! i'm trying to do this game for a long time.
Hey corbin. Congratulations by the game. I do it, and it works correctly, I do some adds to it, and I wannsa do other, but i need your help to do it. I wanna do a Restart button, that i click it and the snake is on the middle of the field, and the lengt of snake = 2 (just like you start the game). I try many and many times to do it alone but I can't.
Hi I've been trying to follow this tutorial to incorporate it into a school assignment and it was working up until the keypress. My knowledge with code is really basic, is there something I'm missing?
When you run the program, does it throw back an error, or does the snake not respond to you pressing on the keyboard? If it is the latter; some common errors are caps lock, and a button on the form, taking the focus away from the keyboard.
I just didn't know how to do a keypress but I figured that out after re-watching it a couple of times. The only issue now is that when I run the program and start to move the snake it just starts moving off the picture box. I'm assuming the second video is where you go through how to create boundaries for it? or have I stuffed up again?
thank you very much . It is very useful for my school project . But I find a bug and i don't know how to solve it .I have create a button to start the game. After I lose the game first time, I restart the game ,and it will appear you lose immediately
+Ben Hart It is hard to understand your question. I think you meant to ask "Why don't you show, yourself playing the game?" If that is what you meant then you may want to check the first 10 seconds of the video. By the way you don't have to yell.
"Hope you can hear me"
Actually, my ears are destroyed.
Thankyou so much it helped me with my school works
Wow amazing tutorial! Thank you:)
we need more rolling and coding videos.*dabs*
The case 'Press a' is inside the "Key Press" event for the the "Form Events". To get to this sub you need to select from the Drop down "Form Events" on the left, and the then "Key Press" on the drop down on the right. To answer the second question, I use this to teach grade 10 high school, 15 year olds.
The score is actually pretty simple.
Whenever the head of the Snake hits mouse you need to increment the score.
So, something like:
Score.text += 10
This would increase the score by 10. And you would place it in the Collission withmouse sub.
can you please write the full code here? it's a bit hard to understand what you just shared
Thanks man, great tutorial.
thank you.. i like the way you explain..
thank for video. from venezuela.
thanks sir! Great tutorial
It is in the drop down window on the RIGHT. The drop down window on the LEFT needs to set to FORM EVENTS, I just added a link in the Video Description, it has some screen shots. In the screen shots I use the click event. So in this case you will need to select Key Press not Click
I get the error message end of statement expected
select case e.KeyChar
*Case "a" left_right_mover = -10*
end select
end sub
Great job. its working well. but how can i add the score and start button
How would you add multiple body parts to the snake? Right now I'm working on it and I can only move one piece.
Yo, can you put the code on the website? I think it would be a bit easier to follow along.
Great vid Corbin
By the way im trying to do this in Vb 6.0 and when i try to create the head (im using shapes instead of pictureboxes) gives me Error "91", im working with "with" too and the error is in this line
With Vibora(tamano)
.height = 300
when i play it, its says Object variable or With block variable not set (Error 91)
even though i've created an array (i declared it as shape) . Please help me!! i'm trying to do this game for a long time.
How to make it so the snake goes out of the other side of the border when hitting the other side?
Have a read here: boughen.wikispaces.com/Wrap+Character+Around+the+Form
Corbin Boughen Thanks for the quick response, but I already succeeded. I created a new private sub, but i didn't give him a calling.
Hey corbin.
Congratulations by the game. I do it, and it works correctly,
I do some adds to it, and I wannsa do other, but i need your help to do it.
I wanna do a Restart button, that i click it and the snake is on the middle of the field, and the lengt of snake = 2 (just like you start the game).
I try many and many times to do it alone but I can't.
what part of the video wherr you put a code on scoreboard ?
Hi I've been trying to follow this tutorial to incorporate it into a school assignment and it was working up until the keypress. My knowledge with code is really basic, is there something I'm missing?
When you run the program, does it throw back an error, or does the snake not respond to you pressing on the keyboard?
If it is the latter; some common errors are caps lock, and a button on the form, taking the focus away from the keyboard.
I just didn't know how to do a keypress but I figured that out after re-watching it a couple of times. The only issue now is that when I run the program and start to move the snake it just starts moving off the picture box. I'm assuming the second video is where you go through how to create boundaries for it? or have I stuffed up again?
Is it possible to have an image for the mouse?
thank you very much . It is very useful for my school project . But I find a bug and i don't know how to solve it .I have create a button to start the game. After I lose the game first time, I restart the game ,and it will appear you lose immediately
I'm not sure if I wanna try this. It's quite complicated.
Hi, Im still teaching myself VB. Why do you write -1 at 4:07 ? Thanks
i havent try it but my VB version is 2008's. will the codes work on my VB?
Winston Talim ya you should be good.
Corbin Boughen thanks man👍
Can you Give us Tutorial of the SCORE CODE?
where is the keypress form event... driving me crazy
15?...well..im 17 and at the moment with my class we are studying the loops...well how can that be? next year we will be studying PASCAL..
Can I have copy of this game?
thank u.
What is a region ?
c or c++ ??
Sorry the computer I had it on got stolen!
thats a big OOF man
can you send me the code?
William Lu sorry, I lost the laptop I wrote it on
Can you send me the code? thanks :b
WHY DIDNT U SHOW US YOU PLAY THE GAME!?!?!?!?!?!?!?!? jk
+Ben Hart It is hard to understand your question. I think you meant to ask "Why don't you show, yourself playing the game?" If that is what you meant then you may want to check the first 10 seconds of the video. By the way you don't have to yell.
@@CoachBoughen 3 years late, but he said jk
thank you.. i like the way you explain..
Can you Give us Tutorial of the SCORE CODE?