TypeScript is better than C for this

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024
  • Streamed Live on Twitch: / tsoding
    Enable Subtitles for Twitch Chat
    More Episodes: • Raycasting in TypeScript
    References:
    - Tsoding - Raycasting - github.com/tso...
    - lodev.org/cgtu...
    - tsoding.github...
    - github.com/tso...
    - mariusschulz.c...
    Support:
    - BTC: bc1qj820dmeazpeq5pjn89mlh9lhws7ghs9v34x9v9
    - Pay for my VPS: zap-hosting.co...

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

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

    Next video: We are developing nuclear reactor in Typescript

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

    32:08 looking forward to the Nuclear Reactor episode

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

    I recently (a few months ago) followed this exact raycasting guide for a 'school' project with a team mate, we did it in C, it was really cool.
    I went a little further than the guide, I added transparency, where a ray could go through a cell if it was marked as transparent, it would record the depth etc then continue.
    The renderer would then draw the walls furthest to closest.
    Everything was single threaded, 960x960 30fps, ~30 million pixel read writes per second best case. (in reality a lot more)
    We made "3D" doors that slowly open, we made an enemy that follows you, and we made mini-games you interact with (among us style).
    My favorite part was the Event Trigger System, where entities can emit events and receive events, so you can wire up entities to interact with each other.
    Say you have a task and a door, the door will only become unlocked if you complete the task, it was such a simple idea, but it takes the complexity of the map to the next level with so much customisation.

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

      really cool project, did you put on github?

    • @Eldarlll
      @Eldarlll 21 день назад

      42 school?

    • @gmfCoding
      @gmfCoding 21 день назад

      @@Eldarlll yup

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

    The thumbnail of the video is really good!

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

    59:00 lighting is actually very easy, at least for simple diffuse shading. Just take the cosine of the angle between the normal vector and the incoming light direction (a simple dot product with normalized vectors does the trick)

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

    I really still do not procees the fact that you are writing in ts. I am so used to see you writing c code.

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

      Yeah and also his famous “C voice” contributes to the overall confusion

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

      @@tianned I see you saw the last episode

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

      ​@@tiannedI have yet to figure out tf a "C Voice" is?

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

      @@blackbeard3449 You will soon C.

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

    word, loving the subtitles being modded to chat, insane

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

    23:00 it is because of variable hoisting
    const & let vs var & function

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

      function is hoisted up before const/let ctx was declared. So the language server does not know if you are using something that does not exist yet, don't know if it would even work

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

      Yup you got it, I came here to say the same thing

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

    Already caught this on Twitch. Great work!

  • @RavikulRao
    @RavikulRao Месяц назад

    56:07 HOLY SHIT THIS IS SO COOOOLLL!!

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

    It is more convenient control when the camera rotates to the right when A+S is pressed together.

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

    In the last bit of the video 2:19:56, you might to consider reverting u back to 1 - y but keeping the condition. Images were flipped when viewed from behind.

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

    The difference between function expressions and function declarations in JS tends to bite.

  • @zeratax
    @zeratax Месяц назад

    26:15 i guess it’s technically valid js but a number - undefined is NaN which is probably not what you want there?

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

    56:40 it's the 'Fog of Pog' 🌫️

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

    I do not believe you go comment comment copying it from the comments on twitch and pasting in the subtitles on you tube, can you share the script you used for that?

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

      It's part of the markut repo on his github

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

    Holy shit cool!

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

    No, nothing is better than C 😭

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

    Because lately your videos can no longer have subtitles in Spanish c:

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

    wOoooOOo000OoOoOoOOo

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

    JavaScript is a Messi language, TypeScript is just messy

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

    How about making PHP statically type language. HeeHee ??

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

    Typescript is a joke

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

      no if you really want to learn how to program you need to start from the basics... writing html code

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

      @@weekipi5813 No, start with C.

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

    2:09:49

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

    hmm, thats a weird looking C... whats going on here, a-mista a-Zozin?

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

    меня поражает твое трудолюбие и нескончаемый энтузиазм

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

    I will see tha day where this guy will make a fucking audio driver in TypeScript.

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

    WAIT! WAT?! Zozz admits TS can be better than C?!?#@#$%

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

    Tsoding cheating on C 😔 with typescript

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

    I do not believe you go comment comment copying it from the comments on twitch and pasting in the subtitles on you tube, can you share the script you used for that?

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

    1:13:05 the struggle is real lmao

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

    Tsoding you posted this at the best time, I wanted to make a simple classic 1st person dungeon crawler but didn't know the algorithms or techniques used...and you just started doing it for me! Thank you sensei

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

    54:26 you could use hsl() style. There is a whole science on dimming colors for human perception and also gradients (maybe using LCH color model)

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

    Speaking about rendering using div's reminds me of threejs CSS render.

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

    sirios beetboxing starts at 39:19

  • @RavikulRao
    @RavikulRao Месяц назад

    i want a nuclear tractor stream

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

    tscoding

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

    2:03:01 Its Unfinished!

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

    1:13:10 He wasn't clueless. He straight up posted documentation how to draw image to canvas from img element and also how to load it using url. Also you can use the drawImage function that you pass it to draw part of the image even one pixel which was part of the documentation that he posted.
    Edit: I see you have gotten it later in the stream - that you can use img element + drawImage like that :D

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

      Yes I really hate when he claims people are trolling when the page they posted exactly describe that.. but yeah it’s steaming and you can’t read everything, but then …

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

      1:41:00 maybe dirty backbuffer?

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

      If you don't need raw image data, maybe you don't need web server anymore, btw

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

    23:40 this is typescript fault, works in javascript if function is CALLED after variable definition

  • @FrancescoCagnin-q5j
    @FrancescoCagnin-q5j 3 месяца назад

    Can someone tell me what color scheme he’s using? Thx

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

    Thank you.....

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

    Партизан!!

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

    1:29:34 I like to aim the onload handler before triggering it (assign src after that)

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

    32:27

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

    Where do ya get all these articles ?

  • @j-wenning
    @j-wenning 2 месяца назад

    1:39:49 "Dirty Rectangles" are why the dirtyX, dirtyY, dirtyWidth, and dirtyHeight params are named as such. It's graphics programming terminology. Has nothing to do with web devs making weird naming decisions. Took me like 5 seconds of searching to find this out.

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

    This tutorial also works in typescripttolua running in minetest hud system. I love it

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

      DAS MANIFESTTTT

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

      Oh no, that's Jordan4IBanez on my favourite channel!
      Never expected to see you there.