My Retro 3D Engine is Ready
Вставка
- Опубліковано 15 жов 2024
- Streamed Live on Twitch: / tsoding
Enable Subtitles for Twitch Chat
More Episodes: • Raycasting in TypeScript
References:
github.com/tso...
lodev.org/cgtu...
tsoding.github...
tsoding.github...
github.com/mrd...
Support:
BTC: bc1qj820dmeazpeq5pjn89mlh9lhws7ghs9v34x9v9
Pay for my VPS: zap-hosting.co...
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.
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.
39:50 "I need picture, and arrow!"
Next stream: Category Theory.
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.
Just a heads up to everyone you can see twitch chat if you enable closed captions
this is crazy whats happening here??
@@OM-yn8ptjust yet another recreational programming session
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
21:21 an unholy amount of spaces
its what shows if you use tabs instead of spaces in github
With great retro comes great responsibility.
8:17 - "From the pp....from the pp....we are shooting the rays..." - and then I was interested...
"tsoding measuring his pp size on the stream" - chatter
48:18 I saw up to calc in hs. Fun times
this is a beautiful work of art.
great stuff, thanks for sharing!
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.
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.
This project is so cool, I aspire to do something like this one day
The inverse camera matrix looks like a scew operation
про врагов в пулл реквестах и "b for " топовые шутки)
It will replace Unity. Suggestion, ask to acquire information about the user's hardware and also obtain the maximum FPS and the browser used.
you're a literally a legend, and I think it;s finely the time to try Neovim
Nah, it's not worth it
It runs at 60 fps on my phone, does it count?
Last minute: but is there not still a problem with the sprite? Because it's in the "air" and not "standing" on ground/floor
Matrix rant. Still laughing! "Problem Solved."
Seriously asking;
what does that "Tea: 100°C" , I'm scared to think of that is the CPU degrees.
Isn't the matrix multiplication more efficient?
Yeah, probably. I should definitely look into that when I'll be optimizing things next time.
man i gotta know, whats ur hardware?
реальный сигма ставлю лайк
Did you know that "pp" sound exactly like "pipi" in French, a word that mean urine :')
Thank you...
Lets see when will js start bottleneck..
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.
@@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.
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.
@@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...
@@iamdozerq Compared to other "managed high level languages", JS can probably be faster, same as vice versa.
Are you going to implement "room over room" ?
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.
just in time for me to start!
I only have a question for you tsod, whats your net worth?
you need some vitamin D, friend.
I prefer regular D
❤
Hahhaaaa Daggerfall clone when?
Z.......... buffer
Portal gun when?
Your awesome dude 😎🍻
tsoding dot what
Lies, 5 FPS on Edge.
What is this, Chromium only??
Maybe is not fast unless really *really* good specs.
That's all.
Edge is Chromium-based, and his laptop is 10 years old
@@angelcaru I mean, my desktop is not new that’s for aure
Easily get 144fps on my laptop
First