Coding Challenge 169: Pi in the Sky Game

Поділитися
Вставка
  • Опубліковано 13 бер 2022
  • Happy Pi Day! How many delicious digits of Pi can you catch from the sky? In JavaScript! thecodingtrain.com/challenges...
    p5.js Web Editor Sketches:
    🕹️ Pi in the Sky: editor.p5js.org/codingtrain/s...
    🕹️ Illustrated Version: editor.p5js.org/codingtrain/s...
    🎥 Previous video: • Coding Challenge 168: ...
    🎥 All videos: • Coding Challenges
    Links discussed in this video:
    🔗 1 Million Digits of Pi collected by Eve Andersson: www.eveandersson.com/pi/digits...
    🎶Pi Day song by / willfromamerica
    Other videos mentioned in this video:
    🎥 Coding Challenge 3: The Snake Game: • Coding Challenge #3: T...
    🎥 Coding Challenge 4: Purple Rain: • Coding Challenge #4: P...
    🎥 Code! Programming for Beginners with p5.js: • Creative Coding for Be...
    🎥 Transformations in p5.js: • How to Rotate Shapes i...
    🎥 Removing Objects from Arrays: • 7.5: Removing Objects ...
    Timestamps:
    0:00 Happy Pi Day
    🚂 Website: thecodingtrain.com/
    👾 Share Your Creation! thecodingtrain.com/Guides/com...
    🚩 Suggest Topics: github.com/CodingTrain/Rainbo...
    💡 GitHub: github.com/CodingTrain
    💬 Discord: / discord
    💖 Membership: ua-cam.com/users/thecodingtrainjoin
    🛒 Store: standard.tv/codingtrain
    📚 Books: www.amazon.com/shop/thecoding...
    🖋️ Twitter: / thecodingtrain
    📸 Instagram: / the.coding.train
    🎥 Coding Challenges: • Coding Challenges
    🎥 Intro to Programming: • Start learning here!
    🔗 p5.js: p5js.org
    🔗 p5.js Web Editor: editor.p5js.org/
    🔗 Processing: processing.org
    📄 Code of Conduct: github.com/CodingTrain/Code-o...
    🎶Misc Music and Sound from www.epidemicsound.com/
    This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/websit...

