Programming portals for my DOOM-style FPS
ฝัง
- เผยแพร่เมื่อ 8 พ.ค. 2024
- 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 - วิทยาศาสตร์และเทคโนโลยี
I cant wait for the next video where he scraps the entire codebase and restarts from scratch!
using scratch!
I'm waiting for a "making doom over 24 hours again" video
Don't give him ideas
next one is gameplay, I promise
@@jdh If you don't, put my comment up at the start of the next video and say how I was correct. Deal?
Ah, of course. The bi-monthly developer tradition of scrapping everything you did, just to redo it.
actual and factual
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. 😅
@@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.
@Plebis Maximus LOL. Great point.
@@mikolmisol6258 The struggle is real.
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.
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.
@@clonkex know the skill will never be useful in life but I now want to have expertise in portal recognition.
@@user-ob7pl5st1f youll just be walking down the street and suddenly be like "ah shit" when you realize something is a portal
@@sircalvin lmao exactly
@@sircalvin No more falling into backrooms
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.
What's funny is that GZDoom does have portals, they're used in MyHouse for the non-euclidean effect
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.
@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.
@@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.
@@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
@@str0680 they did use a portal in the stairs in the second house though
god, the shapes of the maps he's drawing are too hard for my just-woke-up brain to handle
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.
good catch :)
E1M2 is crazy
Really cool vids like always ! It's a big inspiration to watch someone being able to code such projects and have fun !
This engine looks SO COOL! I can't wait to see what you create with this!
Love the video! It's awesome seeing how these portals come together and how they create weird geometry.
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.
This is really impressive that you've managed it all by yourself (okay sure, external libraries, etc, but still!) Well done! Impressive stuff :)
you're easily the most talented indie developer on yt when it comes to coding and shit, keep it up
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!
These portal setups are giving me some strong Antichamber vibes. Very cool.
Super awesome. Love this series!
I happen to be implementing stencil buffer portals in a Doom source port at the moment! Great video
This is great! Cant wait for the next update!
you're insane in the best way possible
this was amazing to watch
I swear these videos just keep getting better
I literally yelped out "YESS!!" when i saw this video!!! been waiting so long for it!!
You are such an inspiration to me, You are a coding magician
This is so amazing ❤ thank you so very much 🤯
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!
This looks aaaawesome!
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.
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.
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.
Awesome effort!
bro this is amazing
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.
What a coincidence, I just watched the first video just a few hours ago! I live this.
I literally just came back to your channel after over a year and you've just uploaded.
HELL YEAH JDH KEEP WINNING!!
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.
I have ton of incomplete projects as well! nothing to be ashamed of, that's how you learn. just have to keep at it :)
@@jdh Yeah I guess you're actually right. I got motivation to get my personal projects done!. Thanks!.
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
this is gonna be a crazy speed game
jdh: makes hot code reloading for C
Also jdh: refuses to elaborate
Also also jdh: Disappears for 3 months
I’m already loving the game’s vibe
heres me praying you get into modular synthethis and design eurorack modules. Your programming skills are crazy
I was writing a little primitive C++ SDL2 OpenGL (glew
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.
This is awesome.
I wish you uploaded more frequently but I also get why you don't, this is amazing
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.
I love non euclidean geometry like this. reminds me a lot of antichamber
I love how I understand nothing but still enjoy the video😂
You sir, are a God
That is really cool
Literally watched the previous video just a hour ago, let’s go 🤩
I can't wait to finish the video, I Remember the last one, super interesting by the way
and jdh returns
Guess what! I've got a fever, and the only prescription is more portals!
Gotta love the rewrite.
Legendary comeback
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.
Only works in v1.3D, though. Things just get all smeary if you try it in the Atomic Edition.
@@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)
"But i always think they are missing something, portals"
Doom teleporters: DO I NOT EXIST??
praise God he has uploaded
i dont understand anyof this but i like to watch so im always here
AMAZING
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.
Wow, this looks amazing! When you finish, may you please realease the software
hey, that's pretty neat!
Super cool!
I'd really love a video about your vim setup!
so cool!!
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!
Very interesting!
nice project
Love the vids for both the content and aesthetic. What font do you use?
I am relieved to know that this man is alive.
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.
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.
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
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!
New jdh video!
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 😅
Thats really cool, you could almost model MyHouse with these portals
you must be the most dedicated computer scientist in this platform
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 ?
ahh the age old tradition of writing your own game engine, only to scrap it and use one that's already available.
The single time I felt smart while watching this video is when you mentioned triangulation. This one i actually implemented in the uni
Love the videos, one question though what os and window manager (if linux ) you use?
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
the color scheme in 14:48 is really nice
would be a cool (and very unique) palette for a dystopian fps portal game 😉
I always thought it looked quite Antichamber like :)
BABE WAKE UP JDH POSTED
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"!
Totally reminds me of Bisqit's video on his Doom style renderer with the slow motion render
I WAS IN THE MIDDLE OF MY EXAMS AND I'M HERE
shoutout to my bro Ominous Black Pillar always there to support your creations🔥🔥⬛
finally, after so long, we're getting antichamber 2
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
Yes, that's how the build engine did room over room (duke 3d, blood)
@@DeathByFilmStudios huh, I had no idea
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!
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?
Jdh is back
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.
These portal setups are giving me some strong Antichamber vibes. Very cool.. These portal setups are giving me some strong Antichamber vibes. Very cool..
the plot twist 6 minutes in had me at the edge of my seat
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?
Very cool
I laughed my ass off when you resurrected GLU. Love it
can't wait for the next video where you scrap opengl and use dx12