I'm still learning c++ and while watching this I'm smiling. It looks pretty cool. This encouraged me to practice code every day, thank you, man.
@borhan64142 жыл бұрын
hello, i’m now quite new to c++ , and i’m wondering if a year was so enough to reach such a level ( creating such a game ) ??
@devery06222 жыл бұрын
@@borhan6414 in one year you can learn even more, just don't lose your motivation
@sypher47352 жыл бұрын
@@borhan6414 For me, it's been around 3-4 months, I started with DSA and practiced a lot through IDE and "LeetCode", and guess what, I did the Body part by myself, and I feel good haha.
@FoldingCrown9 жыл бұрын
Hey guys. Instead of using the variables "prevX and prev2X, and prevY prev2Y" to update the snake tails position, I came up with a more logically simplified approach which works for me very well. tailX[0] = x; tailY[0] = y; for (int i = totalTail; i > 0; i--) { tailX[i] = tailX[i - 1]; tailY[i] = tailY[i - 1]; } x and y are really the previous x and y positions because they are updated in the switch statement directly after this logic is executed. Therefore, we can go through the array of the snake's tail and update each element such that tail is equal to the previous tail in the element. Thanks for the tutorial!
@no_one22307 жыл бұрын
i tried it but the second element of tail changes its position in different directions like Oooooo O oo o o o oooooO o o o oo O
@axiomer475 жыл бұрын
@@no_one2230 same here
@batikanboraormanci79545 жыл бұрын
@No_one @Lalith Adithya for (int i = totalTail; i > 0; i--) { tailX[i] = tailX[i - 1]; tailY[i] = tailY[i - 1]; } tailX[0] = x; tailY[0] = y; this way it'll work.
@axiomer475 жыл бұрын
@@batikanboraormanci7954 it's the same thing but in tailX and tailY are after
@batikanboraormanci79545 жыл бұрын
@@axiomer47 well, if you convert [0] before making [1] equal to [0], they'll end up being the same thing. That was the wrong part of your code
@rajatzsharma2 жыл бұрын
To remove the flickering you can replace" system("cls"); " with " SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), {0,0}); " it is in the windows.h library. What it basically does is just takes your cursor to first word of top line and starts to overwrite the text so the flickering just stops.
@jackied.v.carson60592 жыл бұрын
Thank you so much! This drastically improves the quality
@mr.president69222 жыл бұрын
it works thanks
@raismohaman61512 жыл бұрын
Thank you very much, this is a game changer
@jpp_vh2 жыл бұрын
also remove the cursor with : CONSOLE_CURSOR_INFO info; info.dwSize = 100; info.bVisible = false; SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &info);
@volf5116 Жыл бұрын
thanx
@ArcadeMystereo3 жыл бұрын
Thanks for making this little tutorial series. I jsut started with C++ programming, and didn't really know where to begin after I finished a C++ tutorial, but this really helps with getting to know the basic things, and making them useful. Your tutorial is appreciated even 5 years later ;)
@gnool9 жыл бұрын
Nice work man. I admit I do think the code could be nicer, but I did smile when the tail code starting working, and that's why I'm learning C++ :-) Thanks for the tutorial.
@gytisdramblewolfskis85217 жыл бұрын
man learn any other language if you already ended school. other languages are much easier and more understandable. you can do almost anything you can do in all other languages combined with c++ but it's gonna be 100 times harder
@gytisdramblewolfskis85217 жыл бұрын
that is true but as i said c++ is much harder, more unnecessarily complicated, and takes a ton of time to master. and all that makes it extremely boring, which means that if your first language is c++ you're much more likely to hate programming afterwards. btw java is somewhat similar to c++ in it being close to "meat" but it's much more appealing in my opinion. so it's a better option in my opinion, though even better choose stuff like c#, javascript etc.. those are languages that are used more in jobs, and will be used even more in future.
@maximalgamingnl99547 жыл бұрын
We should change the head to a C, and the tail by plusses
@καλαμ4 жыл бұрын
@@fosspointer Games like Terraria and Stardew Valley are written in C# :)
@lak73083 жыл бұрын
@@fosspointer hard af ngl and imagine for me a noob trying to do internal menu for GTAO lol
@Directer206 жыл бұрын
It looks easy when I'm watching the video, but I can't imagine how I'd be supposed to come up with all of this on my own. :|
@abdullaabdurashidov50575 жыл бұрын
same
@payatthepump11914 жыл бұрын
you have to ask yourself 3 important questions. 1) what things do i need for the game. 2) what formulas (or logic) do i need to get those things. 3) what variable do i need to get for those formulas (logic); this is general problem solving and will apply to everything you need.
@deadchannel59334 жыл бұрын
@@payatthepump1191 it's not just as simple as that! Trust me! I am a C++ programmer and it's not about "things and magic wonders and hope within God that" that you make a code! It is actually some pretty serious testing and learning, and it's not always as simple as selecting what you need and the good functions and stuff and that's it, no, it's way more than that!
@payatthepump11914 жыл бұрын
@@deadchannel5933 I think you care confusing how to approach the problem and writing a successful code. There are way more steps in the development of the code. But if someone wants to know how to approach a problem to start the development process.. those 3 questions are the way to go.
@deadchannel59334 жыл бұрын
@@payatthepump1191 whatever
@Secretcodrin8 жыл бұрын
today i woke up and i said. let's try to make a game. i started with unity but it was something too complicated and it felt like i rush things. but i tought. wait a second. maybe i can do something in c++. after i watched this tutorial i realized how idiot i am. this is verry verry complicated...
@tradermann8 жыл бұрын
It is not actually that complicated. Just plain logic.
@tradermann8 жыл бұрын
The cool thing is that you don't need any graphics. Just some C++ matrix manipulation knowledge.
@crazyagile18087 жыл бұрын
The more you practice, the better you'll get. It looks complicated, but in actuality, w is up, s is down, a is left, d is right, and the score goes up when you touch the fruit. Not that complex.
@arthurmelo30226 жыл бұрын
You have to study to make agame man...
@arthurmelo30226 жыл бұрын
@@crazyagile1808 So why dont u made one too?
@Albalam8 жыл бұрын
and now sell it to Microsoft for 1$
@komangadityapratama9048 жыл бұрын
yeah lol
@oliverplay92166 жыл бұрын
Hello
@Заработокденег-Горд6 жыл бұрын
AZIZ tutorial
@arthurmelo30226 жыл бұрын
don't ask for my name Whats yout name?
@tashadurrahman6 жыл бұрын
Dude you can't sell it... Even a small compant won't buy it....! LOL XD
@123galandechaitanya4 жыл бұрын
Loved it .! Really appreciated . I felt so good when the tail worked . Also , for a beginner programmer like me i understood everything . Thanks Mate. You've earned yourself a subscribe .
@Jo_x_han5 жыл бұрын
after watching this, i can make GOOD BYE CRUEL WORLD in C++
@fatimashirazi4 жыл бұрын
To use arrow keys for controlling the snake, do the following: #define KEY_UP 72 #define KEY_DOWN 80 #define KEY_LEFT 75 #define KEY_RIGHT 77 add this below "using namespace std" and in the switch statement, change the character cases to these cases like if (_kbhit()){//keyboard hit switch(_getch()){//get character case KEY_UP: dir = UP; break; case KEY_DOWN: dir =DOWN; break; case KEY_RIGHT: dir = RIGHT; break; case KEY_LEFT : dir = LEFT; break; default : break; } } You'll be able to then control the snake with the arrow keys on your keyboard!! Happy coding...
@StickmanFights. Жыл бұрын
Thanks
@dudefrombelgium3 жыл бұрын
Thank you , this is the first tutorial which simply and correctly introduces me to programming a sprite and controls, i dont yet understand what is written there to be honest and i have no idea how you came up with that but i now have a chance to study this code and understand the logic behind it , thank you
@blakceyedpeas5 жыл бұрын
Instead of writing every symbol with cout you could make one string with everything and use only one cout per frame. By using this you can avoid this blinking :)
@broet54509 жыл бұрын
i thought this was a real good tut, nice work man !
@youngreezy3637 жыл бұрын
Broet you said tut
@LorenHelgeson6 жыл бұрын
Thanks for the excellent video. To anyone interested, I came up with a quick addition if you want to limit how long your snake's tail can get. At the top, where you define tailX and tailY, change it this: int const tailMax = 20; *
@juicewaffle47008 жыл бұрын
It's great tutorial for beginners, thx. but I have some difficulties in understanding things about prevX, prev2X, tailX[i].... etc. Could you make another tutorial describing details if you're not busy? I don't mind even if you don't make it, I can understand your situation :)
@SapphFire8 жыл бұрын
Yeah!
@romel_storm8 жыл бұрын
This is how I understand it: I believe he is just swapping the snakehead position with the rest of the snake If the snake looked like oo0 and the snakehead is at position x = 5 the one behind it will have x = 4 and the other x=3 But when it moves snakehead becomes x=6 so we have to swap old position the snake head with the ones behind it. That makes me sleep at night if anyone has anything better I'm all ears
@ivandy7076 жыл бұрын
Foster Brown wow man thx
@hanschristianpacarat74306 жыл бұрын
@@romel_storm the box on my pc is still blinking. how to solve that?
@erdemyilmaz61725 жыл бұрын
and i thought it was only me who didnt understand
@Albert-lp8ql6 жыл бұрын
Thanks for your effort. It's a pretty good idea to make this kind of tutorial, much better than simply narrating boring concepts. Wish you make more.
@minecraftermad8 жыл бұрын
lol the fruit can spawn inside of the snake's tail :D
@SameerKhan-nd5qb4 жыл бұрын
hahahah
@theriturajsingh74644 жыл бұрын
😂
@minecraftermad3 жыл бұрын
@@Marie-qv6on on fruit spawn check if snake tail contains spawn attempt coordinate. While thats true try to make a new spawn.
@farcasiuandrei85553 жыл бұрын
@@minecraftermad can you write the code for this please?
@minecraftermad3 жыл бұрын
@@farcasiuandrei8555 something along the lines of bool fail = true; while(fail){ fail = false; fruitSpawnTryX = random(); fruitSpawnTryY = random(); for(int i = 0; i < tailPiecesN; i++){ if(tailPieceY[i] == fruitSpawnTryX && tailPieceY[i] == fruitSpawnTryY) fail = true; } } fruitX = fruitSpawntryX; fruitY = fruitSpawntryY;
@Justanoobcoder5 жыл бұрын
6:16 I think this is shorter and easier to understand: for(int i=nTail-1;i>0;i--) { tailX[i]=tailX[i-1]; tailY[i]=tailY[i-1]; } tailX[0]=x; tailY[0]=y;
@asadjarral96275 жыл бұрын
yeah you re right bro
@Light-wz6tq7 жыл бұрын
You can do this on Input() to don't let the user make opposite movement for example if you are going left u can't press D and go to the right : if (_kbhit()) { switch (_getch()) { case 'a': if (dir == RIGHT)// this lines break; // this lines dir = LEFT; break; case 'd': if (dir == LEFT)// this lines break; // this lines dir = RIGHT; break; case 'w': if (dir == DOWN) // this lines break; // this lines dir = UP; break; case 's': if (dir == UP)// this lines break; // this lines dir = DOWN; break; case 'x': gameOver = true; break; }
@onee0.016 жыл бұрын
thanks. I finding it ^^
@C0DExTutorials6 жыл бұрын
Actually, it should be like this because when the length is only 1 you should be able to move all directions... if (_kbhit()) { switch (_getch()) { case 'a': if (nTail > 0) { if (dir == RIGHT) break; } dir = LEFT; break; case 'd': if (nTail > 0) { if (dir == LEFT) break; } dir = RIGHT; break; case 'w': if (nTail > 0) { if (dir == DOWN) break; } dir = UP; break; case 's': if (nTail > 0) { if (dir == UP) break; } dir = DOWN; break; case 'x': gameOver = true; break; } }
@apektaiga32426 жыл бұрын
Lol i also thought abt this
@PunkHippie19716 жыл бұрын
I’d love to see how you could use this code with some simple graphics
@razeezar7 жыл бұрын
In the example demonstrated, there is a glitch that occurs every time the snake eats a piece of fruit. Each newly grown tail segment briefly appears in the top-left corner of the play field for one frame, before attaching to the snake body in the following frame. We can remove this glitch by re-organising Logic into the following sequence : - Check for fruit, increase nTail figure - Shift tail values in TailX /TailY arrays - Change position based on dir - Wall head & snake body collision detection
@Nick-jb4xi6 жыл бұрын
You have fast eyes! confirmed the bug!
@cupcake_maker5 жыл бұрын
also happened to me
@CosmJJ6 жыл бұрын
Awesome! Thank you so much! I'm new in C++ and your videos are perfect and fun way to learn computer programming.
@ayubkazi95254 жыл бұрын
Done the whole code......and got the perfect output.....Thanks man ✌️✌️
@rueljoshuamojico42944 жыл бұрын
Thank you for this tutorial it really helps me with my requirements on school really appreciated bro!!
@Szesorvs6 жыл бұрын
This looks googs! It's my first game on C++. Thanks man. Realy nice.
@Caffeineshiba4 жыл бұрын
This has been a great tutorial, thank you!
@danielmatthews123127 жыл бұрын
Great tutorial! I love the flickering feature!
@45474666 жыл бұрын
Sarcasm detected in this comment... It's done in the basic console viewer if you want to do it in a different lib... use a different lib
@nananyfo47526 жыл бұрын
Expert detected in this reply.... can u tell me how can i make the flicker stop (for the map)? :D
@michaelatorn83806 жыл бұрын
you cant stop the flickering in the console(cpu: complex, but slow), but you could create a graphical interface(gpu: fast). You could include sdl2 and eventually opengl in c++, but you need to download it first. There are KZbin tutorials for it, but ist difficult and wont probably work the first time. You need time and a lot of willpower to cross the canyon.
@mandar.vaidya4 жыл бұрын
How to stop flickering ?
@enriquethethird72533 жыл бұрын
nniiice. watched all of the parts. i was amazed when the game finally was done. keep up the good work man!
@shubhamjaiswar75422 жыл бұрын
In my terminal it is blinking so much.... Any solution for this???
@martynasausrota86114 жыл бұрын
so i fixed some problems and did some quality upgrades: 1)whenever he takes we fruit the "o" pops up at the top left corner of the map. to fix that go to logic() and change from: for(int i=1; i < nTail; i++) to: for(int i=1; i
@Ganger814 жыл бұрын
i had the idea of pause too but it only pauses in the beginning . after snake eats at least one fruit and you press x to pause game is over
@skoddskar3D4 жыл бұрын
These are great fixes thank you! To fix the fruit spawning in inside the tail you need to create a new bool at the top. Name it whatever makes sense to you, I called it fruitTail. In Setup() where you set gameOver to false, do the same for fruitTail in Logic() at the bottom under the if statement for eating a fruit and creating a new fruit position you'll write this code: for (int f = 0; f < nTail; f++) { if (fruitX == tailX[f] && fruitY == tailY[f]) fruitTail = true; } if (fruitTail == true) { fruitX = rand() % width; fruitY = rand() % height; fruitTail = false; } I'm still pretty new to coding but I'm pretty sure that you want to make sure this code is after the code for eating a fruit. I'm also not sure if you should set fruitTail back to false at the start or at the end of the other two lines of code to update a new position for the fruit. But this has worked very well for the couple of times I tested it.
@Punicia3 жыл бұрын
Thanks for the second one, about the backtrack and instantly killing yourself. That was annoying
@sonaliverma31234 жыл бұрын
It's amazing man...especially for beginners...keep it up...keep doing the good..
@overrevvv2 жыл бұрын
Thank you for this project it helped me a lot to wrap my brain around the real details about programming
@applezhe192 жыл бұрын
Thanks for the tutorial man! You're the legend and I also learned new stuff from this tutorial!!
@marktriestolive17815 жыл бұрын
include this if u want the fruit to really be randomly placed anywhere within the map. i noticed the fruit pattern every time i play it. #include then put srand(time(0)); on the void Setup(); just above the fruit x and y random coordinate.
@NVitanovic5 жыл бұрын
Just beware that if ctime is not available to be included try to include time.h.
@OMGWTFBBQHAXXORZ4 жыл бұрын
My fruit stopped spawning after 9. Then I added random timer and the fruit will stop spawning at a random number. The highest amount of fruits I've eaten was 15. How can I fix this bug?
@Punicia3 жыл бұрын
You're a legend thank you
@coolbrotherf1277 жыл бұрын
I'm going to try and use what I learned here to make a pong game by myself.
@amrsamy90075 жыл бұрын
u did it ?
@DhanaAbishek9 жыл бұрын
That was really cool man..
@runngun57594 жыл бұрын
Pretty nice tutorial it really helps to understand the fundamentals of programing. I really had fun doing this. I also added some bug fixes in the movement and added some small fun things.
@arhantbararia3803 жыл бұрын
Using enum dir was very clever, we can specify heads of the snake, using > , < , ^ , V .
@juvenildr6 жыл бұрын
i thought i was smart till i wanted to solve tails coordination :(
@quadroninja27083 жыл бұрын
It is more about observation, when you understand that segments are moving to the position of next segment that is closer to the head, it becomes obvious that we need to remember the place before the last segment and show it when grow
@jonsnow85434 жыл бұрын
In addition to replacing endl with " !" and only doing an endl at the end of the very last statement "Score:" statement there's something else that helps the redraw/refresh smoothness . It is to have a larger buffer for cout so that you can update the output stream for a full screenfull before flushing. I use a larger play area size (50x25), and adding some extra char space for other, i declare a larger buffer in global scope: char outputbuf[1300]; .... // and then to the Setup function I add these configs: std::cout.rdbuf()->pubsetbuf(outputbuf, sizeof(outputbuf)); ios::sync_with_stdio(false); this gives smoother screen updates
@galaktoza5 жыл бұрын
Hvala puno, odličan video!
@Dany.498 Жыл бұрын
This channel is so underrated❤❤
@henry57887 жыл бұрын
Awesome tutorial and works perfectly! Give a nice insight for beginners!
@seongyeoncho37943 жыл бұрын
can this still work if you use a integrated terminal within vs code??
@jonsnow85434 жыл бұрын
for better performance replace every occurence of endl with " " instead. endl also flushes the output stream. Best to only do a flush at the end of a whole screen draw rather than intermittently throughout
@SupernaturalBBI9 жыл бұрын
Very good video! Excellent work! I learned a lot from the 3 videos about the snake game, now i can create a game on my own! Thank You for the videos!!!
@francescosorce51896 жыл бұрын
I adore the fact that you only used standard libraries
@matthijs21019 жыл бұрын
Thank you very much for this tutorial. I wanted to learn c++ so i can be a better programmer for my arduino. Watched some vids, but your video really learned me to understand the code more quickly because it was a fun project. Thanx
@jctagaming97744 жыл бұрын
(nice game) i did the game and i was wondering how i can change the color of thing in the game???
@lunedefroid88178 жыл бұрын
Thanks! I shall try do this game with classes.
@Mtfupsilon3 жыл бұрын
That is nice project buy when I tried it's not letting me play like when I open it , it says press any key to close windows...... idk how to fix it , its been a while I am trying otherwise the gameboard , snakehead, fruit is there but can't play.
@guyrogen99112 жыл бұрын
Thank you kind sir, with your wisdom I have made my first C++ game
@youtubefreek877 жыл бұрын
you have the best tutorial for snake game in c++
@jrsturmvvehr8026 жыл бұрын
So, what about that bug at 10:48? It seems to be drawing way too many spaces
@TranceManiack9 жыл бұрын
Thank you very much for all tutorials,keep working !
@MrHilario19842 жыл бұрын
Brilliant exercise! And thanks for sharing here. I had some 10 years holidays in C++ and programming in general, and while I went through going back I found this amazing and simple exercise... It has awakened my brain cells. I watched the first 2 parts and I wrote it till it worked; then I came back to compare the logical thinking for the tail. I was impressed with the simplicity... In my code I have things like: class TailSeg { private: int seg_Xcoord; int seg_Ycoord; public: TailSeg(const int _x, const int _y) { //Constructor this->seg_Xcoord = _x; this->seg_Ycoord = _y; } int get_seg_Xcoord() { return this->seg_Xcoord; } int get_seg_Ycoord() { return this->seg_Ycoord; } void setCoords(const int xx, const int yy) { this->seg_Xcoord; this->seg_Ycoord; } }; vector Tail; //Tail is defined as a vector of tail segments (Global object) Proven: there are thousands of ways to solving the same problem. For me that's the most beautiful part of programming Regards, VH, Mozambique
@Onedot.5 жыл бұрын
thank you NVitanovic ...🤗🤗🤗
@ionlyemergeafterdark3 жыл бұрын
Thanks for great stuff, most helpful.
@DarikAndualem10 ай бұрын
Special 🎉love it 🎉❤❤❤ more pls
@lukazotovic5 Жыл бұрын
Brate, svaka cast, vrlo interesantno ali najbitnije mnogo sam naucio
@NoChillAustin7 жыл бұрын
After watching this, now I want to make pacman
@SrbijaCG5 жыл бұрын
@NVitanovic, how long have you been working with c++ until you can make something like a snake game?
@yabashe6 жыл бұрын
Thanks for the tutorial! Was nice to follow along!
@Trendingtech24 жыл бұрын
Great efforts...
@idknuttin7 жыл бұрын
are there any libraries specifically for making games in c++ so that the screen won't flicker like that and so you can add real graphics and sound effects? For example make the snake look like a long rectangle where each segment of the tail is a square?
@mysta31527 жыл бұрын
Look into OpenGL if you want to produce serious graphics. (The GL stands for Graphics Library.)
@punjabiwithjasman1357 жыл бұрын
Kraz z can u explain a bit more
@divingtim6 жыл бұрын
Just do it with ui instead of console
@Tritone6 жыл бұрын
Use the native Win32 library to make a console screen buffer.
@blakceyedpeas5 жыл бұрын
If you want to get rid of blinking you can make one string that contains whole screen and use one cout.
@1vmc4593 жыл бұрын
thanks a lot! this is my first mini project
@janssenbailio1974 жыл бұрын
Very cool. Love it ❤️
@jeremynx4 жыл бұрын
thank you for videos!!! Your explanation is awesome
@FREEZarts2 жыл бұрын
that was great man i learned a lot thank you
@Cacowninja6 жыл бұрын
0:00 Begin!
@martin_skachkov60162 жыл бұрын
Hey, great video but i have struggles with the part where we write the logic about the tail, I don't quite get it. It apparently works but I tried debugging it in my mind to think about how the values would change but I always end up of everything being zero for the prevX, prevY and prev2X and prev2Y. Cant understand how they change their values to different from just zeroes.
@peter47222 жыл бұрын
My thinking is same as yours. How in the world?
@harischaudhry94015 жыл бұрын
Thanks for the tutorial.
@amrsamy90075 жыл бұрын
Thnx for the tutorial love u 3000;
@steveli31635 жыл бұрын
Half way in my first semester learn C++ , I bascially understand the logic until it goes to the array. Anyway, it is a simple game. Even not so fancy yet.
@juliocesarvelandia33864 жыл бұрын
NVitanovic, muchas gracias... " Si funciona ". Seguimos contando contigo para más proyectos
@springscale18116 жыл бұрын
I feel like the Draw() should be behind the Input() and Logic(), otherwise, the screen is "lagged" a little bit and made near wall fruits almost impossible to pick up. Also, I added a while loop that "trys to respawn the fruit while the fruit is in the tail of the snake", but other than that, this tutorial helped me a lot! thank you!
@galaxy-music91385 жыл бұрын
This tutorial was very helpful I will try to study over this
@leondelrosario11496 жыл бұрын
Thanks for the tutorial dude👌
@hamzaawan768 жыл бұрын
Good job ! The tutorial and source code is very easy to understand. But can you upload a video on how to make simple Space invader game in c++?
@TheBrickagon4 жыл бұрын
Is there any way you can do the map look more like a square keeping the same size for the width and height?
@gavin85358 жыл бұрын
for some parts you did not explain how they are there, like prevX and prev2X....many other parts are still confusing
@SapphFire8 жыл бұрын
Yep
@45474666 жыл бұрын
Theres an awesome way to find out yourself: Comment it out or remove it and look for differences with the game!
@JordanMetroidManiac6 жыл бұрын
If it wasn't there, you'd have to do some weird workarounds to fix the errors you'd find.
@mikiscoffield18154 жыл бұрын
@@JordanMetroidManiac inappropriate and uncalled for
@JordanMetroidManiac4 жыл бұрын
miki scoffield1 I edited it so it is no longer disrespectful. I apologize...
@ArhisAlight4 жыл бұрын
Wow!!! It came like a sip of inspiration to me!! Thanks buddy a lot! Now I am thinking about to rebuild it with classes and proper methods! Incrediable! Only with terminal we got such a game=) Now I am thinking about making the Tetris :D
@bigbang2a6 жыл бұрын
Hi! Simpler way to change the tailX and tailY values : for ( int i = nTail-1 ; i > 0 ; i-- ) { tailX[i] = tailX[i-1]; tailY[i] = tailY[i-1]; } tailX[0] = x; tailY[0] = y; Thanks for this great tutorial btw :D
@juvenildr6 жыл бұрын
why it doesnt work for: for(int i=0; i
@madgepereira28914 жыл бұрын
This seems to be easy coz some things are familiar for me. Wow great job. Thanks. I'll try this.
@samuelperez22234 жыл бұрын
Even though you said that this game is simple, this was so hard to understand since I am still learning the fundamentals of C++. This was a cool project though!
@antares69983 жыл бұрын
this was fun thanks!
@shyamkachhadiya49646 жыл бұрын
dude thats really awesome
@DanielBerzinskas3 жыл бұрын
Do I have to license it to redistribute it?
@yogihendrawan39914 жыл бұрын
Nice game, i so enjoy it to make and play the Snake Game. Thanks :)
@programmingandfinance82399 жыл бұрын
love the tutorial
@hunt3r586 жыл бұрын
thanks bro just needed that complicated algorithm that moves the coordinates of the snake head to the following scales(tails) ...ive build the game in complete c++ graphics
@carljohnson73428 жыл бұрын
Super si veliko hvala
@jacobhein49499 жыл бұрын
If you change the coding within void logic so that it looks like if (x > width || x < 0 || y > height || y
@Skiuba4 жыл бұрын
I love this tutorial but is there a chance that you could make new snake game tutorial where u explain all the commands that you use?
@eraytutmaz13317 жыл бұрын
I'm beginner of c++ And thank you so much
@lijack4567 жыл бұрын
thanks a lot ,i really learn something!
@V-for-Vendetta018 жыл бұрын
can u explain why u did that in 6:00
@_tanujpokhriyal3 жыл бұрын
After watching this video i can print hello world😂