VB.net Game of Snake

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ก.พ. 2025

ความคิดเห็น • 52

  • @xyon9090
    @xyon9090 7 ปีที่แล้ว +9

    "Hope you can hear me"
    Actually, my ears are destroyed.

  • @johncrw4794
    @johncrw4794 4 ปีที่แล้ว

    Thankyou so much it helped me with my school works

  • @dulnar8672
    @dulnar8672 7 ปีที่แล้ว

    Wow amazing tutorial! Thank you:)

  • @steamwhale3720
    @steamwhale3720 6 ปีที่แล้ว

    we need more rolling and coding videos.*dabs*

  • @CoachBoughen
    @CoachBoughen  12 ปีที่แล้ว

    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.

  • @CoachBoughen
    @CoachBoughen  11 ปีที่แล้ว +1

    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.

    • @candoradavid112
      @candoradavid112 9 หลายเดือนก่อน

      can you please write the full code here? it's a bit hard to understand what you just shared

  • @costapolidoros9743
    @costapolidoros9743 8 ปีที่แล้ว

    Thanks man, great tutorial.

  • @bhaumikpatel3386
    @bhaumikpatel3386 9 ปีที่แล้ว

    thank you.. i like the way you explain..

  • @apocalipsisegrr
    @apocalipsisegrr 9 ปีที่แล้ว

    thank for video. from venezuela.

  • @davejordansalazar3313
    @davejordansalazar3313 8 ปีที่แล้ว

    thanks sir! Great tutorial

  • @CoachBoughen
    @CoachBoughen  11 ปีที่แล้ว

    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

  • @killerbee2012
    @killerbee2012 8 ปีที่แล้ว +1

    I get the error message end of statement expected
    select case e.KeyChar
    *Case "a" left_right_mover = -10*
    end select
    end sub

  • @candoradavid112
    @candoradavid112 9 หลายเดือนก่อน

    Great job. its working well. but how can i add the score and start button

  • @rsisthecoolest
    @rsisthecoolest 7 ปีที่แล้ว

    How would you add multiple body parts to the snake? Right now I'm working on it and I can only move one piece.

  • @cheepdude97
    @cheepdude97 11 ปีที่แล้ว +1

    Yo, can you put the code on the website? I think it would be a bit easier to follow along.

  • @charlieCmC17
    @charlieCmC17 10 ปีที่แล้ว

    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.

  • @igalko9320
    @igalko9320 8 ปีที่แล้ว

    How to make it so the snake goes out of the other side of the border when hitting the other side?

    • @CoachBoughen
      @CoachBoughen  8 ปีที่แล้ว

      Have a read here: boughen.wikispaces.com/Wrap+Character+Around+the+Form

    • @igalko9320
      @igalko9320 8 ปีที่แล้ว

      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.

  • @rubenmatos7197
    @rubenmatos7197 10 ปีที่แล้ว

    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.

  • @arvinbanzuela
    @arvinbanzuela 7 ปีที่แล้ว

    what part of the video wherr you put a code on scoreboard ?

  • @All4U190
    @All4U190 8 ปีที่แล้ว

    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?

    • @CoachBoughen
      @CoachBoughen  8 ปีที่แล้ว

      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.

    • @All4U190
      @All4U190 8 ปีที่แล้ว

      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?

  • @SuperMarlysaa
    @SuperMarlysaa 8 ปีที่แล้ว

    Is it possible to have an image for the mouse?

  • @tszyeunghung5368
    @tszyeunghung5368 10 ปีที่แล้ว

    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

  • @XTheDarknessOfLightX
    @XTheDarknessOfLightX 12 ปีที่แล้ว

    I'm not sure if I wanna try this. It's quite complicated.

  • @MrLiamfa
    @MrLiamfa 12 ปีที่แล้ว

    Hi, Im still teaching myself VB. Why do you write -1 at 4:07 ? Thanks

  • @Winniethepoohfan
    @Winniethepoohfan 7 ปีที่แล้ว

    i havent try it but my VB version is 2008's. will the codes work on my VB?

    • @CoachBoughen
      @CoachBoughen  7 ปีที่แล้ว

      Winston Talim ya you should be good.

    • @Winniethepoohfan
      @Winniethepoohfan 7 ปีที่แล้ว

      Corbin Boughen thanks man👍

  • @ashuraboy111
    @ashuraboy111 11 ปีที่แล้ว

    Can you Give us Tutorial of the SCORE CODE?

  • @ccbaseball1998
    @ccbaseball1998 11 ปีที่แล้ว

    where is the keypress form event... driving me crazy

  • @Sonatarium
    @Sonatarium 12 ปีที่แล้ว

    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..

  • @FatheJeribi
    @FatheJeribi 11 ปีที่แล้ว

    Can I have copy of this game?
    thank u.

  • @mohamadayman514
    @mohamadayman514 6 ปีที่แล้ว

    What is a region ?

  • @vickeynwokolo8383
    @vickeynwokolo8383 7 ปีที่แล้ว

    c or c++ ??

  • @CoachBoughen
    @CoachBoughen  11 ปีที่แล้ว

    Sorry the computer I had it on got stolen!

  • @williamlu2578
    @williamlu2578 8 ปีที่แล้ว

    can you send me the code?

    • @CoachBoughen
      @CoachBoughen  8 ปีที่แล้ว +1

      William Lu sorry, I lost the laptop I wrote it on

  • @brunosetubal1996
    @brunosetubal1996 11 ปีที่แล้ว

    Can you send me the code? thanks :b

  • @benhart1374
    @benhart1374 8 ปีที่แล้ว

    WHY DIDNT U SHOW US YOU PLAY THE GAME!?!?!?!?!?!?!?!? jk

    • @CoachBoughen
      @CoachBoughen  8 ปีที่แล้ว +1

      +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.

    • @couldntthinkofaname5731
      @couldntthinkofaname5731 5 ปีที่แล้ว

      @@CoachBoughen 3 years late, but he said jk

  • @bhaumikpatel3386
    @bhaumikpatel3386 9 ปีที่แล้ว

    thank you.. i like the way you explain..

  • @karthikabca7445
    @karthikabca7445 7 ปีที่แล้ว

    Can you Give us Tutorial of the SCORE CODE?