My Retro 3D Engine is Ready

Ғылым және технология

Streamed Live on Twitch: / tsoding
Enable Subtitles for Twitch Chat
More Episodes: • Raycasting in TypeScript
References:
- github.com/tsoding/raycasting
- lodev.org/cgtutor/raycasting3...
- tsoding.github.io/raycasting/
- tsoding.github.io/olive.c/
- github.com/mrdoob/three.js/bl...
Support:
- BTC: bc1qj820dmeazpeq5pjn89mlh9lhws7ghs9v34x9v9
- Pay for my VPS: zap-hosting.com/en/shop/donat...

Пікірлер: 57

  • @Owen3H
    @Owen3H28 күн бұрын

    Great work on the optimizations, couldn't get it to go below 120 and average is ~200. I did also notice a little bug where tabbing out to a different monitor (or right clicking) would keep the player moving until the same key was pressed again.

  • @TsodingDaily

    @TsodingDaily

    28 күн бұрын

    Thank you! And all of that on a 2D Canvas without any hardware acceleration, pixel-by-pixel in pure JavaScript. It's truly admirable how much the best Google Engineers managed to optimize this Toy Script Language.

  • @skejeton
    @skejeton28 күн бұрын

    21:21 an unholy amount of spaces

  • @desplmfao

    @desplmfao

    28 күн бұрын

    its what shows if you use tabs instead of spaces in github

  • @hendrikd2113
    @hendrikd211328 күн бұрын

    39:50 "I need picture, and arrow!" Next stream: Category Theory.

  • @sirynka
    @sirynka28 күн бұрын

    It is running at ~70 fps on my tablet (snapdragon gen1). The minimum i've got was 30 fps when most of the screen is covered by key and wall textures.

  • @Vinoyl
    @Vinoyl28 күн бұрын

    great stuff, thanks for sharing!

  • @notrumur
    @notrumur28 күн бұрын

    this is a beautiful work of art.

  • @irishbruse
    @irishbruse28 күн бұрын

    Just a heads up to everyone you can see twitch chat if you enable closed captions

  • @OM-yn8pt

    @OM-yn8pt

    28 күн бұрын

    this is crazy whats happening here??

  • @Blazing_Hotmagma

    @Blazing_Hotmagma

    11 күн бұрын

    @@OM-yn8ptjust yet another recreational programming session

  • @FrankBudino
    @FrankBudino28 күн бұрын

    8:17 - "From the pp....from the pp....we are shooting the rays..." - and then I was interested...

  • @aciddev_

    @aciddev_

    17 күн бұрын

    "tsoding measuring his pp size on the stream" - chatter

  • @BlackHermit
    @BlackHermit28 күн бұрын

    With great retro comes great responsibility.

  • @koktszfung
    @koktszfung28 күн бұрын

    It runs at 60 fps on my phone, does it count?

  • @taba1950
    @taba195019 күн бұрын

    Not sure if you know this already, using the "debugger" command in the browser will pause the execution and bring up the debugger. You can write it before any point in your code that you want to debug

  • @DMWatchesYoutube
    @DMWatchesYoutube28 күн бұрын

    The inverse camera matrix looks like a scew operation

  • @lukepond
    @lukepond28 күн бұрын

    This project is so cool, I aspire to do something like this one day

  • @IMBG-ih3nu
    @IMBG-ih3nu27 күн бұрын

    you're a literally a legend, and I think it;s finely the time to try Neovim

  • @taba1950

    @taba1950

    21 күн бұрын

    Nah, it's not worth it

  • @nathanpotter1334
    @nathanpotter133428 күн бұрын

    just in time for me to start!

  • @ImDGreat
    @ImDGreat28 күн бұрын

  • @zboxjpg
    @zboxjpg28 күн бұрын

    реальный сигма ставлю лайк

  • @siriusleto3758
    @siriusleto375828 күн бұрын

    It will replace Unity. Suggestion, ask to acquire information about the user's hardware and also obtain the maximum FPS and the browser used.

  • @draftcypruss
    @draftcypruss28 күн бұрын

    Lets see when will js start bottleneck..

  • @iamdozerq

    @iamdozerq

    28 күн бұрын

    Js is actually very performant if you know what you doing. Todays js environments pretty optimized and js can turn in assembly as simple as c.

  • @cheerwizard21

    @cheerwizard21

    28 күн бұрын

    ​​​@@iamdozerqThat's actually a bold wrong statement. I mean, we can just begin with the fact that JS has no pointers and no custom memory managment at all. That's actually one of the most powerful tools for optimizations, especially in such complicated systems like game engines or similar. Compiler has also probably weaker optimizations for loops, branches, etc. If you turn your slow code into ASM or directly into machine language, it won't make it faster. WASM is not counted btw, because it's an external tool for optimizing JS and not JS itself.

  • @cheerwizard21

    @cheerwizard21

    28 күн бұрын

    You can for sure write simple retro game in JS like this one. I don't think he will se a lot of perfomance issues for such game, unless he scale it very rapidly.

  • @iamdozerq

    @iamdozerq

    28 күн бұрын

    @@cheerwizard21 i am sure that it possible to make things as fast(or even faster) than java or csharp. Ofcourse all our discussion can be discarded without huge performance tests sadly...

  • @cheerwizard21

    @cheerwizard21

    28 күн бұрын

    @@iamdozerq Compared to other "managed high level languages", JS can probably be faster, same as vice versa.

  • @user-tb9xv3fy8n
    @user-tb9xv3fy8n28 күн бұрын

    man i gotta know, whats ur hardware?

  • @kirillvoloshin2065
    @kirillvoloshin206528 күн бұрын

    про врагов в пулл реквестах и "b for " топовые шутки)

  • @Maik.iptoux
    @Maik.iptoux28 күн бұрын

    Last minute: but is there not still a problem with the sprite? Because it's in the "air" and not "standing" on ground/floor

  • @ronp6108
    @ronp610828 күн бұрын

    Isn't the matrix multiplication more efficient?

  • @TsodingDaily

    @TsodingDaily

    28 күн бұрын

    Yeah, probably. I should definitely look into that when I'll be optimizing things next time.

  • @OCPyrit
    @OCPyrit28 күн бұрын

    Z buffer as a 2d image was always a weird concept to me. You might think the Z value is already stored in the coordinates of the polygons and vertices, so you don't need this second frame buffer image.

  • @Heater-v1.0.0

    @Heater-v1.0.0

    27 күн бұрын

    Well, yes, all the information you need is in the coordinates of all the polygons and vertices. Consider: You already have hundreds of objects in your scene and have drawn them, then when you render a new object you have to find out if every pixel that could render it is in front or behind anything that was previously drawn so as to determine if that pixel should be drawn or not. That would require calculation from all the previously drawn objects polygons and vertices, a horrendous lot of work. The Z buffer basically remembers all the previously calculated depths of all the previously drawn objects, saving only the least depth ones. That saves recalculating things over and over. The Z buffer is basically a cache of previous results that greatly speeds things up.

  • @hubstrangers3450
    @hubstrangers345026 күн бұрын

    Thank you...

  • @jormoungandr
    @jormoungandr26 күн бұрын

    Seriously asking; what does that "Tea: 100°C" , I'm scared to think of that is the CPU degrees.

  • @negrastormentas2865
    @negrastormentas286528 күн бұрын

    Are you going to implement "room over room" ?

  • @TsodingDaily

    @TsodingDaily

    28 күн бұрын

    For now, I don't really plan to add more features to the engine. I just wanna start making the actual game and then I'll see if I need anything else.

  • @alexandrosvangelatos9979
    @alexandrosvangelatos997928 күн бұрын

    Your awesome dude 😎🍻

  • @wtfisgoingon535
    @wtfisgoingon53527 күн бұрын

    Did you know that "pp" sound exactly like "pipi" in French, a word that mean urine :')

  • @SwedishviKingohnoes
    @SwedishviKingohnoes28 күн бұрын

    Hahhaaaa Daggerfall clone when?

  • @nenkonotmapping477
    @nenkonotmapping47727 күн бұрын

    Z.......... buffer

  • @DeathSugar
    @DeathSugar28 күн бұрын

    Portal gun when?

  • @skejeton
    @skejeton28 күн бұрын

    tsoding dot what

  • @houssamassila6274
    @houssamassila627428 күн бұрын

    you need some vitamin D, friend.

  • @PennyEvolus
    @PennyEvolus28 күн бұрын

    Easily get 144fps on my laptop

  • @eliphazbouye
    @eliphazbouye28 күн бұрын

    First

  • @Seedwreck
    @Seedwreck27 күн бұрын

    Lies, 5 FPS on Edge. What is this, Chromium only?? Maybe is not fast unless really *really* good specs. That's all.

Келесі