Replacing A String 2000 Times Per Minute... Creates An Amazing Visual Effect

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

Комментарии • 94

  • @Snippets_Code
    @Snippets_Code  4 месяца назад +8

    If you find this video valuable then do Like Share Comment and Subscribe to the channel: ruclips.net/channel/UCNWGZXzuU9oGggS2egZiKxA

    • @ikcode
      @ikcode 4 месяца назад

      Please provide code to practice beginners can't do this by themselves

    • @Snippets_Code
      @Snippets_Code  4 месяца назад

      Sure, I have mentioned the link to code in video description 🙂

    • @ikcode
      @ikcode 4 месяца назад

      @@Snippets_Code Thank you such much and keep growing and shining 🌟

  • @crism8868
    @crism8868 3 месяца назад +236

    1:37 Awesome, you just killed my laptop speakers 🧨

  • @IvyANguyen
    @IvyANguyen 3 месяца назад +87

    1:30 - 'Next, we will generate the fire' BOOOOOOOOOOOM.

  • @herosova
    @herosova 4 месяца назад +87

    better use request animation frame so that it become non blocking

  • @22sourabh
    @22sourabh 3 месяца назад +50

    1:34

  • @CaptainPanick
    @CaptainPanick 3 месяца назад +57

    Pretty cool ASCII animation, but I'm more impressed by your presentation. What software did you use to create the animations of your presentation with?

    • @CaptainPanick
      @CaptainPanick 3 месяца назад +2

      There is a tool called Motion Canvas and I'm wondering if you used that....

    • @hakuruyu
      @hakuruyu 3 месяца назад

      @@CaptainPanickr/lefttheburneron

    • @CaptainPanick
      @CaptainPanick 3 месяца назад

      @@hakuruyu lol, I can see why you'd think that.

  • @aCitizenJOSerased
    @aCitizenJOSerased 4 месяца назад +16

    Immense animations on the video! Such an awesome presentation!

  • @kur0sh1
    @kur0sh1 2 месяца назад +1

    A very convoluted way of explaining it...

  • @jamjumper
    @jamjumper 3 месяца назад +5

    You can use higher order functions for most of your for-loops,
    For example .forEach(), .map() and .reduce()
    Also just use a two-dimensional array, so identifying the depth is easier :)

  • @borsukk
    @borsukk 3 месяца назад +24

    you should use some noise multiplied by other noise to get better effect, also you didn't explain to use mono font, besides that good for beginners

    • @joeyhazlett
      @joeyhazlett 3 месяца назад +3

      That's the purpose of pre tag, which he did mention.

  • @lajtilajti
    @lajtilajti 4 месяца назад +3

    This is insane, i'm impressed 🤯

  • @notorious3875
    @notorious3875 4 месяца назад +233

    Disliked for adding sheety loud noise in middle

    • @Snippets_Code
      @Snippets_Code  4 месяца назад +75

      I will make sure to fix it from the upcoming videos, thank you for letting me know 🙂

    • @hatsunemiku9323
      @hatsunemiku9323 4 месяца назад +22

      ​@@Snippets_Codei was kinda taken by surprise, i thought that perhaps you forgot to tone down the clip's volume.

    • @nicholas_obert
      @nicholas_obert 3 месяца назад +40

      Disliking the video just for that seems a bit excessive, though. The content was good

    • @tweetyguy7347
      @tweetyguy7347 3 месяца назад +27

      Disliking one of the best pieces of content that teaches how to create a cool effect in a way where there is minimal effort to translate this to other languages is such a soy boy js dev move

    • @nickst2797
      @nickst2797 3 месяца назад +5

      If I would dislike, it would be for JavaScript. However, the video is good.

  • @clympsarchery
    @clympsarchery 3 месяца назад +34

    1:35 Oh this is the best moment of the video

  • @DavidFeliz
    @DavidFeliz 4 месяца назад +4

    Liked and subscribed... it reminded me of my student days using the C language 😊

  • @dominiquefortin5345
    @dominiquefortin5345 3 месяца назад +18

    There are so many errors and laziness in the code that I would be ashamed of publishing this if I was you. Or maybe, this just an AI generate code for a cash grab to get RUclips revenus. Also, the code you give does not make the wanted fire output, you should test your code.
    The +1 in (width*height+1) to fill the array at the beginning, is donne just so the calculation of averageValue doesn't break because it is not done properly, shows the laziness of the programmer.
    Here is an obvious error, when you put the end of line in the string the if statement should be "if ((i+1) % width === 0) {" and not "if (i % width === 0) {".
    Why a random column when initializing the array ? It is already assigning a random character just use i (+ bottom line position) as the index. This has to be AI generated code. No sane programmer would do this.

    • @SixOThree
      @SixOThree 3 месяца назад +5

      It's not his code. And as he said at the beginning, the guy is a front end developer who shared some 140 experiments in this github repo. Cut him some slack and stop being a jerk.
      But you did identify the issue that causes the fire to creep to the left. Lastly, the random column is a hack to increase the number of spaces on the bottom row.

  • @PicSta
    @PicSta 4 месяца назад +10

    Can you provide a link to a working codepen, plsssss? This is amazing. Thanks, SC!

    • @Snippets_Code
      @Snippets_Code  4 месяца назад +3

      I have mentioned the link to code in description 🙂

    • @PicSta
      @PicSta 4 месяца назад +1

      @@Snippets_Code thank you very much 🙂

  • @someonewhowantedtobeahero3206
    @someonewhowantedtobeahero3206 4 месяца назад +1

    Nice visuals, great explanation!

  • @wardrich
    @wardrich 2 месяца назад +1

    If you thought thst was neat, the "bb" demo will blow your mind.
    That fire demo looks a lot like the one from aafire/cacafire (from aalib/libcaca respectively)

    • @SamusUy
      @SamusUy 2 месяца назад +3

      yeah, young js devs rediscovering 20yr old stuff

    • @wardrich
      @wardrich 2 месяца назад +1

      @@SamusUy a new generation of Apple inventors 😂

  • @Derpalerpa
    @Derpalerpa 3 месяца назад

    Liked the tutorial 💜

  • @OrchidAlloy
    @OrchidAlloy 3 месяца назад

    Surprisingly simple

    • @5DPixel
      @5DPixel 3 месяца назад

      Yeah I thought this would be way more complicated

  • @mumk
    @mumk 3 месяца назад

    Amazing presentation and information, thanks

  • @Kīīng-Skull
    @Kīīng-Skull 4 месяца назад +4

    ❤❤❤ Now That is some Technical JS

  • @bishwashkumarsah171
    @bishwashkumarsah171 4 месяца назад +13

    I didn't understand 😢. But you explained well .

    • @Snippets_Code
      @Snippets_Code  4 месяца назад +3

      You can try checking the code, link the in the description, that might help you 🙂

  • @3_14pie
    @3_14pie 3 месяца назад

    thanks, I'll bash that for my terminal:)

  • @Majut.
    @Majut. 3 месяца назад

    why are people mad bro, good video

    • @Mutrax4706
      @Mutrax4706 3 месяца назад +1

      some people dont like how loud the explosion was

    • @Majut.
      @Majut. 3 месяца назад

      @@Mutrax4706 only the tistic ones

  • @v0idbyt3
    @v0idbyt3 3 месяца назад

    this video is interesting i will try to recreate it

  • @mac.ignacio
    @mac.ignacio 3 месяца назад +38

    This is slow. Too many loops. You can do this in 1 loop.

    • @SuperFoxy8888
      @SuperFoxy8888 3 месяца назад +6

      How?

    • @gnelsedrakyan7366
      @gnelsedrakyan7366 3 месяца назад +8

      No reason to do that, iterations number will be same, or you got some interesting way I don't thought about

    • @Cyberlong
      @Cyberlong 3 месяца назад +13

      Dude, you can't say "this can be done in one loop and not say how. That and saying nothing is the same, that's just throwing hate for hate's sake

    • @The_Red_Scare
      @The_Red_Scare 3 месяца назад +2

      Explain then.

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

      ​@@gnelsedrakyan7366 You don't necessarily end up with the same number of iterations, but in this context it's very likely that the micro-optimizations of prefix addition and unravelling won't really do much in runtime.

  • @immortalsun
    @immortalsun 3 месяца назад +4

    Why does the voice sound like AI?

  • @zanagi
    @zanagi 3 месяца назад +1

    Ooooh lit animations

  • @dosergiobr
    @dosergiobr 3 месяца назад

    Replace background to something like #830 as the grand finale.

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

    Why are you only using let even on static values that will never change?😅

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

    I’m losing it at the booooom controversy

  • @SpiritmanProductions
    @SpiritmanProductions 3 месяца назад +3

    "chars" is pronounced like "cars", not "cares".

    • @SpiritmanProductions
      @SpiritmanProductions 3 месяца назад +3

      @@melchiormagni 'Char' and 'chars' in code are abbreviations with their own established pronunciations. We devs pronounce them 'car' and 'cars'. And your suggested pronunciation is wrong: The first 'a' in 'character' (IPA: /ˈkarɪktə/) is pronounced like in 'cat', not 'care' (IPA: /kɛː/). Source: Oxford Dictionary.

    • @dfunited1
      @dfunited1 2 месяца назад +1

      Neither Oxford nor you decide English pronunciation. I doubt that slight accent made the content any less understandable.
      Dictionaries are reference materials, not the law.

  • @xXVintersorgXx
    @xXVintersorgXx 3 месяца назад

    I feel like this is not the approach i would take if i was given this as a problem.

  • @JB-fh1bb
    @JB-fh1bb 3 месяца назад

    Carmack not mentioned 😢

  • @fqidz
    @fqidz 4 месяца назад

    basically how tui software works

  • @cefcephatus
    @cefcephatus 3 месяца назад +2

    Abusing Math.random() to the fullest and torture your CPU.
    How about just save the random value in the first line of the loop and add-multiply-mod it so to save calc time?

    • @CrushedAsian255
      @CrushedAsian255 3 месяца назад

      Isn’t that what math.random does? It doesn’t seed each time (I hope)

  • @dosergiobr
    @dosergiobr 3 месяца назад

    What's the original link to see ?

    • @Snippets_Code
      @Snippets_Code  3 месяца назад

      I have mentioned that in the description 🙂

  • @DanDart
    @DanDart 2 месяца назад +1

    Libaa much?

  • @AlexHaan
    @AlexHaan 3 месяца назад +1

    Explaining completely nothing.

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

    Indian chat gpt fireship

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

    Video could've been much better if you had put in an actual human voice.
    Currently it is just plan emotionless voice which many will straight away ignore or leave in middle.

  • @ayushrathore1507
    @ayushrathore1507 3 месяца назад

    It will cause a major frame drop use canvas instead

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

    For the love of god, please don't destroy your efforts with annoying sound effects.

  • @i_AmCurious
    @i_AmCurious 4 месяца назад

    Playing with dom isn't efficient
    you can play with canvas brooooo

  • @JakubSK
    @JakubSK 3 месяца назад

    Meh

  • @jimmlmao
    @jimmlmao 3 месяца назад

    bro its not that hard just get a gif put it in a canvas get the canvas pixels and just encode them in a string bro using monospace font

  • @rranon8489
    @rranon8489 4 месяца назад

    Explanation sucks.
    "fireChar" and "for loop" pronunciations suck.

    • @Snippets_Code
      @Snippets_Code  4 месяца назад +3

      I will try to improve in further videos 🙂

    • @jeffreygordon7194
      @jeffreygordon7194 3 месяца назад +1

      Rude comment.

    • @rranon8489
      @rranon8489 3 месяца назад

      @@jeffreygordon7194 Might be. But that doesn't mean there isn't a room for improvement. Can't always have sugar-coated criticisms.

    • @jeffreygordon7194
      @jeffreygordon7194 3 месяца назад +1

      @@rranon8489 Your criticism is that his "explanation sucks" which is useless. Then you insult his accent. You're just terrible at programming and taking it out on someone who actually can.