Programming portals for my DOOM-style FPS

  Рет қаралды 193,288

jdh

jdh

Күн бұрын

obsolete C programmer copies valve (15 years too late)
PATREON: / jdah
TWITTER: / jdah__
C LIVE RELOADING: github.com/jdah/reloadhost
EXAMPLE SOFTWARE RENDERER: github.com/jdah/doomenstein-3d
GITHUB: github.com/jdah
EDITOR: NeoVim
CONFIGS: github.com/jdah/dotfiles
THEME: gruvbox
RESOURCES:
* Portals in OpenGL: github.com/ThomasRinsma/openg...
* @SebastianLague 's video on portals (in Unity): • Coding Adventure: Portals
* DOOM Game Engine Black Book: fabiensanglard.net/gebbdoom/
* DOOM source code: github.com/id-Software/DOOM
* The DOOM wiki: doomwiki.org/
0:00 Intro
0:15 Software Renderer
6:40 "Real" 3D
15:00 Extras
16:30 Outro & Thanks

Пікірлер: 434
@Plexxl
@Plexxl 11 ай бұрын
I cant wait for the next video where he scraps the entire codebase and restarts from scratch!
@MishaHivemind
@MishaHivemind 11 ай бұрын
using scratch!
@stathiskapnidis9389
@stathiskapnidis9389 11 ай бұрын
I'm waiting for a "making doom over 24 hours again" video
@divine203
@divine203 11 ай бұрын
Don't give him ideas
@jdh
@jdh 11 ай бұрын
next one is gameplay, I promise
@Plexxl
@Plexxl 11 ай бұрын
@@jdh If you don't, put my comment up at the start of the next video and say how I was correct. Deal?
@thirteen3678
@thirteen3678 11 ай бұрын
Ah, of course. The bi-monthly developer tradition of scrapping everything you did, just to redo it.
@telnobynoyator_6183
@telnobynoyator_6183 11 ай бұрын
actual and factual
@mikolmisol6258
@mikolmisol6258 11 ай бұрын
I try not to do that nowadays. It doesn't matter that the code is atrocious - if it works, it means I can actually progress and get other parts of it done rather than keep refactoring. But it's one of the hardest lessons to learn, especially on a project where you are your only boss. 😅
@plebisMaximus
@plebisMaximus 11 ай бұрын
@@mikolmisol6258 Doesn't have to look pretty as long as it works. If you do messy code for work, you got job security as nobody knows shit about what you just made. If you do it your spare time, nobody can steal your secrets as nobody can read your spaghetti. Writing awful code is the meta.
@biohazard2869
@biohazard2869 11 ай бұрын
​@Plebis Maximus LOL. Great point.
@anon_y_mousse
@anon_y_mousse 11 ай бұрын
@@mikolmisol6258 The struggle is real.
@eformance
@eformance 11 ай бұрын
I realized while watching this why Portal has an amber and blue glow around the portals. It's VERY hard to visually distinguish a portal without having those decorations.
@clonkex
@clonkex 11 ай бұрын
Weirdly, you get used to it. I spent a while working on a portal clone some years ago and it trained my brain to be able to recognise portalling planes and reason about the broken geometry much more easily. Not useful for a real game, of course, just an observation.
@user-ob7pl5st1f
@user-ob7pl5st1f 11 ай бұрын
@@clonkex know the skill will never be useful in life but I now want to have expertise in portal recognition.
@sircalvin
@sircalvin 11 ай бұрын
@@user-ob7pl5st1f youll just be walking down the street and suddenly be like "ah shit" when you realize something is a portal
@clonkex
@clonkex 11 ай бұрын
@@sircalvin lmao exactly
@fantastikboom1094
@fantastikboom1094 11 ай бұрын
@@sircalvin No more falling into backrooms
@Vixeneye1
@Vixeneye1 11 ай бұрын
I'm about half way through this video and I wanted to say something. I can honestly respect that you are capable of seeing an insurmountable problem and rather than spent 40 years kit bashing it together, you seek better solutions. Love your dedication to just creating cause you can. I'll always watch your videos because they're always so inspiring.
@Banjoei
@Banjoei 11 ай бұрын
What's funny is that GZDoom does have portals, they're used in MyHouse for the non-euclidean effect
@str0680
@str0680 11 ай бұрын
Yep, you can even see that you get teleported when going downstairs if you look up, the top floor disappears. I was just messing around in Ultimate Doom Builder and made some seamless stairs and 2 floors, you can even look back up and see both floors at the same time.
@Banjoei
@Banjoei 11 ай бұрын
@str0 That's only in the first house though, to make the map seem more amateur than it is, and that's actually a line teleport instead of a portal. but when the house becomes altered the stairs are actually seamless.
@str0680
@str0680 11 ай бұрын
@@Banjoei I heard people say it's to make it look amateurish, but you couldn't really use a portal at those stairs because linedefs are infinitely tall, so he would have to put something above the staircase to cover up the paper thin portal which would obscure the top floor.
@catattackmakesmusicsometimes
@catattackmakesmusicsometimes 10 ай бұрын
@@str0680 he also could've just used a floor portal at the stop of the stairs though, and nothing amateur like that shows up later on. it seems pretty intentional, but maybe it was an artifact from being one of the earlier parts of the map before he learned more about how it works
@Banjoei
@Banjoei 10 ай бұрын
@@str0680 they did use a portal in the stairs in the second house though
@onyxtv5745
@onyxtv5745 11 ай бұрын
Really cool vids like always ! It's a big inspiration to watch someone being able to code such projects and have fun !
@IanZamojc
@IanZamojc 11 ай бұрын
I like how you made that circular pit shape in your test level that choked the Doom engine during its development until they implemented BSPs.
@jdh
@jdh 11 ай бұрын
good catch :)
@fish3443
@fish3443 9 ай бұрын
E1M2 is crazy
@sgtmajorkiwi
@sgtmajorkiwi 11 ай бұрын
god, the shapes of the maps he's drawing are too hard for my just-woke-up brain to handle
@treytomes
@treytomes 11 ай бұрын
That was great! I'm a little disappointed that you abandoned the ray-casting engine, but I get you actually wanting to build a finished game this time.
@monsoon835
@monsoon835 11 ай бұрын
you're easily the most talented indie developer on yt when it comes to coding and shit, keep it up
@btarg1
@btarg1 11 ай бұрын
This engine looks SO COOL! I can't wait to see what you create with this!
@Skeffles
@Skeffles 11 ай бұрын
Love the video! It's awesome seeing how these portals come together and how they create weird geometry.
@TheAsuro
@TheAsuro 11 ай бұрын
I'm currently implementing the same code for oblique clipping planes that you mentioned, and it did give me a boost of confidence that you struggled with it too! It's very hard to figure out what's going on if something is wrong.
@jdh
@jdh 11 ай бұрын
I had a lot more issues with it than I showed in the video 😅 I spent a few hours trying to debug my initial implementation only to find out that I hadn't read the last few paragraphs of the paper and had missesd the (very important) step of scaling the near plane such that the far plane doesn't get too messed up. oops.
@Zettabit7
@Zettabit7 11 ай бұрын
These portal setups are giving me some strong Antichamber vibes. Very cool.
@setlarketlar6048
@setlarketlar6048 11 ай бұрын
praise God he has uploaded
@Urammar
@Urammar 11 ай бұрын
Dude I was JUST thinking I wonder what happened to this, and I check and see 25 mins ago you posted this. Noice. Its very inspirational to see your work!
@sphelx
@sphelx 8 ай бұрын
This is really impressive that you've managed it all by yourself (okay sure, external libraries, etc, but still!) Well done! Impressive stuff :)
@transientwaveform1475
@transientwaveform1475 11 ай бұрын
I happen to be implementing stencil buffer portals in a Doom source port at the moment! Great video
@impracticalKim
@impracticalKim 11 ай бұрын
Thats really cool, you could almost model MyHouse with these portals
@morsintus8323
@morsintus8323 8 ай бұрын
jdh: makes hot code reloading for C Also jdh: refuses to elaborate Also also jdh: Disappears for 3 months
@gedaliakoehler6992
@gedaliakoehler6992 11 ай бұрын
Super awesome. Love this series!
@FA18_Driver
@FA18_Driver Ай бұрын
Dude in all honestly, I think you’re a genius. Like a once in a generation genius, like a A Beautiful Mind. John Neumann. I watch your videos and literally my jaw drops at your skill in logic and programming. You’re by far the best I’ve seen. Paired with your great narration and editing, audio comping, and precise mastery of language makes your videos S tier. Thank you for giving me a look into the mind of a genius, to me you’re a wizard and what you do is magic. To think this in your mind and make it reality? You inspire me. Thank you.
@SidewaysCytlan
@SidewaysCytlan 11 ай бұрын
Faen. Du er dansk! Quite impressed with the work you've done, and the style of presentation. It's the kind of nerdy humour I love! Looking forward to next time!
@mxc_clips
@mxc_clips 11 ай бұрын
I think it would be awesome if you made video on maybe your journey getting to the point you are at now with your development skills. I noticed on one of your streams that you mentioned that you didnt go to university, and I always find it interesting/helpful seeing other developers journeys.
@TheGrimravager
@TheGrimravager 11 ай бұрын
you're insane in the best way possible this was amazing to watch
@jumbledfox2098
@jumbledfox2098 11 ай бұрын
I literally yelped out "YESS!!" when i saw this video!!! been waiting so long for it!!
@N3mo_Ahead
@N3mo_Ahead 11 ай бұрын
This is great! Cant wait for the next update!
@MrMateloi
@MrMateloi 11 ай бұрын
I swear these videos just keep getting better
@lop0159
@lop0159 11 ай бұрын
You are such an inspiration to me, You are a coding magician
@formulaetor8686
@formulaetor8686 11 ай бұрын
You're so cool bruh. I always wanted to do these things but end up with all incomplete projects. Sucks to be me but you're amazing man.
@jdh
@jdh 11 ай бұрын
I have ton of incomplete projects as well! nothing to be ashamed of, that's how you learn. just have to keep at it :)
@formulaetor8686
@formulaetor8686 11 ай бұрын
@@jdh Yeah I guess you're actually right. I got motivation to get my personal projects done!. Thanks!.
@TECHNOJESTER
@TECHNOJESTER 10 ай бұрын
I was writing a little primitive C++ SDL2 OpenGL (glew
@Hennesg
@Hennesg 7 ай бұрын
heres me praying you get into modular synthethis and design eurorack modules. Your programming skills are crazy
@VoidloniXaarii
@VoidloniXaarii 11 ай бұрын
This is so amazing ❤ thank you so very much 🤯
@Samwka_
@Samwka_ 11 ай бұрын
shoutout to my bro Ominous Black Pillar always there to support your creations🔥🔥⬛
@sardinemeowstein
@sardinemeowstein 11 ай бұрын
What a coincidence, I just watched the first video just a few hours ago! I live this.
@Nobleoasis27
@Nobleoasis27 11 ай бұрын
I literally just came back to your channel after over a year and you've just uploaded.
@Tigrou7777
@Tigrou7777 11 ай бұрын
Trivia: Duke3D has also used portals (or at least something very similar): mirrors are implemented by rendering the level as if the camera were behind the mirror, looking into the room where the player is standing. If you walk through them (with a noclip cheat), you'll see a "copy" of the level, with everything reversed horizontally.
@Roxor128
@Roxor128 11 ай бұрын
Only works in v1.3D, though. Things just get all smeary if you try it in the Atomic Edition.
@Tigrou7777
@Tigrou7777 11 ай бұрын
@@Roxor128 I checked what you say and this is correct. I think the reason is that 1.3D required to have a big room behind mirror while in 1.4 that requirement was removed. Anything behind mirror will be ignored (so all you will see is HOM)
@gavinocasino2274
@gavinocasino2274 9 ай бұрын
I love your videos, theyre so inspiring. Id love to get into programming but Im having a bit of trouble motivating and getting started as a whole. Witth that, how did you start learning how to program? I really appreciate it all that you do for not just entertainment purposes but for learning
@PamelaKivi
@PamelaKivi Ай бұрын
"But i always think they are missing something, portals" Doom teleporters: DO I NOT EXIST??
@MikeDawson1
@MikeDawson1 11 ай бұрын
you kind of remind me of me... I grew up on Doom, made lots of levels in the DOS WadED level editor when I was a kid. Had Doom books in elementary/junior high school. Recently read the Doom Black book several times. Working on my own game engine, got decently far, then decided to start over from scratch again. Now that I'm decently along I'm already thinking of the next version... I think that working on game engines and using them for creative coding might just be more fun than trying to make an actual game and I need to accept that!
@Gwilo
@Gwilo 11 ай бұрын
if you were asked to build a shed, you would plant some trees with acorns you couldn't buy but could find, wait for the trees to grow, use the wood for the walls, go mining for the metal, build a furnace from your own gathered clay/bricks and then finally finish the task that could have taken you a few weeks, but you had to do everything yourself and take several years to do. you are not re-inventing the wheel, you are merely making your own rubber, cast, rims, etc.
@Console.Log01
@Console.Log01 11 ай бұрын
you'd learn everything there is to know about how to make a shed though, which undoubtedly makes you better at making sheds further down the line.
@tacomies
@tacomies 11 ай бұрын
I wish you uploaded more frequently but I also get why you don't, this is amazing
@Banzai8th
@Banzai8th 11 ай бұрын
This is something I've been interested in doing myself. Good luck! Are you planning on using a layers paradigm or node based one? I think the latter could definitely help set this project apart.
@Fiendzy
@Fiendzy 11 ай бұрын
To that comment about y-sheering, I actually always enable that effect in old game engines if it supports it; Gzdoom, dark forces source port etc: it’s strangely nostalgic for me
@Kyanoxia
@Kyanoxia 8 ай бұрын
Welcome to my badly explained bug fix! You made your portals pull the player through them to avoid certain camera issues (and I assume the infamous "Infinitely teleporting character" glitch). I would like to propose a solution to that. Rather than having the portal be a flat square, make it a box intersecting the wall. All sides of this box would render according to the geometry of the world by the exit portal. Once the player intersects the front quad and fully enters the portal, teleport them then. This would allow the player to freely stand in the seam of the portals, without any camera issues, and it would fix the teleport glitch. I am unsure how much of that you understood, and even if you did understand it, I'm not sure how much of it you'll be able to implement. Until next time, that was "Badly Explained Bug Fix"!
@eboatwright_
@eboatwright_ 11 ай бұрын
This looks aaaawesome!
@idkbruh173
@idkbruh173 11 ай бұрын
the color scheme in 14:48 is really nice would be a cool (and very unique) palette for a dystopian fps portal game 😉
@jdh
@jdh 11 ай бұрын
I always thought it looked quite Antichamber like :)
@saivishnu725
@saivishnu725 11 ай бұрын
17:15 minutes of not understanding a word but still looking at it with wow
@frostymcfrosts2831
@frostymcfrosts2831 11 ай бұрын
This video has been out for 3minuites. I am pretty sure you haven’t had the time to watch the whole video
@saivishnu725
@saivishnu725 11 ай бұрын
@@frostymcfrosts2831 i did watch it later on.
@christianheidemann3829
@christianheidemann3829 11 ай бұрын
Funny that the comment in the OpenGL Forum (11:45) came from Eric Lengyel. He's the guy behind the "Foundations of Game Engine Development" books.
@mcfleen7593
@mcfleen7593 11 ай бұрын
this is gonna be a crazy speed game
@cl-ze9qu
@cl-ze9qu 8 ай бұрын
Hi, does it happen to be possible one day you explain your journey on learning programming in a such complex level? You see, this is amazing and very inspiring, and it would be cool to know how it went for you, what methods did you use, or even some tips that could be shared with us that could help us learners :) Props to the awesome work!
@koskenkorva123
@koskenkorva123 11 ай бұрын
Guess what! I've got a fever, and the only prescription is more portals!
@smellthel
@smellthel 10 ай бұрын
I’m already loving the game’s vibe
@moorane_
@moorane_ 11 ай бұрын
I love non euclidean geometry like this. reminds me a lot of antichamber
@felixklinge5571
@felixklinge5571 11 ай бұрын
Very cool tech! I wonder if you explored the idea of moving the software renderer into a compute shader + upgrading it to a fully 3d renderer...Although that certainly wouldn't have helped with debugging. Quite the contrary actually 😅
@JustinBA007
@JustinBA007 9 ай бұрын
Bungie's Marathon actually has a lot of non-euclideon geometry within the game. It was the first FPS game that could have multiple floors over the top of each other, and the way they did it was actually by using portal based rendering. And instead of hiding it, there are multiple places within the campaign where you can find hallways that come from nowhere.
@Theonewithaplanz
@Theonewithaplanz 10 ай бұрын
Wow, this looks amazing! When you finish, may you please realease the software
@PlanetComputer
@PlanetComputer 11 ай бұрын
HELL YEAH JDH KEEP WINNING!!
@adytm
@adytm 11 ай бұрын
Awesome effort!
@GameCyborgCh
@GameCyborgCh 8 ай бұрын
it's a crime that the "hand gun" doesn't actually shoot hands
@stysan
@stysan 11 ай бұрын
bro this is amazing
@preistoriaanimation4658
@preistoriaanimation4658 11 ай бұрын
I can't wait to finish the video, I Remember the last one, super interesting by the way
@ALLenROOK
@ALLenROOK 8 ай бұрын
I have never seen a game with such an impressive concept. This could be legitimately amazing. No game I have ever played has successful non-Euclidian elements. You can think of almost any idea imaginable with the engine!
@augustingavrilovici8951
@augustingavrilovici8951 8 ай бұрын
The "banana gun" you made in Part 1 is actually the portal gun from, well, Portal! You thought back then we weren't going to notice, but I played Portal and so I know what the damn f**k it actually is.
@unknowngamedev909
@unknowngamedev909 11 ай бұрын
can't wait for the next video where you scrap opengl and use dx12
@amp08021
@amp08021 11 ай бұрын
I'd really love a video about your vim setup!
@couldntgivafuk
@couldntgivafuk 11 ай бұрын
ahh the age old tradition of writing your own game engine, only to scrap it and use one that's already available.
@velocity_gamer3989
@velocity_gamer3989 9 ай бұрын
Where did you learn how to code and also what age? Bro you're honestly my hero, you're AMAZING. What languages do you know and would you recommend any courses? Also, a suggestion is make a vid explaining how you learned how to code, you would gain a large % of subs after the vid would be released. Where did you learn how to code and also what age?
@frostymcfrosts2831
@frostymcfrosts2831 11 ай бұрын
I love how I understand nothing but still enjoy the video😂
@user-hk7fz5yj8e
@user-hk7fz5yj8e 8 ай бұрын
These portal setups are giving me some strong Antichamber vibes. Very cool.. These portal setups are giving me some strong Antichamber vibes. Very cool..
@EmApex
@EmApex 11 ай бұрын
This is the first video of this project I've seen so apologies if you already have something in mind for this, but the first use case for these portals I thought of was to solve the room over room problem. You could fake overlapping rooms using portals by having them in different parts of the map but connecting them in a way that seems seamless to the player
@DeathByFilmStudios
@DeathByFilmStudios 10 ай бұрын
Yes, that's how the build engine did room over room (duke 3d, blood)
@EmApex
@EmApex 10 ай бұрын
@@DeathByFilmStudios huh, I had no idea
@tomoli1
@tomoli1 11 ай бұрын
Literally watched the previous video just a hour ago, let’s go 🤩
@YRBYD
@YRBYD 7 ай бұрын
I laughed my ass off when you resurrected GLU. Love it
@nickgeiserr
@nickgeiserr 11 ай бұрын
i know you wont see this, but you are my favorite youtuber out of all. Your videos have helped me learn and inspired me to learn a completely new level of programming. Thank you and keep making great content
@Hamdad
@Hamdad 8 ай бұрын
It might be a cool continuation of this series to see how far you can push a sector based engine on modern hardware. Games like Shadow Warrior pushed it pretty far, with room over room, transparent water, voxel objects, drivable vehicles and so on. But is that the absolute limit, feature wise? If not, where is the limit? What if fps engines never moved on to polygons?
@barterjke
@barterjke 10 ай бұрын
The single time I felt smart while watching this video is when you mentioned triangulation. This one i actually implemented in the uni
@pascalthiele5719
@pascalthiele5719 11 ай бұрын
Excellent work, if that means anything coming from a random chatter on the internet. Your software renderer in particular is interesting to me, because the only significant advantage graphics processors seems to have is performance. Software renderers do not rely on the more frequently changing graphics processor architure and therefore are less likely to break in the future, they can make use of the advanced branch prediction of the central processor and are more logically flexible. Especially since it has been multiple decades since software rendering was common, I would have liked to see what game quality your crafty fingers could have squeezed out of the central processor. Good luck with your game nonetheless 🙂
@Mr.Postal
@Mr.Postal 22 күн бұрын
I hope that we can use the code too to also make a game. Because i have the same dream like u had here too, thats why u got recommended too
@skifli
@skifli 11 ай бұрын
Gotta love the rewrite.
@lassipulkkinen273
@lassipulkkinen273 11 ай бұрын
This is starting to look really similar to something I was working on about a year and a half ago. And it had procedural generation, too, though mostly boring with the occasional infinite tunnel. Ultimately I drove myself crazy trying to do shadow volumes across portals, and moved on to other stuff.
@scorcism.
@scorcism. 11 ай бұрын
i dont understand anyof this but i like to watch so im always here
@flippingbananas-1514
@flippingbananas-1514 9 ай бұрын
Totally reminds me of Bisqit's video on his Doom style renderer with the slow motion render
@Ilovecarrot
@Ilovecarrot 11 ай бұрын
I am relieved to know that this man is alive.
@pelihahmo6951
@pelihahmo6951 11 ай бұрын
That is really cool
@clonkex
@clonkex 11 ай бұрын
13:53 For these problems, I found the easiest fix is to "tophat" the portal plane. When the camera is within some close distance of the portal, expand the plane into an open-fronted cube. In other words, move the plane backwards along its normal (away from the camera) and add sides, a ceiling and a floor, all rendered as portals. This fairly easily solves the near-plane issues. even for quite large near-plane distances. I have a tonne of useful links in a Reddit post from a while ago. I'll include that in a reply here to try to avoid YT eating it.
@JuanMorales-bv7qr
@JuanMorales-bv7qr 11 ай бұрын
interested to see this!
@squiddobutboy
@squiddobutboy 11 ай бұрын
and jdh returns
@ess4591
@ess4591 11 ай бұрын
Legendary comeback
@Urammar
@Urammar 11 ай бұрын
3:05 I think this is a mistake, to rotate level geometry(many points, potentially hundreds if your game is scaled to a full future fancy production). A much more elegant solution is to make a virtual player camera and translate that against the relative wall position. That way the camera is 'looking in' through the wall on the far side of the map, and you take those instructions from there on out and use them for the regular rendering for the actual player(having the portals being a special last geo pass). You can virtualize a 'room' that is connected/portaled to the destination portal that the virtual player is 'inside of' (in data) for occlusion culling if the engine requires it, also. This would be ultimately be drastically more performant. (Especially if you wanna channel your inner Carmack, haha, we gotta get this running on a 386 mate, we aint duplicating and rotating whole levels, here, we gotta get them 1993 game awards!)
@Urammar
@Urammar 11 ай бұрын
Alright nevermind, turns out it was all scrapped and *almost* literally that was implemented anyway. Well done mate, very impressed!
@jdh
@jdh 11 ай бұрын
good intuition, though that approach only works in "real" 3D though - there's no notion of a camera in the fake 3D/2.5D software renderer, only a screen to fill with pixels. Performance doesn't degrade through portals either as it's the same as if the sector were there in the first place and the geometry is transformed on-demand (whenever a sector is read for rendering it gets transformed by the previous portals). but yes that is basically eventually how it ends up getting implemented since the matrix multiplication happens essentially for free when using the GPU anyway, plus there's no other way to conveniently transform mesh data.
@Urammar
@Urammar 11 ай бұрын
@@jdh Thanks for the thought out response! It wasn't quite what I was saying, though its all academic since you're rasterizing triangles now anyway. For whatever its worth, im well aware that this is actually rendering in 2D(ish). My point was more that transforming verts, while fairly fast im sure, isnt free. Consider if behind the portal was a very complicated room structure: Even if you arent drawing that in the end, you have to transform it, regardless. The point was that if you leave that surface to last, you can then virtually transform the screen (i called it a camera, same difference) to that location and finalize the rendering with that section of the screen as though you were actually on the other side of the world, same trick as you ended up using, basically. Rather than moving and duplicating virtual geo, you just move the virtual player and finalize the render in a single, simple and computationally light pass, no real faffing about required to boot! In short, dont move the whole map, just move the player. "Theres only pixels to fill" is exactly *my* point! You dont have to render like you are physically constrained! Just do two passes with a special condition to leave the screen space of the portal to the 2nd pass, and fill the final screen percentage with the 'correct' faked portal perspective.
@Urammar
@Urammar 11 ай бұрын
Basically, you handle all potential occlusions from the other portals incorrect side by injecting a fake volume on the side the virtual player is on that also has this portal as the wall. That gives you a clean render, with only the portal to draw, and then you draw from there as per normal, finalizing that gap. No world transforms no duplicated geo, no latency. Just a couple of very simple operations.
@Urammar
@Urammar 11 ай бұрын
@@jdh Okay I cant even let it go, I wanted to make it clear how this works hahaha so I made a video as any sane person would. kzbin.info/www/bejne/sKu3pIFohdhohas Thats the quick explanation. Well done yet again!
@culpritdesign
@culpritdesign 11 ай бұрын
This is awesome.
@zmemes69
@zmemes69 11 ай бұрын
you must be the most dedicated computer scientist in this platform
@moosetwin9023
@moosetwin9023 11 ай бұрын
there's been a lot of good portal "remakes" recently, from the N64 port, to this
@tehflyingknee1
@tehflyingknee1 11 ай бұрын
Love the vids for both the content and aesthetic. What font do you use?
@skeleton_craftGaming
@skeleton_craftGaming 11 ай бұрын
All doom ports that are newer than zdoom already have both portals and non -euclidian geometry [well, I mean not technically, but you can use portals and silent teleporters in really screwy ways that make it seem like it is non euclidean]
@skeleton_craftGaming
@skeleton_craftGaming 11 ай бұрын
The of course, if you want to make a dynamic portables that probably would be really tricky to do with the z-script. I mean I think we'll be possible though. But it would definitely have to be the whole wall. I think that would be possible though.
@skeleton_craftGaming
@skeleton_craftGaming 11 ай бұрын
And also what you're doing is still really really cool
@Youshinaka
@Youshinaka 11 ай бұрын
You sir, are a God
@real1cytv
@real1cytv 11 ай бұрын
Bro just casually mentioned he has hot code reloading for C. As a sidenote. WTF
@fantastikboom1094
@fantastikboom1094 11 ай бұрын
Dаmn that's looking cool. Now what about mirrors and a support of alpha textures? Would be cool to see those implemented, and maybe full 3D editor (tho it won't be DOOM anymore, more like Quake).
@jeanvaljean1893
@jeanvaljean1893 11 ай бұрын
I'd be very interested to learn about your (neo?)vim setup : could you elaborate on that in the future ? Maybe in a specific video because I'd guess it wouldn't interest everyone ?
@sheepishly6942
@sheepishly6942 11 ай бұрын
Finally, Petscop 2
@Rikka_unOf
@Rikka_unOf 8 ай бұрын
Aint a jdh vid without full code rehaul
@undefBehav
@undefBehav 9 ай бұрын
Really well put together, nice work! Quick question though: The reason you don't have to deal with near-clipping in the software renderer is because the way the portal rendering is set up to only allow rendering of sectors/walls that are actually *beyond* the portal plane, in that the portal plane itself acts as a clipping plane, right? But in the 3-D rasterization pipeline, you hand over to the GPU the entire sector to be "portal'd"/"stencil'd" which includes geometries that are in between the camera's near plane and the portal plane.
@jdh
@jdh 9 ай бұрын
yes, exactly! and in the software renderer, the portals/camera (treated the same in code) keep track of which column of pixels have been drawn and clip sides which are outside of the available columns so there is 0 overdraw. so the "true" 3D pipeline introduces a bunch of overdraw which has to be fixed with the stencil buffer.
@undefBehav
@undefBehav 9 ай бұрын
@@jdh Yup, that's right! Both the portal rendering approach and BSP help reduce overdraw tremendously. Thank you for the quick response, looking forward to seeing a follow-up video to this one. Have a nice one!
4 Months of Game Programming With My Own Engine
21:30
jdh
Рет қаралды 372 М.
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 264 М.
Can You Draw The PERFECT Circle?
00:57
Stokes Twins
Рет қаралды 50 МЛН
Follow @karina-kola please 🙏🥺
00:21
Andrey Grechka
Рет қаралды 10 МЛН
Why Doom is Awesome: Binary Space Partitioning
26:25
ShreddedNerd
Рет қаралды 982 М.
The best websites for retro fans
17:36
Retro Tech Dreams
Рет қаралды 37 М.
Coding Adventure: Simulating Fluids
47:52
Sebastian Lague
Рет қаралды 1,6 МЛН
Doom Crushers Are Weird
17:17
decino
Рет қаралды 391 М.
Remaking MINECRAFT 2D (Minicraft)
15:46
jdh
Рет қаралды 306 М.
I made an entire OS that only runs Tetris
22:37
jdh
Рет қаралды 1,6 МЛН
I Made A Fully Ray Traced Game
26:17
Acerola
Рет қаралды 150 М.
A closer look at the Super NES DOOM Source Code Release | MVG
13:49
Modern Vintage Gamer
Рет қаралды 724 М.
Voxel Doom Tested: id Software Classic Gets A Voxelised 3D Upgrade!
11:44
❌УШЛА ЭПОХА!🍏
0:37
Demin's Lounge
Рет қаралды 323 М.
Наушники Ой🤣
0:26
Listen_pods
Рет қаралды 474 М.
Главная проблема iPad Pro M4 OLED!
13:04
THE ROCO
Рет қаралды 48 М.
Why spend $10.000 on a flashlight when these are $200🗿
0:12
NIGHTOPERATOR
Рет қаралды 17 МЛН
Phone charger explosion
0:43
_vector_
Рет қаралды 50 МЛН