КОМЕНТАРІ • 193

  • @TheCodingTrain
    @TheCodingTrain  2 роки тому +20

    Play the game! thecodingtrain.com/pi2022 (Comment with your high score!)

    • @YoyellDCube
      @YoyellDCube 2 роки тому

      Hey dan can u help me in the slide puzzle when i try to activate the simpleShuffle(board) it says floor is not defined

    • @caenir
      @caenir 2 роки тому +1

      Gotta say that it's practically impossible to tell how many slices a pie has on desktop. Maybe if the colours were consistent among the different slice quantities, it'd be a lot easier. Can't get past 3.1

    • @ToufouMaster
      @ToufouMaster 2 роки тому

      pls make RayMarching Coding Challenge
      Good video again

    • @redpug5042
      @redpug5042 2 роки тому

      3.1 is as far as i can get. It's really hard to do it. It runs so fast.

    • @TheCodingTrain
      @TheCodingTrain  2 роки тому

      @@caenir yes, this is good feedback! The game isn't as playable as I had hoped! But maybe we can improve it over time!

  • @coolbrotherf127
    @coolbrotherf127 2 роки тому +121

    Since I started watching these videos, I started with the simple stuff like this now I've been able to make any number of my own projects. I guess it's not too complex, but knowing I could code this from scratch without any instructions makes me realize how far I've come.

    • @Jova
      @Jova 2 роки тому +8

      Yeah, being able to make simple-intermediate things from scratch without any instructions is a good way to know that you've become adept at a programming language.

    • @theman7050
      @theman7050 Рік тому

      Plz share your work

  • @pascal12355
    @pascal12355 2 роки тому +42

    I have 7+ years of programming, including mobile, web and game development, but man when is a new video out I watch it like is my first day of school!

  • @max-yasgur
    @max-yasgur 2 роки тому +10

    Thank you for making the length of the video 31:41

  • @Atrulion
    @Atrulion 2 роки тому +37

    I love your content, and I owe you so much respect. I started programming (at least programming seriously) for half a year ago. I am currently 16, and your videos has inspired me so much you have no idea. I have constantly been trying to recreate your ideas, like snake, fractal trees, tic tac toe, and also raycasting. This has given me a huge boost in the start, and now I love programming, and it is one of my biggest hobbies. I seriously can't thank you enough, you have helped me so much.

  • @pvic6959
    @pvic6959 2 роки тому +20

    I _KNEW_ there would be a Coding challenge today!! im so excited!

  • @ShaneDavisDFTBA
    @ShaneDavisDFTBA 2 роки тому +2

    I was so happy when I managed to spot the second missed “this.” and sat here grinning while waiting for the song.

  • @AdamSchelenbergCom
    @AdamSchelenbergCom 2 роки тому +4

    I am just amazed of how entertaining and educational these videos are. Thank you Daniel.

  • @henry4240
    @henry4240 Рік тому +1

    How crazy is it that the video is 31 minutes and 41 seconds long. Lovely pi day

  • @htdetonator1847
    @htdetonator1847 2 роки тому

    I have watched like 2 of your videos in the past, but I have been watching a ton more because I’m taking a programming class at my high school, and I’m really enjoying watching these learning more things every video. :)

  • @adershvarshnei5198
    @adershvarshnei5198 2 роки тому +12

    These coding challenges always feel wonderfully cozy to watch

  • @geoffwagner4935
    @geoffwagner4935 2 місяці тому

    That is pretty amazing, writing the processing book in the 2000's..... I was still pretty much a kid I think 13 and just enough to get Millennium installed and get excited about the "restore" feature, that just became more and more evident, it really needed it. it wasn't so much a new feature, as was closer to an essential component like, a spark lug for an engine, or 8 spark plugs if you had a v8.

  • @shmupful
    @shmupful 2 роки тому

    Man, I just love you enthusiasm, it is contagious!

  • @aeschynanthus_sp
    @aeschynanthus_sp 2 роки тому +4

    Pi may be the only number you can eat but "kuusi" is the only number in Finnish you decorate at Christmas.
    ("Kuusi" is actually two words, one meaning 'six' and the other 'spruce', which is what is used for the Christmas tree in Finland. I say "two words" because they are inflected differently.)

  • @thounilo
    @thounilo 2 роки тому

    this dot is great example of why using composition over inheritance is better in vanilla js

  • @YoyellDCube
    @YoyellDCube 2 роки тому +3

    Love ur content dan keep up the good work and u r an amazing person to watch , have fun and learn code from

  • @khalidsakka8020
    @khalidsakka8020 Рік тому

    this video shows why i love this channel

  • @alistaw1866
    @alistaw1866 2 роки тому

    I can't get enough of your videos, you're just amazing sir!

  • @CodingAdventures
    @CodingAdventures 2 роки тому

    Your new formula to prepare this videos is quite interesting: live streaming on Twitch and videos on UA-cam! Thanks for this nice video!

  • @jonatanlaksamana462
    @jonatanlaksamana462 Рік тому

    Remember back in 2017 when i first watch his channel im still trying learning oop backthen, but your videos never fail impress me untill this day.

  • @LordHonkInc
    @LordHonkInc 2 роки тому +2

    Happy Pi Day! Thank you as usual for these great videos, and regardless if it's large projects or just a "simple" but beautiful visualization of some mathematical idea (the bezier curve video is, at least for me, the most understandable definition I've seen for how they work), I always love watching and coding along :)
    By the way (and this isn't meant as anything more than a passing bit of trivia), this project reminds me very much of one in the first book I've ever read on C++ (except it was more of a "space ship shooting oncoming asteroids" game, but conceptually it tried to teach similar lessons, y'know, classes for the objects on screen, how to implement a main loop, stuff like that). It's called "C++ für Spieleprogrammierer" by Heiko Kalista. Yeah, it's in german and I'd say pretty outdated by today's standards (heck, anybody here remember "Simple DirectMedia Layer"? xD), but thought I should still source it. God, I was so confused back then, didn't even understand what a singleton was back then.

  • @_abdul
    @_abdul 2 роки тому

    I'm really Happi to get a Coding Challenge video today.

  • @sarvagya5817
    @sarvagya5817 2 роки тому

    169th Coding Challenge !
    Nice!

  • @drinkingcat3065
    @drinkingcat3065 2 роки тому

    Dude ive been watching you since 200k subs, i love your videos.

  • @whip8
    @whip8 2 роки тому

    The song at the beginning is the real accomplishment here

  • @RNeilen216
    @RNeilen216 2 роки тому

    I already know a good amount of oop, but I thought this was bar far one of you best explaination with oop. Excellent job!!!

  • @Otakutaru
    @Otakutaru 2 роки тому +2

    Really concise explanations, 10/10 programming video

  • @astropgn
    @astropgn 2 роки тому

    The best "pi video" I've seen so far! Great =D

  • @erichlof
    @erichlof 2 роки тому

    Alt game title: "Catcher in the Pi" - or is that too highbrow? Lol, thanks for another great video!

  • @Troy-ol5fk
    @Troy-ol5fk 2 роки тому +1

    Maybe slice the whole canvas vertically into many strips, and place each pie in a random strip(like a running track), so they don't overlap each other

  • @terraflops
    @terraflops 2 роки тому +1

    the live stream to the final version, great stuff

  • @sTale0
    @sTale0 2 роки тому

    Just joined the train. Loved the previous videos.

  • @CannonBallEddie
    @CannonBallEddie 2 роки тому

    I am still going through your processing videos, I bought 3 books by you. Noticed that processing seems to be on the back burner for you. I would like to see a series on sound please, pretty please. Also wish you was around when I was a kid, maths might have been enjoyable rather than something I'd skip.... Appreciate the free videos, your time and the knowledge you share.

  • @ThatOneAgarAgarioThePro
    @ThatOneAgarAgarioThePro 2 роки тому +1

    Dan is on a grind much love from the train of coding

  • @xSungamerx
    @xSungamerx 2 роки тому +5

    The game you have at around 19 minutes could be a perfect cell number input program for r/badUIbattles

  • @martinvivian9772
    @martinvivian9772 2 роки тому +1

    I think the game should check if the digit the player needs is on the screen, and put it in if it's not, so you dont have to wait for the rng to give you the right digit. It can be random if the digit the player needs is there.

  • @FrostDrive
    @FrostDrive 2 роки тому

    Hahahaha I laughed so hard at the train waving ending xD

  • @VeloRV
    @VeloRV 2 роки тому

    this was beautiful! lmao i loved it

  • @gabrielmalek7575
    @gabrielmalek7575 2 роки тому

    You're the MVP man :)

  • @scorusadrian6850
    @scorusadrian6850 2 роки тому

    What kind of "baking powder" you used for those pies?. Can't stop laughing. Great videos, man!

  • @ensabinha
    @ensabinha 2 роки тому

    I love your videos. One thing that could be cool is to consider time in the movement of objects instead of only relying on the FPS.

  • @paepaenuanphan8512
    @paepaenuanphan8512 2 роки тому

    It’s so inspiring for a beginner like me ;) 🥰 love it!

  • @thehappycoder3760
    @thehappycoder3760 2 роки тому

    Brilliant love it

  • @molvenma1446
    @molvenma1446 2 роки тому +2

    Oh… It's very spicy in Russian.
    Big "PI" & "SKY" read together like Russian word for "рussу" (but it is also genderless).

  • @ravpanda037
    @ravpanda037 2 роки тому

    I love the pi day videos

  • @leonardodelima2424
    @leonardodelima2424 2 роки тому

    I've been watching your videos for a few months now (very nice, by the way! I love your content), but only now I learned that your name is Daniel and not Coding Train Guy.
    I don't know if I just don't pay attention or you never intruduced yourself in your vídeos....
    Anyway, nice to meet you, Daniel.

  • @geoffwagner4935
    @geoffwagner4935 2 місяці тому

    *wonders are we getting a new pi day stream tomorrow* wow...... it's like a time lapse , what a shocking and crazy photo of Shiffman , i may actually need the computer with Golom Levin to interpolate the resemblance. Pasty pale skin. no beard. If those chompers took a bite of a pie, it's probably no mistaking who did it. Just watched "Bloorayne" the other night, trying to find a book i read a quarter pretty sure game is based on, and trying to find, was sure it might be it. Was actually really good, but wow, this Shiffman could ran right out of it.

  • @arhamirfan
    @arhamirfan 2 роки тому

    I love your videos!

  • @Fiercesoulking
    @Fiercesoulking 2 роки тому +1

    My birthday is always so fun not that being born on the same day as Einstein alone is fun.

  • @tysoe27
    @tysoe27 2 роки тому

    "6...6...8...9...4...9"
    *Camera shakes aggressively"
    "THAT'S NOT PI!!!!!1!!!1!"
    🤣🤣🤣

  • @TheFinagle
    @TheFinagle 2 роки тому

    I would use a check when spawning the pie to see if the needed number is in any of the existing pies and if its not then thats the number you spawn.

  • @bububirb
    @bububirb 2 роки тому

    this. 😝
    Happy Pi day!

  • @antoningranados3491
    @antoningranados3491 2 роки тому +2

    Hello, have you tried the Fibonacci sequence in the Ulam spiral ? 😄

  • @morgengabe1
    @morgengabe1 2 роки тому

    you can also eat 8008135 and 455. probably some great meals in hexadecimal, and beyond, too!

  • @franchello1105
    @franchello1105 2 роки тому

    Reminds me of this game where babies were falling out of a burning building that you had to rescue.

  • @walnutsandbeastiality866
    @walnutsandbeastiality866 2 роки тому

    ,,Butterfly in the sky
    I can go twice as high
    Take a look
    It's in a book
    A reading rainbow" 🎶

  • @gergonagy846
    @gergonagy846 2 роки тому +1

    Even the length of the video is 31 41... WOW!

  • @vasevase2323
    @vasevase2323 2 роки тому

    My fav channel

  • @hussainsalih3520
    @hussainsalih3520 2 роки тому

    keep going my teacher , thanks for all :)

  • @kishrajsrk
    @kishrajsrk 2 роки тому

    excellent...

  • @NiscMC
    @NiscMC 2 роки тому

    Yay new coding challenge

  • @dainou0001
    @dainou0001 2 роки тому

    Could you not add a random number between 0 and 2pi to the "a" variable for the random rotation in the arc function?

  • @sc6the
    @sc6the 2 роки тому

    Coding Quest would be a cool name

  • @servv3167
    @servv3167 2 роки тому

    Thank you Sir

  • @thedarkknightclipss
    @thedarkknightclipss 2 роки тому

    My favourite UA-camr😘😘

  • @carlclayton2190
    @carlclayton2190 2 роки тому

    I think it would be good if you get the correct number, it displays at the bottom, but if you get an incorrect number, rather than game over, it will remove the previous number you got, so you have to get it again. This way, over time you will learn the number PI, as it will become engrained. Maybe a time limit, so the goal is to see how big a string you can make. That then could become a high score to try to beat

  • @Visual-Synthesizer
    @Visual-Synthesizer 2 роки тому +2

    Thank you so much. Your videos are great for me, the time you take on visuals is super helpful . I’m kinda retarded dyslexia. Now i program my own AI art assistants , blockchain code and can read most code patterns!

  • @sqtapnic
    @sqtapnic 2 роки тому

    Awesome

  • @toastyPredicament
    @toastyPredicament 2 роки тому

    It was perfect.

  • @ryanbucinell7301
    @ryanbucinell7301 2 роки тому

    I just appreciate that in the suggestions page yt said the video length was 31:41

  • @psrs985
    @psrs985 2 роки тому

    Even my 4 year-old cousin loves this

  • @MrCalifornium
    @MrCalifornium 2 роки тому

    Thank you for the great content as always. Please, plesae have a look at the magic code wheel by Mathlogger. He poses a programming challenge to create an infinite circular slide rule. On the surface is rather trivial as in its essence all you need are two circles with log scales, but the infinite zoom... I don't even know where to begin

  • @danieldouglas210
    @danieldouglas210 2 роки тому

    If this guy was my teacher at school I would never have dropped computer science.

  • @RajJaiswal538
    @RajJaiswal538 2 роки тому

    Pi day was yesterday according to our timezone
    But even a day late,it can't be Pi day without you!

  • @Tom-vr5yv
    @Tom-vr5yv 2 роки тому

    What theme do you use?

  • @albert0zzz
    @albert0zzz 2 роки тому +1

    Лол, отличное превью!

  • @toastyPredicament
    @toastyPredicament 2 роки тому

    Smart pacemaker

  • @kevnar
    @kevnar 2 роки тому +1

    ...and the length of the video is 31:41. Clever.

  • @AknKocoval
    @AknKocoval 2 роки тому

    Hello, I have a question. Actually, I want to learn the web programming. That means I need to learn HTML, CSS and JavaScript. But what about processing? Is it going to help me because I have your two books, but don't know how to start. 😩

  • @amarmerabti8338
    @amarmerabti8338 2 роки тому +1

    The video's time is also the first digits of PI, and i dont think it's a
    coincidence

  • @ajthemagi2913
    @ajthemagi2913 2 роки тому

    And the video is 31 minutes and 40 seconds! META PI

  • @thealexconnor9988
    @thealexconnor9988 2 роки тому

    woah, even made the video be 31 minutes 41 seconds (from thumbnail)

  • @TrollingAround
    @TrollingAround 2 роки тому

    @9:09 "and now I have 2 pies" - no, you have "tau".

  • @toastyPredicament
    @toastyPredicament 2 роки тому

    Hi can you run (brb saving model) a C program on your phone.

  • @anusha8085
    @anusha8085 2 роки тому

    Oh Dan, you're such a rainbow

  • @cillian_scott
    @cillian_scott 2 роки тому

    Do programmers not use vim or similar binds? This mouse work seems extremely tedious.

  • @Mr_Wheels74
    @Mr_Wheels74 2 роки тому

    One SMALL point of critique/criticism: I'm a person who likes to try and type out the code along as you do it. While the fast forwarding of the typing is fine (I can just pause the video) sometimes the screen gets changed before you actually get to see what's typed. If there's some way to change that, that would be great.

    • @TheCodingTrain
      @TheCodingTrain  2 роки тому +1

      Thanks for this feedback! We try to keep every line of code that is added visible but sometimes we miss the mark. Feel free to point out any time codes that are particularly hard to follow so we can reference in the future!

  • @amiapony
    @amiapony 2 роки тому

    happy Pi day friends

  • @KeygaLP
    @KeygaLP 2 роки тому

    Ah, yes the this dot song!

  • @moncef2733
    @moncef2733 2 роки тому

    I caught: 3.14159265358979323846264338327950288419716939937510582097494459230781640628 pies! I was about to be stuck for the rest of my life playing this game but unfortunately it came to an end

  • @trafalgarlo9249
    @trafalgarlo9249 2 роки тому +2

    все мы знаем что на превью писки....

  • @TankorSmash
    @TankorSmash 2 роки тому

    These are great, but the audio effect for errors (bzzzt!) are a little offputting! They're all in good fun but it makes the audio a little less pleasant

    • @TheCodingTrain
      @TheCodingTrain  2 роки тому

      Thanks for the feedback! Just that one sound effect or others too?

  • @ariseyhun2085
    @ariseyhun2085 2 роки тому

    I feel like you should've highlighted the correct pie to catch, maybe in green or some other color to make it a little easier

  • @therayvenn3482
    @therayvenn3482 2 роки тому

    Happy pi day!!!

  • @toastyPredicament
    @toastyPredicament 2 роки тому

    Thank you for making thid

  • @TheMrWiktor
    @TheMrWiktor 2 роки тому

    What is funny, in my languege "pies" means a dog :p nice video

  • @dynamo4945
    @dynamo4945 2 роки тому

    The Obligatory Pi day coding challenge!

  • @LuizFeReis
    @LuizFeReis 2 роки тому

    ❤️

  • @quaxh
    @quaxh 2 роки тому

    need more processing videos!!

  • @SpencerTwiddy
    @SpencerTwiddy 2 роки тому

    ahhh the video length is one second off from being the first four digits of pi

    • @TheCodingTrain
      @TheCodingTrain  2 роки тому

      This is a UA-cam bug! It’s the correct length. If you look at the thumbnail preview it says 31:41

    • @SpencerTwiddy
      @SpencerTwiddy 2 роки тому

      @@TheCodingTrain awesome, it would have been so sad if it was one short