OpenGL & C++ game programming ( snake game) tutorial ( 2D ) | PART 7 | Snake body - playproduction.de

OpenGL & C++ game programming ( snake game) tutorial ( 2D ) | PART 7 | Snake body

The Pentamollis Project
Views: 14128
Like: 173
———-PART 7————-
This is the final video in this series. We will now finish drawing the snake body and also set the scoring system in this part.

25 Comments

  1. Hi…Great game…I downloaded the snake archive and when i try to play the game i received an error. I tried everything.
    Can you send me the game or the source code. I need it for my school project. Thank you very much….here is my email address
    [email protected]…..and i want to talk more about this work!!! Please

  2. Thank you so much! you deserve more subscriber and view.
    btw i want to add new feature to the game like when the head hit the body, the game will end too but im not so sure how to do that. Can u give me some hint to start on that?
    Thank you again!

  3. Hi! I just wanted to add another feature to the game. How do you increase the speed of the game every time the snake eats food?

  4. I'm sorry I forgot to implement the tail collision in the tutorial.
    Put the following block of code in your drawSnake() function (after you have finished drawing the snake):

    for(int j=1;j<snake_length;j++)
    {
    if(posX[j]==posX[0] && posY[j]==posY[0])
    gameOver=true;
    }

    This ends the game when the snake hits its own body.

  5. 'itoa','strcat','MessageBox' was not declared in this scope. How can I fix this problem ?

  6. thanks bro , this was so helpful.
    concerning the random function , i think that there is a possibility that it generates a position which is the snake's position(head or body) , so that the snake will be drawn over the food.
    if this is possible , is there anyway to avoid that ?

  7. But what if i want to make a function to reset the game?

  8. I loved the game as I played this game many times when I was a child.
    Currently I am learning to make games using OpenGL and this is my first 2D game tutorial.
    Thanks buddy for the tutorial.

  9. hello how can i define itoa. its giving me the error that itoa cannot be used as a function.

  10. Brother i want to change the background to white color.. so that the boxes matrix wont be show up

  11. Brother make this : if snake touches its body, then the game is over

  12. thank you Ratul for helping me to code this snake 2d game but i got an error for itoa() function the message was that itoa() is not declared under the scope i don't know why??

  13. Vi cada vídeo por completo, muchas gracias!!!

  14. Great work👍👌 This is my first 2D game tutorial. I enjoyed coding for my first game with you. Thank you so much. Keep up the good work.

  15. Great tutorial series, really helped me with using glut

  16. Thanks for helping me make my first 2D game with legacy OpenGL and glut, I can now work on my mini-project for this semester.

  17. thx you very much 🙂 i know now how to draw score:)

  18. thks I followed step_by_step and I get to finish my first open_gl 2d game

  19. i do not have the function itoa :c how i can d that in this case?

Leave a Reply

Your email address will not be published.