Coding a Snake Game in 5 mins with Javascript - Speed Coding

preview_player
Показать описание
This is my attempt at coding a snake game in 5 mins with javascript. Speed coding is not something I do very often but the snake game is such a classic that I thought I would make a coding challenge out of it. This isn't really a tutorial about building a snake game but I maybe - if i'm lucky - you end up learning a little by the end of the video. Let's make a javascript snake game then shall we?

❤️ Support Me On Patreon

Github repo for this video:

Share this video with a programmer friend:

✅One Off Donations:

Bitcoin: 39iDX27ZSkYtRhUrH5r5YN128wEjwDmSYp
Ethereum: 0x38b3cBF8Ee3EeeeA33D1925bA0ce0e90c8EcFD46
Horizen (ZEN): znanBCHpWJecBwZZmft9r5QzbzRX4nQn6Dz

🔴 Check Out The Site!

🔔 SUBSCRIBE!

🔥 Join the Community!

Рекомендации по теме
Комментарии
Автор

This guy is like how films exaggerate programming

pugchamp
Автор

You’re fast and efficient as hell with the key klicks m8

singhatar
Автор

There is a bug in line 88 and 89. When you do:

if (food.x === pos.x && food.y === pos.y) {
pos.x += vel.x
pos.y += vel.y
}

This causes the snake to move an extra step forward when picking up food. So for example, it will be impossible to pick up food in the corner cause you will move an extra step causing you to go out of the field.

alfredbirketvedt
Автор

The VIM is strong in this one :-) Nice video.

FeinesFabi
Автор

+10 for VIM, +10 for flawless programming skills, Instant sub!

jordantochaile
Автор

I tried following other 25/45 min long tutorials and struggled to understand anything.
I understood everything with your 5 min challenge, I think you should make an explained version and it would take you only 2 mins to explain it all cos your code is super clean and simple. thx

zhatar
Автор

He's clearly looking at reference code multiple times in the video, but doesn't really take away much from it. The real impressiveness of the video is his creation of the code that minimizes the amount of lines required to achieve the end goal. Impressive, functional, 10/10.

ForTheOmnissiah
Автор

This is amazing, man! Thanks for sharing this with us, keep it up, love the content!

joshuamckenna
Автор

I find watching this more interesting than I used to find playing snake game 17 years back in my father's Nokia 2100!

AjaySingh-xdnz
Автор

Me at 5:16 in the vid: "Ok, so we just declared a variable 'pos', hmmmm interesting

AnnyMus-rczh
Автор

I like how you describe each function in details while typing.

What's the "Emotionless Focus Meter" for? 😊

LucLuc-pe
Автор

Massive respect! Your javascript skills are outstanding. I think it must've either been a well rehearsed example or you're some kind of savant. Either way, you did a great job.


Can I just ask, what was your thinking behind your choice of text editor?

davidconnelly
Автор

Le Emotionless Focus Meter be like: 🔴🔴🔴🔴🔴

saaofficial
Автор

This is how I write codes in my dream.

protip
Автор

I appreciate your channel a lot, glad i found it. Could you tell me what colorschem you use in this video? What do you think about a vim tutorial :)? sorry for bad grammar.

Cutrexxx
Автор

I’m just now getting into coding how long would take a beginner to be at this level?

ObiWanKevobi
Автор

Thats amazing, can you now do one where you write an OS in under one hour ? 😋

svendudink
Автор

I'd impress myself if I can figure this out in 5 hours lol

graydhd
Автор

the hell did I just watch o.O


Bruh.... bravo

finskou
Автор

I broke ALL my computers after seen this guy !

leonardomedina