August 25, 2020
  • 7:34 am Cách tách gộp ô trong Excel – How to Merge Cells in Excel
  • 7:23 am Cách xem mật khẩu wifi cho điện thoại Samsung , Oppo, wifi Tenda , iPhone| Dương Văn An
  • 7:10 am HƯỚNG TẢI NHẠC YOUTUBE VỀ MÁY TÍNH DẠNG FILE ZING MP3 ĐƠN GIẢN NHẤT
  • 6:58 am One Punch Man – Tập 05 [Việt sub] [Bản giới hạn]
  • 6:43 am Bài tập Excel nâng cao có hướng dẫn giải [Cực Hay]



C++ Tutorial 18 – Simple Snake Game (Part 1)

Welcome to my simple game tutorial on C++. In this tutorial i will going to show you how to make a fun snake game.

We will structure the code of the game and do some basic drawing in the console.

Source code:
Finished game:
Download link for visual studio 2012 express:

Great C++ books that I recommend for beginners:
C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart (3rd Edition)

C++ Primer Plus (6th Edition) (Developer’s Library)

Programming: Principles and Practice Using C++ (2nd Edition)

If you have any questions I’ll be glad to answer, please leave a comment on the video.

Thanks for watching and please subscribe.

Nguồn: https://alimentproteine.com/

Xem thêm bài viết khác: https://alimentproteine.com/cong-nghe/

admin

RELATED ARTICLES

