Amazing Tutorial Very Calming Voice and Experience I pray you get all the subscribers you need and Your AI Research gets Funded.
@PolarisMyWay
Жыл бұрын
Really hard to call this tutorial. No to much theory.
@ChuckTheChosen
Жыл бұрын
If your Neural Network will become a god at this snake game and play it till the point where you have a very long snake, very little room and you have to constantly move through the same path - eventually it will be left with 1 free cell (that is both in front of the head and just behind the tail), apple will be placed there. And after you get this apple you will fall into an infinite loop of finding next cell for an apple. It follows by logic: detect_apple is called -> next apple is placed behind the tail -> tail growths over the apple -> no crashes for now is detected (trail positions and head positions are different) -> snake moves to the apple -> detect_apple is called and since all cells are occupied with snake it will be infinite.
@datacorelinux
Жыл бұрын
You are absolutely right. Which means there need to be a completion to the game. When the snake becomes (GRID_SIZE * GRID_SIZE -1) the game is completed and this means I will need a counter for the snake size.
@den_3696
2 ай бұрын
Another way to move snake is to put it's tail before the head with new coordinates every frame, because the rest of the body stays still anyway. But to do that you need Snake *prev instead of *next in the snake struct. That way you update just 3 segments instead of the whole body. Also you can get next snake position before actually moving the snake and check if it will hit an apple. This way you place new segment in place of an apple in order to increase it's body.
@Arctrect
Жыл бұрын
I was thoroughly impressed by the tutorial! Watching the programmer build a snake game as a learning exercise in C using SDL was incredibly helpful. Excited for what's next in the series!
@-ahmedhaitham
5 күн бұрын
Please make an SDL tutorial. This is amazing.
@malhju6718
10 ай бұрын
Your content is awesome! Can't wait to see what you'll do next !
@cavMuthama
11 ай бұрын
God mode! 😆. Great tutorial bythi way
@freakyosprey
Жыл бұрын
thank you so much for the videos you make, helped me so much with so many different topics
@TableFork30
9 ай бұрын
Great video! Could you maybe add chapters to the different parts of your video? Also how does your Snake AI differ from this one? kzitem.info/news/bejne/p4F7mZqhfZl6amUsi=3K271XdDSob-Qs0a
@hyperlinkblocked6771
5 ай бұрын
Why do we need a grid for snake
@kareemz32
4 күн бұрын
I'm not sure why you don't hit this edge case in the video, but in detect_crash() when crashing into yourself, reset_snake() will return back inside the while-loop and track will be pointing to freed memory. Which will cause a read access violation. I believe theirs 2 solutions, you could break after returning or you can set temp = NULL after freeing. Anyhow, impressive video!
@СергейЛюбимов-у3ф
8 ай бұрын
Why do you need to keep the direction of a snake in a struct? Wouldn't it be easier to make it a vector, so in move_snake function you just change the position of a head of a snake by the vector, head.x += vector.x head.y += vector.y And set the position of every segment of a snake to be the position of it's prev value And in the input handling function you just reset the vector to the desired values. Something like: if KEY_UP vector.x = 0 vector.y = 1 if KEY_LEFT vector.x = -1 vector.y = 0
@Lukaarsic
Жыл бұрын
As someone who just finished CS50 (CS intro course taught mostly in C), this "getting stuff done" feels really useful to see! Great content, will be glad to see neural networks, at least the basic stuff that I'll maybe understand 👍
@yizongzhou5893
Ай бұрын
Hey, I am having so much fun following your series! I might however need some help from you. I am having a problem fowlling the snake game code (I am stuck in the step of making the head move particularty I think it comes from the rendering of the move... I don't know). Is it possible de make your source code available so that we can have a reference? Thanks for the great work!
@malusmundus-9605
7 ай бұрын
Nice grid- really cool to see a programmer actually spit out algorithms... a lot of these guys out here hard code everything.
@FrankBudino
2 ай бұрын
Ey op, luv me a bit of t' C fella, goin t' be ritin a neural network... t'int that hard...
@vividamente
2 ай бұрын
sir I love your content. Are you going to have a playlist so that ppl can go in certain order? Thanks a lot
@l.sureshkumar-lsk550
2 ай бұрын
Very nice tutorial. May we get the source code please ? TIA.
@joesenenfelder683
8 ай бұрын
Watching things get made is definitely still a learning experience. I'm learning anyway. sometimes LSP's and commentary just get in the way right? just raw dawgin the C 😂😎
@rayenghanem6643
4 ай бұрын
Ok but why don't you put the snake in a vector and each frame you push_back where the head is supposed to be and you delet the end if the vector so now LESS computation
@rayenghanem6643
4 ай бұрын
By the way this is not a bad thing if you look at it this proves you just came up with everything on the spot which is just crazy. Luv ur content keep it up
@subinaypanda9936
Жыл бұрын
I really like your idea of building droid from scratch and in c. What I learned about you from your video is that you think very clearly what you will be doing and also a very good understanding of c and the libraries you are using. And that's why your program runs correctly at first try. Surprisingly this saves a lot of time. I am very excited for the next building neural network from the scratch.
@CodingWithGuille
2 ай бұрын
in the move_snake() part you could use: Snake *track = head->next; while(track != NULL){ .... .... }
@datacorelinux
2 ай бұрын
Ha, I could indeed. Well spotted. I tried to not use too much short hand code in this snake implementation to make it as easy to understand as possible. Having said that, what you've suggested would have been the best and simplest way.
@CodingWithGuille
2 ай бұрын
@@datacorelinux na man your explanation was wonderful
@ЈованПетровић-й7б
10 ай бұрын
I had a blast watching this video. Some real quality content right here. Keep up the good work brother! Cheers!!!
@sureshkeerthi9820
Ай бұрын
Loved it
@Skivohel
Жыл бұрын
Nice video my freand you are a live saver
@joaofalcao7239
Жыл бұрын
Great content! I really enjoy this videos. Excited for the neural networks!!
@gedesuputra1599
9 ай бұрын
can i get the source code please
@littlecurrybread
9 ай бұрын
Would love to see another SDL or raylib tutorial, love your channel! Greetings from Japan
@symbolix0
4 ай бұрын
These are amazing! But what is the order? Are there any plans to organise these into playlists? Cheers.
@margarethill801
8 ай бұрын
Enjoyable to watch, when trying to understand a complex subject (for me anyway). I will be moving swiftly on to the updated version of the Snake game. Thank you!
@reversev9778
9 ай бұрын
This is the exact kind of content that I’ve been looking for! Thank you!
@shaikshakur
8 ай бұрын
love this types of c tutorial. good & educational.
@estebanvidal721
11 ай бұрын
I liked your content! Already subscribed
@littlecurrybread
11 ай бұрын
Pretty incredible. Ty!
@mudittsharmma7366
10 ай бұрын
sir, I have a doubt, I followed the same code and everything, but when I am rendering the snake initially, it is being rendered outside the grid, while yours is being rendered at the center. the code is the same as it is till 32:35.
@mudittsharmma7366
10 ай бұрын
nvm it worked, thank you sir. just didn't add x and y before tail-> x & tail->y
@l.sureshkumar-lsk550
2 ай бұрын
Can you please share the codes .c .h makefile ? TIA
Пікірлер: 43