Snake Game in C (Less than 100 lines of code!)

  Рет қаралды 11,474

Ahmed Abuharthieh

Ahmed Abuharthieh

Күн бұрын

Пікірлер: 47
@ahmedabuharthieh579
@ahmedabuharthieh579 8 ай бұрын
Part 2 is now up! kzbin.info/www/bejne/oni0lIFoltR7ebMsi=fcq_bPrVtRWoeekl
@bladman9700
@bladman9700 9 ай бұрын
you definitely got that skills of thumbnail making, didnt realized you only had 13 subs.
@ahmedabuharthieh579
@ahmedabuharthieh579 9 ай бұрын
Thank you! I used to be a bit of an artist so maybe some skills carried over.
@franklee663
@franklee663 9 ай бұрын
I remember writing this game on a PDP11-44 back in 1988 in PDP basic. I even had multiplayer game running with can house up to 10 players but there are a few changes to the multiplayer game, there are three types of apples, one type will extend your snake length which gives two points, one will reduce snake length by one which will give one point and one will reduce snake length by two but give zero points.
@ahmedabuharthieh579
@ahmedabuharthieh579 9 ай бұрын
That's amazing, would love to see that running on the original hardware!
@quangnhatle2512
@quangnhatle2512 Ай бұрын
Minimalism style is really nice
@fun-damentals6354
@fun-damentals6354 7 ай бұрын
very nice channel. calm, smooth and well explained tutorials. you have earnt my subscription
@ahmedabuharthieh579
@ahmedabuharthieh579 7 ай бұрын
Thank you!
@anon_y_mousse
@anon_y_mousse 9 ай бұрын
It's great to see people be inspired like this. It was QBasic Nibbles and Gorilla that inspired me to get into programming. Tweaking the code to alter the games was the most fun I had in school.
@nirlichtman
@nirlichtman 9 ай бұрын
Awesome, was cool to see how you implemented the tail :)
@ahmedabuharthieh579
@ahmedabuharthieh579 9 ай бұрын
Thank you! Your video is what inspired me to take the idea further :)
@pietraderdetective8953
@pietraderdetective8953 9 ай бұрын
More simple games like this in C please! Liked and subbed!
@eckelfresh
@eckelfresh 9 ай бұрын
Nice video. I would like to see more. You could also show refactoring in the next video. E.g. make functions of the draw section, the game logic and the snake calculation :)
@ahmedabuharthieh579
@ahmedabuharthieh579 8 ай бұрын
Part 2 is up now :)
@pris_yt7698
@pris_yt7698 9 ай бұрын
Nice, will show my son
@omarsaquarium8178
@omarsaquarium8178 9 ай бұрын
Thank you!! Something fun! now I start working on my first beginner C project!
@ahmedabuharthieh579
@ahmedabuharthieh579 9 ай бұрын
Have fun!
@HumanoidTyphoon91
@HumanoidTyphoon91 9 ай бұрын
would be cool to see the scoring system, clashing, colors, etc... (basically, completing the game as you demoed in the beginning of the video).
@ahmedabuharthieh579
@ahmedabuharthieh579 9 ай бұрын
Good to hear, I may make a follow up some time soon!
@ahmedabuharthieh579
@ahmedabuharthieh579 9 ай бұрын
For now, you can take a look at the link in the description to see how I implemented all of the things you mentioned.
@ranaayyash9021
@ranaayyash9021 9 ай бұрын
Very useful video
@hendburgila415
@hendburgila415 2 ай бұрын
Keep the good work!!
@ДимаПетров-н3ц
@ДимаПетров-н3ц 7 ай бұрын
Good, bro, you going great
@dhirajdrj6292
@dhirajdrj6292 9 ай бұрын
great video brother please make more video
@ahmedabuharthieh579
@ahmedabuharthieh579 9 ай бұрын
Thank you 🙏
@paulwheatley4224
@paulwheatley4224 Ай бұрын
Nice work!
@ahmedabuharthieh579
@ahmedabuharthieh579 Ай бұрын
Thank you!
@thehady1
@thehady1 9 ай бұрын
Great vid.did you configure your neovim yourself i would love to have it
@ahmedabuharthieh579
@ahmedabuharthieh579 9 ай бұрын
I configured mine following this video kzbin.info/www/bejne/rWjMZZSjhMStl6c
@AliHasan-t3g
@AliHasan-t3g Ай бұрын
Can anyone tell me how to set this up in windows, all the libraries and stuff
@sinewaveaddict
@sinewaveaddict 9 ай бұрын
Very cool man, where is the curses header file?
@ahmedabuharthieh579
@ahmedabuharthieh579 9 ай бұрын
The curses library has to be downloaded from their webpage. In linux you can just run the commands I showed to get it, but on windows its a bit more involved
@boomboom_ba
@boomboom_ba 6 ай бұрын
cool !! thanks!
@Walking_W
@Walking_W 9 ай бұрын
WHAT ONLY 35 SUBS??? shout me out when u get famous bro, i thought u had 200k. Im def subbed.
@ahmedabuharthieh579
@ahmedabuharthieh579 9 ай бұрын
Lol much appreciated man! 😅
@Walking_W
@Walking_W 9 ай бұрын
@@ahmedabuharthieh579 bro ur my new favorite youtuber, haha😬😭😅
@KaloAk-h9o
@KaloAk-h9o Ай бұрын
which keyboard you use your keyboard sound mmmmm.......
@mdyeasinkhan8379
@mdyeasinkhan8379 6 ай бұрын
Which code editer is it?
@ahmedabuharthieh579
@ahmedabuharthieh579 6 ай бұрын
The editor is called neovim
@MrDemon-lq6fh
@MrDemon-lq6fh 2 ай бұрын
Bro can you tell me where did you learn C language from?
@ahmedabuharthieh579
@ahmedabuharthieh579 2 ай бұрын
The book, "The C programming Language" is a good way to learn the basics of C, assuming you have some base understanding of programming. If not, I would start with this online book, which helps you develop a good base in programming with python. inventwithpython.com/invent4thed/
@KshitizShrestha-kf9eq
@KshitizShrestha-kf9eq 5 ай бұрын
which software to use this code?
@ahmedabuharthieh579
@ahmedabuharthieh579 5 ай бұрын
The editor is neovim with some plugins
@CST_77
@CST_77 Ай бұрын
Which os and software???
@ahmedabuharthieh579
@ahmedabuharthieh579 Ай бұрын
Running on Ubuntu (WSL), but the game should compile and run on any system. The editing software is Neovim with some plugins
@KaloAk-h9o
@KaloAk-h9o Ай бұрын
thankyou
Snake Game in C (Part 2)
6:19
Ahmed Abuharthieh
Рет қаралды 694
before you code, learn how computers work
7:05
Low Level
Рет қаралды 510 М.
Trapped by the Machine, Saved by Kind Strangers! #shorts
00:21
Fabiosa Best Lifehacks
Рет қаралды 41 МЛН
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 5 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 9 МЛН
Making Minimalist Snake Game in C on Linux
8:01
Nir Lichtman
Рет қаралды 33 М.
CS 305: Advanced Shell Scripting
4:05
Sergio Rabadan
Рет қаралды 15
Simple CSS Tricks for Amazing Loading Animations!
3:44
CatWebDev
Рет қаралды 153
The Right Way To Return API Errors in .NET
10:40
Nick Chapsas
Рет қаралды 55 М.
I made the same game in Assembly, C and C++
4:20
Nathan Baggs
Рет қаралды 797 М.
how NASA writes space-proof code
6:03
Low Level
Рет қаралды 2,3 МЛН
My 2 Year Journey of Learning C, in 9 minutes
8:42
VoxelRifts
Рет қаралды 650 М.
Snake - Zero to Neural Networks [ C Programming ]
1:11:07
Datacore Linux
Рет қаралды 19 М.
I built my own 16-Bit CPU in Excel
15:45
Inkbox
Рет қаралды 1,6 МЛН
Trapped by the Machine, Saved by Kind Strangers! #shorts
00:21
Fabiosa Best Lifehacks
Рет қаралды 41 МЛН