40 COMMENTS

  1. Denis Marku Posted on June 28, 2020 at 6:19 pm

    I put the code in C++ star codin but when visual analize the code.. the code #include always comes as an error…. plus when i wanna start checkin the game if is goin good i just get 1 error after an other… my visual just doesnt go well !!! Always when i wanna start clang error comes up ?! Help

    Reply
  2. best bottle Posted on June 28, 2020 at 6:19 pm

    i think to use random function we have to use #include <cstdlib> …but he didn't use it .. why?

    Reply
  3. Darks Posted on June 28, 2020 at 6:19 pm

    my visual studio says that it doesn't recognize: identifier "end1" is undefined

    Reply
  4. kiPRO BRoos Posted on June 28, 2020 at 6:19 pm

    Da li si ti mozda sa Balkana? Poz.

    Reply
  5. Nazish Nazish Posted on June 28, 2020 at 6:19 pm

    Pls tell me why we use the bool game over

    Reply
  6. Ryan Cao Posted on June 28, 2020 at 6:19 pm

    why does the finished game link to go porn

    Reply
  7. Gonzalo Rosario Posted on June 28, 2020 at 6:19 pm

    Im use to code in game maker studio, I found your tutorial very nice to a pure c++ introduction. Great Work!

    Reply
  8. MooN Posted on June 28, 2020 at 6:19 pm

    акцент похож на русский

    Reply
  9. mario kart Posted on June 28, 2020 at 6:19 pm

    To those of you on unix, I provide this snake game ported to ncurses!
    https://pastebin.com/uJF4AqUy
    (note, if you're compiling with gcc make sure you use "-l ncurses" or you'll get a linker error)

    Reply
  10. Animal king Posted on June 28, 2020 at 6:19 pm

    That website in the description is crusty.

    Reply
  11. MarkoXyz Posted on June 28, 2020 at 6:19 pm

    Thanks for tutorial. Are you from Balkan

    Reply
  12. Eu Da,eu Posted on June 28, 2020 at 6:19 pm

    error: use of undeclared identifier 'sleep'
    sleep(10);
    ^
    what
    i'm on linux

    Reply
  13. Black Engineering Student Posted on June 28, 2020 at 6:19 pm

    Another way to write the inner loop for the two side walls is
    if(j == 0 || j == width – 1)

    cout<<'#';

    else cout<<" ";

    Reply
  14. Nitish kumar Posted on June 28, 2020 at 6:19 pm

    Can you please tell me how can I set up my vscode for c++ coding

    Reply
  15. Sufy zed Posted on June 28, 2020 at 6:19 pm

    can anyone else hear 2 girls 1 cup in the intro music 😂

    Reply
  16. Aliah Mawadah I8I0I2I5 Posted on June 28, 2020 at 6:19 pm

    I like your content, but you exhale too much and that sounds quite annoying..

    Reply
  17. olimp 006 Posted on June 28, 2020 at 6:19 pm

    Are u Russian?

    Reply
  18. Tech Support & Gaming With Jawad Posted on June 28, 2020 at 6:19 pm

    how to stop that flicking
    help

    Reply
  19. Muhammad 'Ammar Posted on June 28, 2020 at 6:19 pm

    Hi, can you provide the link for me to download the c++ for free? I am interested to learn! Thanks

    Reply
  20. gamer Posted on June 28, 2020 at 6:19 pm

    thank you soooooooooooooooooooooooooooo much for your lesson

    Reply
  21. Arnold Imreh Posted on June 28, 2020 at 6:19 pm

    Very helpfull man I love you!

    Reply
  22. GD Spam King Posted on June 28, 2020 at 6:19 pm

    i like making games because you can add ANYTHING

    Reply
  23. Goose Moose Posted on June 28, 2020 at 6:19 pm

    i don't understand void someone explains
    pls

    Reply
  24. Gamerisaac2011 Posted on June 28, 2020 at 6:19 pm

    Does it work On Mac?

    Reply
  25. newraozx Posted on June 28, 2020 at 6:19 pm

    Loved the contents simple and straight to the point..please uploading !

    Reply
  26. BOT 1 Posted on June 28, 2020 at 6:19 pm

    Ummm I think your first link gave me a virus. Did u put that there?

    Reply
  27. Viktor Kocián Posted on June 28, 2020 at 6:19 pm

    I am using Clion in Linux and system("clear") doesn't work in terminal(IDE, Linux Terminal).

    I am desperate, I can't figure it out for days.
    Any idea?

    Reply
  28. Vimla Pandey Posted on June 28, 2020 at 6:19 pm

    Couldn't even make the boundary

    Reply
  29. Lukshery456 Posted on June 28, 2020 at 6:19 pm

    rand() does not work for me

    Reply
  30. Cracker The First Posted on June 28, 2020 at 6:19 pm

    Hvala Nidzo 🙂

    Reply
  31. Salah Alshafey Posted on June 28, 2020 at 6:19 pm

    for Draw() function, i think this might be better:-

    system("cls"); // we must #include <iomanip> (header file)
    cout << setfill('#') << setw(width) << "" << setfill(' ') << endl;
    for (int i {0}; i<height; i++)
    cout << setw(width/2) << left << "#"<< setw(width/2) << right << "#" << endl;
    cout << setfill('#') << setw(width) << "" << setfill(' ') << endl;

    Reply
  32. The Robloxian Channel Posted on June 28, 2020 at 6:19 pm

    5:01 Saved.

    Reply
  33. Wim Harris-Ryden Posted on June 28, 2020 at 6:19 pm

    prob dumb question but I cant build past the firs function put in and the log just says setup was nont declared in this scope any suggestions (side note* im using code::blocks)

    Reply
  34. Frederick Sims Posted on June 28, 2020 at 6:19 pm

    Can anyone tell me why only half my map is showing up?

    Reply
  35. J i t H Posted on June 28, 2020 at 6:19 pm

    Jst a correction.
    At lime 33 tht cout " " happens regardless of any condition so we have extra 2 blocks… so putting tht under a if else condition will fetch u an exact 20*20

    Reply
  36. Nila Balasubramanian Posted on June 28, 2020 at 6:19 pm

    Video clarity is not good its somewhat blurred.l am not able to see the screwn clearly

    Reply
  37. Krishnadev Unni Posted on June 28, 2020 at 6:19 pm

    Thank you thank you so much

    Reply
LEAVE A COMMENT