Coding Challenge #3: The Snake Game

Поделиться
HTML-код
  • Опубликовано: 19 окт 2024

Комментарии • 3,5 тыс.

  • @TheCodingTrain
    @TheCodingTrain  5 лет назад +292

    If you want to know what happened during "technical difficulties"! ruclips.net/video/yUO2bWfBgN8/видео.html

    • @dixoncyprian8633
      @dixoncyprian8633 5 лет назад +1

      cool bro

    • @cmdvoid
      @cmdvoid 4 года назад +1

      So fast😮

    • @Nurutomo
      @Nurutomo 4 года назад +2

      Why not using "shift()" "unshift" "pop()" "push()"?

    • @nugs2727
      @nugs2727 4 года назад +1

      NsG Frantic just copy him but this is how
      Function setup() {
      CreateCanvas(400,400)
      }
      Function draw() {
      background(51)
      }
      This is in java script. If you wanna know in a different language than you can watch a tutorial video
      Edit: function draw is optional, it just changes the background colour or if you wanna draw a circle or a square

    • @pratigyasingh317
      @pratigyasingh317 4 года назад +1

      Wow wow wow

  • @captstrugglebunny
    @captstrugglebunny 5 лет назад +339

    It is pretty amazing that a game that was once considered good enough for commercial distribution in arcades became a time waster pack-in on cellphones, and then finally a 30 minute coding tutorial.

    • @chonkydog6262
      @chonkydog6262 2 года назад +5

      I'd pay a quarter to play snake

    • @bleepboop
      @bleepboop Год назад +6

      The framework does some pretty heavy lifting here compared to 1976-versions

    • @shanewalsch
      @shanewalsch 8 месяцев назад +1

      ​@@bleepboopthe main loop and drawing. Its not that hard to implement yourself

    • @rdevan3245
      @rdevan3245 6 месяцев назад +2

      ​@@shanewalschcool. Now try it with the technology that was actually available in 1976 lmao

  • @Warm_Ice0
    @Warm_Ice0 7 лет назад +1667

    Anyone get this guy randomly recommended to them? Im loving it.

    • @tarkin843
      @tarkin843 7 лет назад

      Daniel Esen J. Oliviėr Yes

    • @YellowKiwi11
      @YellowKiwi11 7 лет назад +7

      Daniel Esen J. Oliviėr I think RUclips can read my mind ;)

    • @diyansueka3192
      @diyansueka3192 7 лет назад

      Yes

    • @عبدالحليم-و3ه
      @عبدالحليم-و3ه 7 лет назад +9

      yep...i want to learn how to programme and how to code :/ and then this guy comes out :D

    • @Hanzi2u
      @Hanzi2u 7 лет назад +12

      Daniel Esen J. Oliviėr yes i just watched the purple rain video by him

  • @wifeless
    @wifeless 5 лет назад +917

    Damn! This video is almost 3 years old and you're still responding to comments? Saw you in my recommended and found the video super interesting. Thanks!

  • @hackwise
    @hackwise 7 лет назад +276

    You totally earn my respect , you are a great programmer and mentor, thanks for all your videos.

    • @um_idkw
      @um_idkw Год назад

      252 likes and no replies, I honestly don't care.

  • @thelavagod
    @thelavagod 9 месяцев назад +24

    Hey there Daniel, It's me in 2024. Back in 2017, I discovered this video and this was where my programming interests began. I first started off by learning JavaScript (because it was the language you were using) then Python, a bit of C++, Java and Ruby and I went into more advanced stuff such as Logic, and how programming languages work, and computer science. I learned how to code in Visual Basic, as well as learning about the parts of PC, the basic input devices, the BIOS, and more. All because I discovered this video of yours. I cannot find the words to express my gratitude to you.

    • @TheCodingTrain
      @TheCodingTrain  9 месяцев назад +7

      Thank you for sharing this, I'm so happy to hear!

    • @lakhaidir9284
      @lakhaidir9284 6 месяцев назад +1

      Woah, despite 7 years later you're still replying comments tho. Respect...

  • @NiiAnikin
    @NiiAnikin 4 года назад +5

    just jumped on the javascript/coding train and I'd love to say, this is the most useful video, I have seen to date. I know enough to understand the basic mechanics of whats going on here but seeing this implementation and real time description is super awesome and very useful. Big thumbs up

  • @dennisvargas7719
    @dennisvargas7719 8 лет назад +6215

    do call of duty next

  • @AjeetSingh-xq4yb
    @AjeetSingh-xq4yb 7 лет назад +446

    dont know why this channel appeared in my recommended, clicked on 1 video and have been browsing for hours now. This makes we want to learn to code.

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +42

      +Ajeet Singh I'm really wondering why it's being recommended too! Lots of new viewers thanks for the comment. (Take a look at my foundations of JavaScript playlist if you want to learn from the beginning)

    • @phinix827
      @phinix827 7 лет назад +1

      haha got it recommended too :D i haven't watched many of such videos :D but VERY nice :D
      I mean i watched nearly the hole video even if im not into coding :D

    • @johnpyp
      @johnpyp 7 лет назад

      Just appeared in my recommended as well, maybe because I have been learning to code, but I love these videos!

    • @alephbet6265
      @alephbet6265 7 лет назад +2

      this appeared on my recommended because i learn python

    • @Dylan5246
      @Dylan5246 7 лет назад +3

      X-Core Aleph but this is javascript

  • @The_Foreman
    @The_Foreman 5 лет назад +705

    "Hello and welcome to what today will be a 15 minute coding challenge"
    *Looks at video length* Uh huh....

    • @forest3064
      @forest3064 4 года назад +11

      Well, work expands to fill the time given.

    • @abdelrahmanmohamed6701
      @abdelrahmanmohamed6701 4 года назад +13

      He takes more time to explain for us
      We appreciate your efforts 🙏😊😘

    • @Melvin420x12
      @Melvin420x12 4 года назад +3

      Basically every project ever

    • @k-vin2073
      @k-vin2073 4 года назад +2

      @@abdelrahmanmohamed6701 indeed

  • @camelcase9225
    @camelcase9225 7 лет назад +865

    Seriously wish I could code like you. I can think of what I need to do but can't implement it as effectively as you can. I just found this channel randomly and am loving it! You're very entertaining.

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +66

      so nice to hear, thank you!

    • @Savage_Gamer777
      @Savage_Gamer777 6 лет назад +25

      Radbeh Yousefi you don’t need college.

    • @derronwhite375
      @derronwhite375 6 лет назад +5

      I wish i can code like him too

    • @meanstreak110
      @meanstreak110 6 лет назад +7

      The Coding Train
      Ha! You're a narcissistic person. At least in this comment you are...because I thought you were gonna help him out....but no. You don't care :(
      Edit: I've seen enough of ur content to know that you just care about yourself. #NARCISSISTIC-af

    • @Guevara1015
      @Guevara1015 6 лет назад +21

      nah, he's a lovely guy. He posts videos on basically everything related to coding (mostly Processing stuff). I've probably seen more of his content than you do so I know he's just a great guy sharing his love for programming. He isn't google. If you need answers to a specific problem, let me inaugurate you into the upper class of programming: StackOverflow. your welcome

  • @ALLCAPS
    @ALLCAPS 7 лет назад +16

    I love how you fucking start from a CHALLENGE but then you shift into this in-depth tutorial and omg I LOVE HOW YOU TEACH

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +5

      Heh, thanks for the feedback. :)

    • @ALLCAPS
      @ALLCAPS 7 лет назад +3

      I wish I was as fluent as you are in the Java script, and Java language. I'm currently in school for programming, and will aim to be a senior-software engineer one day.

  • @Horse-tradeEu
    @Horse-tradeEu 2 года назад +6

    Story of every programmer, will finish by tomorrow. Three years later... Thank you man, I am learning so much!

  • @k2k4
    @k2k4 8 лет назад +16

    so i spend 4+ hours trying to understand and copy verbatim what another person did to make snake in a youtube video, and you get it done in like 25ish minutes. Absolutely brilliant coding skills dude.

  • @TheFloatingSheep
    @TheFloatingSheep 8 лет назад +98

    2:27
    I'm nervous about wasting time so I'm just gonna call it "s" then brag about it for a minute.
    - Daniel Shiffman 2016

  • @StelznerGaming
    @StelznerGaming 4 года назад +3

    As someone who just got into coding I am so happy I just found your channel. Love your passion!

  • @dm8dd
    @dm8dd 8 лет назад +9

    genius, haven't coded for 15 years, tempted to have a go again. thanks bro!

  • @taylorhetherington745
    @taylorhetherington745 7 лет назад +93

    Damn I wanna be like you, that's my New Years resolution :p
    - be energetic
    - be good at coding
    - wear cool shirt combos
    - be generally brilliant

    • @Felixpf1
      @Felixpf1 7 лет назад +3

      Hjard Kuk so stop playing lol you lazy piece of shit :D

    • @taylorhetherington745
      @taylorhetherington745 7 лет назад +6

      Felixpf1 I haven't played in a while, logged on today and fed my ass off :p

    • @armanpapa3
      @armanpapa3 7 лет назад +8

      add being a cringey weeb to ur list

    • @taylorhetherington745
      @taylorhetherington745 7 лет назад +14

      ReX - donald trump pp
      - uploaded a picture of a girl to ur g+ page
      - name is rex
      You're the cringey one and I've never watched an anime, apart from pokemon when i was kid

    • @tryhitmecs9699
      @tryhitmecs9699 7 лет назад +1

      lol rekt trump got stumped

  • @IndianGamer-qz8lf
    @IndianGamer-qz8lf 3 года назад +3

    I like how coding challenges are suspenseful, entertaining and informative at the same time 🌀

  • @quantumvac7737
    @quantumvac7737 7 лет назад +427

    Him Talking : 15 minute challenge
    On-screen Bar : 10 Minute Challenge
    Video Length : 30 Minutes
    Me : Seems Legit.

    • @jonathanmorrison8223
      @jonathanmorrison8223 6 лет назад +14

      15:25 lol

    • @kingfoxx6697
      @kingfoxx6697 6 лет назад +1

      😂😂

    • @skilz8098
      @skilz8098 4 года назад

      I agree I can probably write the code in about 15 - 20 minutes to solve a problem, but it will probably take 2-3 times that to fix compiler errors and to debug it! Then again I don't use Java, I'm accustomed to C and C++, rarely C#... I did start to learn Python and that I don't mind, Python is pretty decent, Java eh... Now, JavaScript isn't too bad, but it takes a bit to get accustomed to it but I don't do much "web development". I word on the backend, libraries, interfaces, 3D graphics or rendering engines, etc... I do a bit of hardware emulation, etc. This is why I prefer C/C++!

    • @mattwayne9128
      @mattwayne9128 3 года назад +1

      @@skilz8098... Wrong thread? I don't believe what you just said is relevant to anything in this comment section.

  • @invictuz4803
    @invictuz4803 7 лет назад +182

    Wow, just randomly found this video. Now I understand javascript...i think

    • @senpaisanchoyt5225
      @senpaisanchoyt5225 7 лет назад

      Hey im taking classes for this and i understand this.... i think. I won't say its hard but there is alot of difficulties.

    • @invictuz4803
      @invictuz4803 7 лет назад

      SenpaiSancho YT What kind of difficulties? And are you taking these class online for free?

    • @Yorelz
      @Yorelz 7 лет назад

      InvictuZ try out something like CodeHs it's where I started (prior experience with Python)

    • @senpaisanchoyt5225
      @senpaisanchoyt5225 7 лет назад

      InvictuZ School, we are just messing around with and programming a robot.

    • @ginney1032
      @ginney1032 7 лет назад +3

      InvictuZ hahaha, no you don't ;)

  • @LapSiLap
    @LapSiLap 6 лет назад +155

    You dont need a head and a tail. You can have 1 array with 1 vector in the beginning and when it grows you just push a vector to it. To update it, you will set for example index 5's position 4, 4->3, 3->2, 2->1, 1->0 and then index 0 being the head will just head whatever direction the player controls it. Update function will be much easier:
    // Move the tail
    for (var i = this.snake.length - 1; i > 0; i--) {
    this.snake[i].x = this.snake[i-1].x;
    this.snake[i].y = this.snake[i-1].y;
    }
    // Move the head
    this.snake[0].x = this.snake[0].x + this.xspeed * scl;
    this.snake[0].y = this.snake[0].y + this.yspeed * scl;

  • @ChuckNorrisRullZz
    @ChuckNorrisRullZz 7 лет назад +40

    You are seriously the most entertaining person while teaching code! Wish my professors were like you. lol Been binge watching all your Code Challenges

  • @Lamarsh67
    @Lamarsh67 7 лет назад +5

    I've been feeling bummed about my coding ability lately because I'm entering the final year of my university degree and university has been such an awful experience for me. I decided to attend a technical institute next year and complete a two year program for a computer systems technology diploma. Initially seeing this video made me sad because I know I'd never be at your level but when you didn't complete it in the time limit and had so many other things to solve after the fact, it just resonated with me so much and I felt the exact same feelings when I'm working on a difficult assignment. You have that initial clarity and almost simplistic idea of the assignment but then you start coding and the devil really is in the details which only becomes apparent the more you code. Thank you for being so inspiring and I really want to commend you on your skill as a programmer!! Cheers.

  • @joem8251
    @joem8251 5 лет назад +7

    Your tutorials are helpful. I recommend losing the time limit for most videos. A calm problem solver is more effective, applicable, and instructional. An arbitrary time limit can be meaningless without statistical metrics and a rigorous measure of problem complexity; but even then, a strong focus on time limits seems to be detrimental. Either way I appreciate your effort!

  • @JordanShackelford
    @JordanShackelford 7 лет назад +322

    at 12:23 instead of writing out "if (d

    • @DareDevilPhil
      @DareDevilPhil 7 лет назад +3

      Jordan Shackelford true, however that function is later modified to increment this.total

    • @JordanShackelford
      @JordanShackelford 7 лет назад +84

      He explained in another vid that he does this on purpose to make code more readable. just letting you guys know there's another way

    • @sloppyy
      @sloppyy 7 лет назад

      scrolled down to see if anyone had said this already

    • @Yopi69
      @Yopi69 7 лет назад

      Ivan Dobrev a

    • @MineMoore
      @MineMoore 7 лет назад

      Chris Pierce hi Chris pierce big fan

  • @MrCKay26
    @MrCKay26 7 лет назад +21

    There's a neat way of implementing a snake: You might notice that none of the snake elements, except the first and the last change. So you could simply create a dequeue, and every time the snake moves, an element gets added to the head (as the snakes current head + it's speed) and an element removed from it's tail. When the snake eats the food, you simply don't remove the element from it's tail.
    An efficient dequeue would ensure that snake.update is an O(1) operation, as opposed to shifting which is an O(n) operation, where n is the size of the snake. Simpler and Faster code!
    Also all food collisions and edge collisions would need to only check the head against them, which I think you're doing already, so that's not much of an improvement. I would suggest creating a new Snake object when a collision happens however, so that it's obvious that the snake starts over.

  • @FelixxFelixx-tt7sf
    @FelixxFelixx-tt7sf 4 года назад +7

    I dont know how, but in only 15 minutes, you taught me more than multiple hours of someone speaking my language

  • @chrit8519
    @chrit8519 7 лет назад +4

    Love his enthusiasm when he making these video. You can tell he has so much passion for what he does.

  • @hmm-.-
    @hmm-.- 8 лет назад +49

    And you just got a new subscriber :D
    You are amazing!

  • @pie7747
    @pie7747 4 года назад +1

    the best to master something is learn from mistakes, when other videos shows they' have non mistakes during program it, it's hard to understand each of the component . this is an excellent example to learn and understand parts by parts. thanks sir

  • @Robertlavigne1
    @Robertlavigne1 8 лет назад +39

    Wow!! just found your channel and I have to say you are a boss. No way I
    could do that in the time you banged it out and I do a lot of topcoder
    competitions. You earned my sub.
    I think an efficient data structure for the snake would be a circular linked list. As only the last block and first block are moving. I guess this assumes that the snake is moving one grid per time unit though which I don't remember if yours was doing. But I suppose we can leave optimizations for the C monkeys.

  • @Yorelz
    @Yorelz 7 лет назад +43

    Wow a guy that can actually keep me interested and still tell me what the stuff does

  • @brandonnorsworthy
    @brandonnorsworthy 5 лет назад +100

    "I'm going to make var s, mainly to save time.." proceeds to keep talking about var s for more time than it would've been to create var snake

    • @AndresHernandez-dc6ow
      @AndresHernandez-dc6ow 3 года назад

      I have a question what does var S do?

    • @kaskadouff1349
      @kaskadouff1349 3 года назад

      @@AndresHernandez-dc6ow i think var s is the variable where a instance of the Snake 'class' is stocked
      (but im not sure, and even not if it's called a class in javascript too)

  • @Jan-vw5cg
    @Jan-vw5cg 7 лет назад +369

    I've always thought that I look/sound like I'm mental every time I explain my codes in class. Now that I found your videos I'm certain that everyone thinks I'm insane... This is like looking at a mirror.

    • @Aspectalice
      @Aspectalice 6 лет назад +3

      Jan what class are you doing?

    • @fuelks
      @fuelks 6 лет назад +9

      "codes" lol

    • @denzel3972
      @denzel3972 6 лет назад +3

      Amir Noble computer science maybe

    • @dvnmnd5020
      @dvnmnd5020 6 лет назад +5

      Arach Thou shall not pass

    • @Ray-jg5dj
      @Ray-jg5dj 5 лет назад +1

      "Ce qui se conçoit bien s'énonce clairement et les mots pour le dire vous viennent aisément."
      Rough translation : "What is nicely designed is easily explained".
      If you have trouble explaining what one of your classes do, rethink the class.

  • @mateopolanco213
    @mateopolanco213 7 лет назад +80

    4 years of learning programming this challenge will probably take me a week. I'm bad

    • @flowolf86
      @flowolf86 7 лет назад +17

      mateo polanco he prepared for it obviously...

    • @muhanad102
      @muhanad102 7 лет назад +4

      yeah but if you did it once ...the next time you will do it in 1 day...then 50 min ...and so on coding is a language when you speak it alot you become fluent

    • @skylarkenneth3784
      @skylarkenneth3784 6 лет назад

      It's a matter of doing two things at the same time:
      1) Visualizing what you want a program to do
      2) Visualizing how your code works line by line
      In other words, debugging as you code. The big takeaway from this is having a good spatial memory or abstract thinking.

  • @maluxon5324
    @maluxon5324 6 лет назад +1

    I just started to get into programming recently and i definetly won't be able to build such a code yet but im so happy that i understood 80-90% of the steps you did there. That is a great motivation ^^

  • @pulisichhh
    @pulisichhh 7 лет назад +297

    Dude, you code like in movies. Keep going.

    • @ScibbieGames
      @ScibbieGames 7 лет назад +7

      Speedcell nobody codes like in movies

    • @andrewking9271
      @andrewking9271 7 лет назад +71

      Course you can. All you have to do is penetrate the firewalls and reverse the mainframe.

    • @Yorelz
      @Yorelz 7 лет назад +4

      Andrew King I don't even think a mainframe is an actual thing 😂 gotta love movies "code.hackperson"

    • @fox091
      @fox091 7 лет назад +3

      Joe Biden Mainframe is an actual thing. We have one and use one at work. It's just not what you think of it as.

    • @EnterpriseKnight
      @EnterpriseKnight 7 лет назад +9

      Don't forget to Enhance.

  • @job2k656
    @job2k656 8 лет назад +10

    I'm currently in college and just finished the second semester of my program where we covered basic JavaScript. I'd love to have you as a teacher for JS. The classes would be hilarious and highly educational. I'll have to settle for the videos, which are also great!
    Cheers.

    • @TheCodingTrain
      @TheCodingTrain  8 лет назад +2

      +job2k6 Thanks for the nice feedback!

    • @burzumumbra
      @burzumumbra 8 лет назад

      +job2k6 I support dat thought, at my colleger they didn't teach JS or nothin related to web.

    • @tim..indeed
      @tim..indeed 8 лет назад

      +Ronald Flores That's weird. What did you study?

    • @burzumumbra
      @burzumumbra 8 лет назад

      +Tim Fischer Computer Ing.

  • @all-roundtech4872
    @all-roundtech4872 5 лет назад +604

    How many of you are understanding nothing but still watching 😂😂😂

    • @sabirnawaz1304
      @sabirnawaz1304 5 лет назад +1

      Manisha Mhetre

    • @supercool1312
      @supercool1312 5 лет назад +1

      Manisha Mhetre me

    • @abbywiley6467
      @abbywiley6467 5 лет назад +18

      Not me, I've been studying processingJS for months now. I understand everything he's saying. Have an outstanding day!!!

    • @chappie3642
      @chappie3642 5 лет назад +19

      @@abbywiley6467 who cares lol, and processing isn't that hard of a thing

    • @abbywiley6467
      @abbywiley6467 5 лет назад +11

      @@chappie3642 Good point, I agree. processing isn't that hard, I'm just prideful that I'm 12 and understand it while some people at my school don't care enough about anything to even try to do mental math and when given the opportunity, will only use the calculator.

  • @EdwardGordington
    @EdwardGordington 7 лет назад +452

    i want whatever this guys having lmfao.

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +129

      +Mazzza3 chamomile tea.

    • @hatben
      @hatben 7 лет назад +11

      Posted on 4/20 :P

    • @mkmush1982
      @mkmush1982 7 лет назад +7

      Daniel Shiffman more like Daniel Sniffman.. But great video!

    • @roychh1
      @roychh1 7 лет назад +7

      meth

    • @iwanttodie8331
      @iwanttodie8331 7 лет назад +4

      I dun bet it's Adderal

  • @NighthowlsMusic
    @NighthowlsMusic 7 лет назад +11

    I love this video! It was incredibly informative and enthusiastic over something so tedious. I started to freak out at the 1 min mark. I started in Python but this has motivated me to start jumping into JS. Cheers!

  • @phunguyenuc3747
    @phunguyenuc3747 5 лет назад +7

    Oh boi, I love youtube recommendation. They brought me to this wonderful art of coding

  • @BulldogMindsetArchive
    @BulldogMindsetArchive 8 лет назад +339

    This was amazing lol
    Will definitely consider doing some of those for my channel Ha!
    Amazing video

    • @ayazahmad6378
      @ayazahmad6378 8 лет назад +7

      respect..nice to see

    • @radioleta
      @radioleta 7 лет назад +4

      Hey, John. I din't expect to find you here!

    • @toxanism6050
      @toxanism6050 6 лет назад

      were you using atom

  • @juleslardon3036
    @juleslardon3036 7 лет назад +1002

    how gome i enjoy watching you code but i dont accually know how to code :P

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +79

      +TheBaconGamer that is amazing to me. Go back and watch my intro to JavaScript playlist and learn!

    • @juleslardon3036
      @juleslardon3036 7 лет назад +19

      +Daniel Shiffman i will :D

    • @11ditto11
      @11ditto11 7 лет назад

      TheBaconGamer hahaha I was thinking exactly the same

    • @epilefchannel9424
      @epilefchannel9424 7 лет назад +6

      wow... happens the same to me lol.... i'ts fun as fuck... but no clue how to even code xD, don't even know how i got to this channel, gonna sub xD

    • @sigurdriseth5923
      @sigurdriseth5923 7 лет назад

      TheBaconGamer true

  • @marlynstark341
    @marlynstark341 6 лет назад +463

    Never knew JavaScript codes are so light and u can do much with so little.....

    • @SleazyNice
      @SleazyNice 6 лет назад +81

      He is using a library that hides much of the code.

    • @Jackarius86
      @Jackarius86 6 лет назад +23

      Raymond Cruz it isnt THAT much code that is hidden. You could do the same using canvas with exactly the same number of lines possibly less, which are also just as easy to use.

    • @azizalaliq8
      @azizalaliq8 5 лет назад +6

      Ikr I've been using pygame and its so intensive

    • @smanzoli
      @smanzoli 5 лет назад +4

      @@azizalaliq8 Don´t use pygame, use processing.py (just the same language as the P5 used here, but with Python instead of JS)

    • @tilostammwitz4226
      @tilostammwitz4226 5 лет назад +26

      they aren't - this dude shows only a part of the code. As in his other "challenges" he types some code, and some kind of strange framework does things like drawing, etc.
      I never saw him starting a project from scratch - every time an empty window - he writes some functions, that are never called in his code and, tadaa.... some kind of fancy animation.
      Professionals can't learn anything from him - they can do at their own - and beginners don't understand anything. Kind of useless in my opinion.

  • @n00bie96
    @n00bie96 7 лет назад +65

    1. I don't get why this popped on my recomended videos list
    2. I clicked this because I'm curious (also after finishing 2 seasons of Mr.Robot and learned python 2.7 and 3 ish)
    3. the fact that he's like he lost his mind and recorded this alone, gives me an image
    of what the average programmers look like

    • @glokta1
      @glokta1 7 лет назад

      n00bie Lmao exact situation I am in. Where are you learning Python from and how far have you gone?

    • @n00bie96
      @n00bie96 7 лет назад

      TechyBoyProductions what are the odds. I only took free courses from I forgot his name (zed something, look it up) also from a phone app 'Learn Python' (forgot the developer). Currently laying my fingertips on Object Oriented Programming and it's intrigued me in many ways. Also still need to memorize some syntaxes though. You?

    • @glokta1
      @glokta1 7 лет назад

      n00bie Just RUclips basically. I've learned the loops and all and now I'm just practicing by looking up exercises to do. Check out Automate the Boring Stuff with Python, it's a great book to learn python. It's for free on the author's website. Oh and I think you're taslking about Learn Python The Hard Way by Zed Shaw.

    • @Dude-kd3ey
      @Dude-kd3ey 7 лет назад

      Lol Mr robot brought me here too xD

  • @tonewipera
    @tonewipera 7 лет назад +8

    You totally remind me of myself when I am solving something in the code.... talking to my self like you do to us. Neat video.

    • @Juke172
      @Juke172 7 лет назад

      tonewipera that's like rubber duck debugging. Really helps :D

  • @whoami1223
    @whoami1223 4 года назад +279

    he couldve done this in 5 minutes if he wasnt worried about the time or explaining what everything is.

    • @OfficialZaire
      @OfficialZaire 3 года назад +2

      In Italy they'd called him "fulminato"

    • @iamoneofHERO
      @iamoneofHERO 3 года назад +2

      And the moronic acting too

    • @siddharthswami9148
      @siddharthswami9148 3 года назад +1

      Exactly

    • @matiastoledo4201
      @matiastoledo4201 3 года назад +2

      He should had either focus on doing the challenge or just making a good video explaining the code as he was writing it, but still the video was simple and understandable

    • @georgiymalinovskiy3118
      @georgiymalinovskiy3118 3 года назад +18

      His amusing behaviour is what makes it worth WATCHING, if I need to get a quick ref - I'l check github sources or whatever.

  • @thesmileynoob
    @thesmileynoob 8 лет назад +6

    Man you are amazing! Subscribed! Also its nice that you explain stuff along the way. Keep it up.

  • @TheRealDexeN_
    @TheRealDexeN_ 7 лет назад +68

    24:48 - look at his face :D:D:D
    - runs the snake backwards.
    - dies from it
    - doesn't know whats going on
    - realizes that the "death" really worked, because he just died by running backwards..
    - realizes that it's actually impossible to run backwards in the original game AT ALL
    - ...?
    :D its actually entertaining watching you code :D

  • @2b4u-lmpedro14
    @2b4u-lmpedro14 5 лет назад

    I'm trying to learn to code. The basics r so boring but I learn so much for these video your fast pace and explaining as you go really keeps me watching

  • @kenneybohjort4314
    @kenneybohjort4314 8 лет назад +49

    The adderall is strong in this one :D

  • @MunyokiKilyungi
    @MunyokiKilyungi 8 лет назад +30

    Amazing dude. Please upload more videos. Can you do Tetris?

    • @TheCodingTrain
      @TheCodingTrain  8 лет назад +28

      definitely will consider it!

    • @bYgfoot
      @bYgfoot 8 лет назад

      really cool video it thought me a lot about java script I use the gamemaker engine and i'm really considering using java script

  • @maaziik1166
    @maaziik1166 4 года назад +6

    Such a great video, even though I didn't understand a single word. This got me so hyped, guess I am going to start coding

  • @thehomierudy1190
    @thehomierudy1190 7 лет назад +6

    I've never seen anything like this and have no idea what any of this stuff means or how's he's doing it but I'd love to learn how its very interesting. you've gained a new sub

  • @korujaa
    @korujaa 7 лет назад +758

    Great, now do Battlefield code.

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +104

      Oh, live this idea!

    • @truekep
      @truekep 7 лет назад +109

      in 10 minutes

    • @korujaa
      @korujaa 7 лет назад +10

      TK TrueKep hahahaaaahahah

    • @FTWMFXD
      @FTWMFXD 7 лет назад +1

      that works*

    • @justskillfull
      @justskillfull 7 лет назад +190

      while(connected){
      disconnect()
      }

  • @looch95
    @looch95 6 лет назад

    I love how much you explain your code, really helps us beginners, especially the diagrams.

  • @Entertainer760
    @Entertainer760 8 лет назад +11

    I'm not quite sure how I found you, but your channel is awesome! Keep up the great work! :) +1 sub

  • @Heidjnejdihbwjdihnskdhbe
    @Heidjnejdihbwjdihnskdhbe 7 лет назад +6

    Classic programmer/developer/coder ( whatever you prefer ), always underestimating the time needed. Think of a project and be like "hmm, ok I can nail this in 15 minutes", 30 minutes later, not yet finished, "why do I always do this!?!?!?!".

  • @pnkfld7892
    @pnkfld7892 4 года назад +1

    Thanks for inspiring me to try to do this myself in cpp using sfml,
    I originally saw this video when it was live in 2016 and tried to implement in cpp without coming back to this vid.
    It was a lot of fun to practice some basic programming skills and learn a bit of sfml for graphics handling.

  • @gnamp
    @gnamp 8 лет назад +18

    If only we could pull that "technical difficulties" trick during our final exams...

  • @rowanburns4841
    @rowanburns4841 7 лет назад +13

    Subbed, glad this was on my recommended

  • @SammYLightfooD
    @SammYLightfooD 6 лет назад

    I didnt code in python for 2 years and now I built a working Snake game in an evening. Thanks for this!!

  • @solemnej6270
    @solemnej6270 7 лет назад +43

    Ive only coded in computer class and i built a website that was total clickbait and it was super fun (but i cant code like this guy FeelsBadMan)

  • @unclefkr8945
    @unclefkr8945 7 лет назад +16

    Just got accepted to the CodeCamp offered by Launch Code. Super exited to learn coding and get a job as a programmer!

  • @OakSwami
    @OakSwami 6 лет назад +3

    Damn dude...
    You make programming so intertaining!
    Im gonna start watching your vids to learn and try to pass my subject. xD

  • @CaioDanielNunesSantos
    @CaioDanielNunesSantos 7 лет назад +336

    I spent several days to do it in Assembly

    • @ScibbieGames
      @ScibbieGames 7 лет назад +38

      Caio Daniel Nunes Santos why would you do that in assembly.. mad respect but it's not really necessary..

    • @CaioDanielNunesSantos
      @CaioDanielNunesSantos 7 лет назад +20

      Scibbie / ǝıqqıɔS It's not necessary, but it's fun.

    • @CaioDanielNunesSantos
      @CaioDanielNunesSantos 7 лет назад +5

      Haeral It's not a good language for everything, but it's one of the easier ones after BASIC.

    • @ScibbieGames
      @ScibbieGames 7 лет назад +1

      Caio Daniel Nunes Santos I can understand it's fun, if you like doing that then I'm sure you'll be a great programmer. I tried to understand it . but my code never runs, but assembly is really cpu-specific which is a thing I don't like that much xD. still, MAD RESPECT

    • @CaioDanielNunesSantos
      @CaioDanielNunesSantos 7 лет назад +4

      I'm not a programer, and I won't be. But I alays make it for fun. Follow me on Git Hub: github.com/caillouplus

  • @pdrgallo
    @pdrgallo 7 лет назад +9

    I dont know the first thing about programming but i really enjoyed it somehow. I like how your mind works

  • @mrcoolgoat9391
    @mrcoolgoat9391 7 лет назад +10

    lmao when he turned the volume down I turned it up just before

  • @violencechildren7603
    @violencechildren7603 8 лет назад +31

    Challenge Recuest... Online FPS game with realistic graphics in 10 seconds please

    • @dazzyx3644
      @dazzyx3644 8 лет назад +27

      lets give him 11 seconds just cuz he has to make it online
      Kappa

  • @carloscabrera8446
    @carloscabrera8446 5 лет назад +3

    Started programming today, will share when I'm able to do it, love ur vids, keep it up:)

  • @BakedBrotatoChip
    @BakedBrotatoChip 7 лет назад +36

    I know nothing about coding but I enjoyed watching this for some, God knows why, reason

  • @Philgob
    @Philgob 7 лет назад +82

    I am watching this but I literally have NO idea what's going on

  • @gendawg4584
    @gendawg4584 4 года назад

    Despite the time limit and building from scratch. You are really great at explaining.
    Better then most how to code tutorials....

  • @doodlemonstah5656
    @doodlemonstah5656 7 лет назад +18

    him: "I don't really want to use 'death' as a variable name"
    me: uses death as often as possible

  • @Ergoperidot
    @Ergoperidot 8 лет назад +46

    I'm currently 19 and thinking about majoring in computer science. I can only dream of the day I can do something like this...

    • @MrJeng300
      @MrJeng300 8 лет назад +12

      Rin Tezuka well then start game programming as a hobby! I could make stuff like snake or simple platformers when i was 14 or so, just because i really wanted to make games! so many great tutorials and stuff online!

    • @MrJeng300
      @MrJeng300 7 лет назад

      *****
      I'd say Java is a good start because you can make a LOT of stuff with it right out of the box, without the need for external libraries. Personally, I'd start with C nowerdays, to get a better grasp of the basics, but really, it doesn't matter as long as you do something.

    • @MrJeng300
      @MrJeng300 7 лет назад

      *****
      I think it depends a lot on the type of person. For me, the beginning was pretty easy and I made small games with Java pretty soon. With some dedication and effort you can be coding games in like a week!

    • @MrJeng300
      @MrJeng300 7 лет назад +1

      *****
      Yeah, I taught myself though and it was still a good experience. Nowerdays great tutorials on programming are everywhere! I did start with a youtube series that the creator nowerdays sells though, so it was indeed quite a good source. Anyways, you can always find help in forums and stuff if you need it!

    • @MrJeng300
      @MrJeng300 7 лет назад +1

      *****
      Those drag&drop tools are a cool way for introduction, but if you actually wanna do something with programming later I would recommend learning a proper language. Many find python being a good way to start. I personally don't like python too much and started with visual basic and later Java myself, but that is totally up to you, really. You will learn more languages later anyways. If you wanna go the hard but possibly better way, I'd start with learning C. Getting a hang of pointers & memory management can be a huge boost in understanding what your code does. The biggest factor anyways, is that you do start. Make coding a habit, learn something new every week! Have fun!

  • @bersi3306
    @bersi3306 2 месяца назад

    I like how he spares no words for the explaination against the time...he just speaks faster

  • @granumuse7847
    @granumuse7847 5 лет назад +5

    Man you are my hero!! You have coded so many things so far!!! Thank you!!!!

  • @jonhtte
    @jonhtte 7 лет назад +5

    My mind just blew up.

  • @Baelfyr
    @Baelfyr 2 года назад +1

    I know this video is 6 years old, and i love your videos regardless, but things like this, i would love to see long form videos of, like, coding the entire game, add graphics, code the death of the walls, and the going backwards, code it all, i could watch this all day long.

    • @bytezorro
      @bytezorro 2 года назад

      Hi! I've recently started a channel about coding, where I show all the steps in ASMR format on how to create programs. Would love it if you could give some feedback on the content. Thanks Happy coding!

  • @Underdrummer
    @Underdrummer 8 лет назад +4

    Love your energy. Great video!

  • @JaimewissnerCreate
    @JaimewissnerCreate 7 лет назад +18

    "And I actually have a diagram", yup. That's a programmer alright.

  • @mohamedekwa3777
    @mohamedekwa3777 3 года назад +2

    I loved adding the Arabic language for translation, please continue with that, Your follower from Egypt, thank you ❤✌

  • @smilingalpaca1025
    @smilingalpaca1025 5 лет назад +5

    I can't believe the fact that I've watched this vid a few months ago without any knowledge for programming and now I'm here again realising that he's actually using Processing, that I'm actually learning with

  • @caynereed8988
    @caynereed8988 7 лет назад +8

    When you have no idea what is going through your mind ATM watching this.video

  • @alisonjannette3084
    @alisonjannette3084 5 лет назад +2

    i found this so entertaining, i love your enthusiasm

  • @jimbeam9788
    @jimbeam9788 8 лет назад +12

    shit this makes me anxious watching this

    • @TheCodingTrain
      @TheCodingTrain  8 лет назад +9

      Just think about how anxious I am recording it!

  • @Orangeszs
    @Orangeszs 7 лет назад +4

    Description: Welcome to this 10 minute coding challenge.
    Video Intro: Welcome to this 15 minute coding challenge.
    Video Length: 27 minutes

  • @haider4899
    @haider4899 7 лет назад +99

    FUCKIN hell. there's no way i can think of EXACTLY which methods I'd need beforehand. I'd add method as I need them. how are you able to do it? are you on drugs? did you plan it beforehand? i think you did.

    • @baqikenny
      @baqikenny 7 лет назад +26

      cocaine is a hell of a drug son

    • @haider4899
      @haider4899 7 лет назад +12

      yeah, i never fuck around with JavaScript graphics stuff but I'm slowly getting into it. seems like he's also pretty familiar with the p5 framework. I'll have to read the docs, like for 20 mins before I can draw a single rectangle.

    • @baqikenny
      @baqikenny 7 лет назад +8

      candh he's probably a teacher lol

    • @baqikenny
      @baqikenny 7 лет назад

      Demonism yeah all the confidence and passion with his job haha

    • @baqikenny
      @baqikenny 7 лет назад

      Demonism just like your name

  • @locrates
    @locrates 7 лет назад +107

    i know nothing of code. reeeealy wanted to see it complete =/

    • @radecreative6620
      @radecreative6620 7 лет назад +1

      Same

    • @T0ly113
      @T0ly113 7 лет назад

      locrates just learn to code?

    • @locrates
      @locrates 7 лет назад +5

      You know- Id love to learn but I'm such a slow learner. I have a couple of graphic designs for apps, one I know damn well facebook would be down to buy.. I'm simply hoping my youtube channel next year helps me be put in the position I could work with someone who really knows what they are doing to make the app possible..

    • @vernonalbayeros4719
      @vernonalbayeros4719 7 лет назад +4

      if you want to learn at your own pace, hit codeacademy up, it's got free courses on c,c++, python and javascript. Udemy sometimes offers discounts on their courses for around 15€ if you want more advanced stuff :)

    • @izybit
      @izybit 7 лет назад +5

      You can check freecodecamp.com for completely free coding lessons.

  • @belskysol
    @belskysol 5 лет назад +1

    these videos are seriously amazing, really helpful for someone who wants to learn coding.

  • @stingy1304
    @stingy1304 7 лет назад +5

    Idk how i got here. But the content is bomb, so i subbed and hit the bell.

  • @deeeeeds
    @deeeeeds 7 лет назад +11

    it's a shame you cut the debugging out, it's really interesting to watch the process.

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +11

      +SenoreQueso if you watch my live stream archives nothing is cut out!

  • @pikachuu3542
    @pikachuu3542 4 года назад +2

    I dont know anything about programming but i enjoyed watching this video

  • @developertools95
    @developertools95 4 года назад +23

    me : successfully prints "Hello World"
    I'm gonna hack Nasa now.

  • @nugs2727
    @nugs2727 4 года назад +3

    Can I just say something real quick, thank you, i've been trying to learn how to code for a while now and people say that you need to be a logical person to become a programmer of some sort. Well just a few seconds ago, my heart sank and it just clicked and suddenly I just realised that all of this language makes sense to me. It's scary to think about what i've really accomplished. Of course I will still need to learn java but it just clicked and I realised that I could probably take this piece of code and turn it into something other people could understand. So again thank you.

  • @lordvenomous6335
    @lordvenomous6335 5 лет назад

    Keep up the good work, you inspire me to love programming even more and have given me a love of it.

  • @8bit_pineapple
    @8bit_pineapple 8 лет назад +8

    Good video ^^, JavaScript looks quite fun to program in. Usually I program in C++/C and python for quick projects. I think I'll start using JavaScript in place of Python when my code needs to be a bit more object oriented :)

    • @theguitarmanifest
      @theguitarmanifest 8 лет назад +4

      8bitpineapple actually python is better for oop since it is an object oriented language. Javascript isn't truly object oriented.

    • @rumble1925
      @rumble1925 8 лет назад +2

      Cory, you're talking shit. It's not class based, but it is object oriented.

    • @Euroliite
      @Euroliite 8 лет назад +1

      Jano Privracki JS isn't exclusive to running inside browser though, so it's still an option.

    • @Euroliite
      @Euroliite 7 лет назад +1

      *****
      Yup. Take a look at Node.js I believe it uses Google's JS engine from Chrome.

    • @michaelmano7261
      @michaelmano7261 7 лет назад

      Euroliite nodejs is exported from the browser however a lot of the devs who were the founders are moving onto golang. if you prefer things like this that are not browser specific you should check out go.

  • @georgie1874
    @georgie1874 8 лет назад +4

    you earned a sub. have no idea what is going on but I'm learning lol