Let's Program Doom - Part 2

  Рет қаралды 92,392

3DSage

3DSage

Жыл бұрын

I might be the most excited about this video. I really wanted to learn how the original Doom game engine works. l spent a long time learning the basic concepts but created the code myself from scratch and how I wanted to design it. You can follow along or convert this code to any other programming language since I kept it simple in C that draws a pixel at x and y coordinates.
Let me know if you enjoy this series! Thank you for all your great ideas and I hope to see what you make from this tutorial series. Send me a link so I can share it in part 3!
Grid2D overview: 01:22
Save textures: 02:52
Texture walls: 5:41
Shadow & tile: 11:32
Floors: 12:53
Texture surfaces: 17:41
github code: github.com/3DSage/OpenGL-Doom...
Install OpenGL: • Install Dev C++ and Op...
Part 1 tutorial: • Let's Program Doom - P...
Game textures: poloviiinkin.itch.io/textures
Image converter: notisrac.github.io/FileToCArray/
part 1 made by others
• ps3uDo demo
• DoomLikeRenderer demo
• Porting @3DSage ‘s Doo...

Пікірлер: 269
@Ozzymand
@Ozzymand Жыл бұрын
I ain't gonna lie, I almost lost all hope thinking part 2 will never come. I am so happy now, literally out of this world, this is amazing.
@3DSage
@3DSage Жыл бұрын
Never doubt the 3DSage! 😎👍
@GamerSaga
@GamerSaga Жыл бұрын
I really hope part 3 will not take to long to come out.
@SilverPro7773
@SilverPro7773 Жыл бұрын
@@3DSage i want the program and thanks for the tutorial
@SilverPro7773
@SilverPro7773 Жыл бұрын
the part 2 took a long time to come and now there it is
@TheLonerD
@TheLonerD Жыл бұрын
@@GamerSaga It should take another 8-9 months~
@goldenguy_dev
@goldenguy_dev Жыл бұрын
Literally just watched part 1 yesterday, this is a miracle.
@earlOfCloves
@earlOfCloves Жыл бұрын
And when you are done with part 2, you shall be healed by the second miracle! Hallelujah! *places palm on forehead with gentle shove as you raise your arms to the heavens*
@livefreeprintguns
@livefreeprintguns Жыл бұрын
Luckily the KZfaq algorithm blessed me, so thankfully I'm able to watch back-to-back.
@charlieborchardt2066
@charlieborchardt2066 6 ай бұрын
I waited so long for part two. I got to watch the ray caster tutorials back to back though.
@cjdaylight3407
@cjdaylight3407 Жыл бұрын
I am waiting for part 3
@diandradeeke
@diandradeeke 3 ай бұрын
is there already part 3?
@DuyenNguyen-bo7rc
@DuyenNguyen-bo7rc Ай бұрын
​@@diandradeekeno sadly
@muratbayraktar4733
@muratbayraktar4733 Ай бұрын
@@DuyenNguyen-bo7rc yes there is. It's collision detection.
@DuyenNguyen-bo7rc
@DuyenNguyen-bo7rc Ай бұрын
​@@muratbayraktar4733proof?
@javianmuniz
@javianmuniz Жыл бұрын
I'm going to watch it right now! First part was amazing. Thanks for sharing! 😊
@rednibcoding3412
@rednibcoding3412 Жыл бұрын
This "Let's Program Doom" series is so awesome! Thank you a lot. Cant wait to see part 3.
@Komanturne
@Komanturne Жыл бұрын
I lost hope 6 months ago when you didn't upload anything. This is an absolute miracle!
@3DSage
@3DSage Жыл бұрын
I'm glad you still believe in me and I believe in you to program it!
@YaPhutYT
@YaPhutYT Жыл бұрын
Yesterday I was waiting for part 2, Now am i am waiting for part 3 already!
@vakqdev
@vakqdev Жыл бұрын
my day has immediately become 5 times better
@Afrotechmods
@Afrotechmods Жыл бұрын
It's like watching a Captain Disillusion video but for programming + cats
@3DSage
@3DSage Жыл бұрын
Nice! I'll take that compliment! Great description and thank you for the nice comment. Btw, I like your great electric channel!
@LuigiElettrico
@LuigiElettrico Жыл бұрын
That sure was revolutionary back in the 90's... still amazing how simple it is. I'm glad I foud someone explaining it with the only and best C language :D
@sajberkg
@sajberkg Жыл бұрын
this is awesome, so much cool stuff in here! Can't wait for part 3!
@TeslabladePlaysMC
@TeslabladePlaysMC Жыл бұрын
18:41 Is it any coincidence that the multiplier you used is so close to 2pi or tau? with the amount of sin and cos functions used, I wouldn't be surprised to see pi crop up here!
@kbsanders
@kbsanders Жыл бұрын
I was thinking that as well. Can anyone confirm?
@frognik79
@frognik79 Жыл бұрын
First thing I thought of too. Guessing 6.28 would be a better approximation.
@DBGabriele
@DBGabriele 9 ай бұрын
No, it is just FOV / UPDOWN "factor" (the same constant used to compute wz)
@charlieborchardt2066
@charlieborchardt2066 2 ай бұрын
I thought is was the golden ratio for a sec.
@thecout3170
@thecout3170 Жыл бұрын
Omg, i can't believe this video just released! Im waiting for this for sooooo long, more than half a year
@branpod
@branpod Жыл бұрын
I've been looking forward to this with an unreasonable level of excitement! Keep up the amazing work
@trenthm
@trenthm Жыл бұрын
Ditto!
@Apotheker.
@Apotheker. Жыл бұрын
Wow! We need part 3!
@Nietzscheboy1
@Nietzscheboy1 Жыл бұрын
Nice! I've been waiting for part two. Thanks, good job 👍
@trenthm
@trenthm Жыл бұрын
I haven’t started the video yet but wanted to say I haven’t been this excited about a new KZfaq video in a while!! Thanks for making a part 2! Love your channel btw. A gem of KZfaq
@3DSage
@3DSage Жыл бұрын
Wow that really means a lot to me so thank you so much for the nice comment! :)
@robsku1
@robsku1 Жыл бұрын
@@3DSage Truly, I don't think trenthm and I are the only ones who feel the same - I've wished for something like this since the mid-90's, but never believed that it could be done in such easy to understand way. You really have skills for "tutorializing" stuff like this, I'm quite pleasantly surprised, and I'm glad to hear it means a lot to you (I have the audacity to believe it applies to my comment as well, but not because I want to feel good about myself, but because you truly do deserve it!).
@antmoundsock1122
@antmoundsock1122 Жыл бұрын
I've been looking forward to this for months!
@windwalkerrangerdm
@windwalkerrangerdm Жыл бұрын
One of the awesomest things on the internetz. Thank you. Didn't start on this yet, very busy with a project, but as soon as it finishes I'm going to dive into this and make stuff.
@Sinn0100
@Sinn0100 2 ай бұрын
I think it's wild you have the level move around the player. That's just so cool.
@zilog1
@zilog1 Жыл бұрын
yo sick i love your videos. i love love love your simple computer build with the counter IC. thats so cool that you can actually make a basic computer/cpu out of just those chips
@tetris450
@tetris450 Жыл бұрын
This is one of the best, most fun learning channels on youtube
@Logicatube
@Logicatube Жыл бұрын
I looked from start to finish, with your help I was able to create an engine). waiting for part 3
@PCgameandgamer
@PCgameandgamer Жыл бұрын
THIS LOOKS AMAZING, I haven't finished my game boy game but I'm really twitching to start a Gameboy advance game with this engine
@xmoex6393
@xmoex6393 6 ай бұрын
wow! i learned a lot today! I'm still at 50% Raycaster 3 but I'm really really looking forward to this series! I'm especially interested in the BSP stuff (especially how to generate the tree for the level data), it always fascinated me...
@3DSage
@3DSage 6 ай бұрын
This made my day! Thank you for saying that and I will continue these series! :)
@autodidact7127
@autodidact7127 Жыл бұрын
OH MY GOD IT CAME OUT AND I MISSED IT! THANK YOU! I cant believe how cool the stuff you make is! WOW!
@solodevinc
@solodevinc Жыл бұрын
really cool seeing how such common concepts nowadays are programmed from scratch
@OfficialGoldenLeaf
@OfficialGoldenLeaf 5 ай бұрын
This is amazing! Things like this take alot of time so take all the time you need to finish the other parts
@octopro8937
@octopro8937 Жыл бұрын
THANK YOU SO MUCH I HAVE BEEN WAITING FOR THIS!!!!
@szkockibandyta2419
@szkockibandyta2419 Жыл бұрын
very nice, love this series so far
@3DSage
@3DSage Жыл бұрын
Thank you!
@SirCat07
@SirCat07 6 ай бұрын
this video is amazing! i wanted to make a doom-like 3d game after being subjected to 3 days of working with raycasters this being so simple is such a relief
@ranonrat6164
@ranonrat6164 Жыл бұрын
this is actually really cool and useful, i will share it with my friends
@3DSage
@3DSage Жыл бұрын
thank you! :)
@clongoram
@clongoram Жыл бұрын
Awesome video! Thanks for this series. It is one of the best on the subject.
@3DSage
@3DSage Жыл бұрын
That means a lot to me so thank you!
@glyphic1219
@glyphic1219 Жыл бұрын
Your so awesome man I've been watching you since your gba vids
@Godmil
@Godmil Жыл бұрын
Omg, thanks so much for making pt2
@thelanguagegeek6207
@thelanguagegeek6207 Жыл бұрын
OH MY GOODNES ITS FINALY OUT!!!
@majokuhn
@majokuhn Жыл бұрын
Thanks for this second part it is so amazing like the first ❤
@jacopobuttiglieri8598
@jacopobuttiglieri8598 Жыл бұрын
Great! I feel that this part 2 will be a tougher one to convert in Java... 😅
@3DSage
@3DSage Жыл бұрын
Hey man! I believe in you! I hope you can do it! :) If not, just thanks for watching!
@notSoAnonyymus
@notSoAnonyymus 8 ай бұрын
I'm ready for part 3 haha!
@bank8489
@bank8489 Жыл бұрын
YES I WAS SO EXCITED FOR THIS OH MY GOD
@Jalechah
@Jalechah Жыл бұрын
amazing video! love the editor and I cant wait for Part 3 :D
@3DSage
@3DSage Жыл бұрын
I'm completely a one man show so thank you for the editing compliment! I have a lot of fun ideas for part 3.
@Andrew-cc6hx
@Andrew-cc6hx 2 ай бұрын
@@3DSage how much longer until part 3
@colek8990
@colek8990 7 ай бұрын
Currently stuck trying to get my textures to not look like TV static when i put them on the walls XD Hope there will be a part three by the time I finish, if its too much work though I understand and am still super thankful for this awesome 2 part series. Forreal best tutorial on KZfaq.
@wizzy7444
@wizzy7444 Жыл бұрын
HE LIVES
@clearz3600
@clearz3600 Жыл бұрын
Ooooh part 2 is out. Nice!
@electronscape
@electronscape Жыл бұрын
OMG life made easier!!! im so loving these tutorials!! (does mean im going to have to feature creep on a project tho! LOL -- this is amazing!)
@technomological9032
@technomological9032 9 ай бұрын
Can't wait for part 3
@hungariannerd8445
@hungariannerd8445 8 ай бұрын
incredible man. doing gods work
@TheMasonX23
@TheMasonX23 8 ай бұрын
Looking forward to part 3!
@loganjorgensen
@loganjorgensen Жыл бұрын
I like the in-engine editor, a great condensed minimalist display bar. Nice to see the faux view pitching technique get some love. That fog like gradient was something else, very approximate to polygon fog clipping.🙂
@trenthm
@trenthm Жыл бұрын
Really awesome video!! Thank you!
@HE360
@HE360 Жыл бұрын
Gosh, I've been seeing this channel for a while and I thought I was subscribed to it. But, now I am. This channel has been having some great game development content.
@3DSage
@3DSage Жыл бұрын
Thank you for the sub! More great videos coming soon!
@TomasRay
@TomasRay Жыл бұрын
First! let's go boiiiiis
@theoneandonlylg3824
@theoneandonlylg3824 Жыл бұрын
This is so cool!
@lead1320
@lead1320 5 ай бұрын
Thanks for this video! I just finished the first one and made a glitchy hexagon prism.
@jhhoward
@jhhoward Жыл бұрын
Great video! Really fun to follow along as you build this. From your texture mapping code it looks like you are linearly interpolating on the X axis which will cause it to be non-perspective correct. Maybe you could update this to perspective correct texture mapping in your next video :)
@otistically
@otistically Жыл бұрын
At this point, you've just made Duke Nukem 3D lol.
@3DSage
@3DSage Жыл бұрын
It's time to program 3D and chew bubblegum, and I'm all out of gum 😎
@trenthm
@trenthm Жыл бұрын
@@3DSage 😂
@user-so5rt3nf2v
@user-so5rt3nf2v Жыл бұрын
This is Very cool! :)
@Zeropointill
@Zeropointill Жыл бұрын
Can't wait to see if you continue your raycaster engine. I tried making the maps bigger but i ended up having a procedurally generated hellscape that went to infinite somehow.
@robsku1
@robsku1 Жыл бұрын
I would be even more interested in seeing a tutorial like this, but on creating a *raytracing* engine (in software), even if it's not practical for real-time 3D action (or just plain real-time) game rendering and ends up being much lower res or detail to be useful for more rendering in game (as opposed to pre-rendering stuff, which I wouldn't feel that interested in coding myself). If that has any practical use - I have lacking understanding of how much can be achieved with modern PC's and real time ray-tracing in software. But if it's possible to do something useful that way, I would just murder my family for it. I really would, I'm cereal!
@4KbShort
@4KbShort 6 ай бұрын
I think I found your "Really nice formula" for calculating the surface tile placement and it's basically yours with the last two variables changed: for "rx =" and "ry =" just change your last two variables to the following: (P.y/yo*tile) and (P.x/yo*tile) Or as it looks in my LUA version: rx=fx*math.sin(math.rad(pA))-fy*math.cos(math.rad(pA))+(pY/yo*tile) ry=fx*math.cos(math.rad(pA))+fy*math.sin(math.rad(pA))-(pX/yo*tile) The (pY/yo*tile) and (pX/yo*tile) works to lock the surface textures in place even while moving. I don't know how as I was just poking the code until it did what I wanted. I'm sure you've probably hashed this one out (or someone already mentioned it) and I look forward to the next tutorial!
@3DSage
@3DSage 6 ай бұрын
Thank you for adding this for people to see! That is a great update. I will be making several little updates in the next tutorial and adding a lot more too! :)
@greenstonegecko
@greenstonegecko Жыл бұрын
Twitter mad? I sleep KZfaqr cancelled? I sleep 3DSage uploaded? **Real $h!t?**
@ashisharky
@ashisharky 4 ай бұрын
I ended up programming my own level editor and save load system for my gamemaker port I did for fun. I also modified how the level data works, I swapped to using points, walls, and sectors rather than just walls and sectors. That way I can draw points however I want in the editor as walls are composed of two points, texture data, and color data. This also brings my port closer to how doom actually acts as doom uses vertices, linedefs (and sidedefs), and sectors
@BAMBAM3316
@BAMBAM3316 4 ай бұрын
I should've paid attention is school. My brain is gonna 'splode watching this math stuff.
@cromo5641
@cromo5641 Жыл бұрын
Cats + programming + DOOM = Perfection
@user-vy9hi4nj1l
@user-vy9hi4nj1l 3 ай бұрын
legend says that never its going to be part 3 im coming from the future
@Saw-qv3bl
@Saw-qv3bl Жыл бұрын
I love ur work!!!
@user-ys9fh2mw3t
@user-ys9fh2mw3t 4 ай бұрын
Its insane of what these programming language's can do.
@dvince6678
@dvince6678 10 ай бұрын
Hey man really love the content! Hoping one day i could get the level where you are at making 3D projects in the GBA :D
@tehaxor69
@tehaxor69 Жыл бұрын
I believe that 6.2 number you came up with is pi * 2 or acos(-1) * 2
@BobRobertsMusic
@BobRobertsMusic 10 ай бұрын
And the other 60 value is simply SH/2
@pineapplepie4929
@pineapplepie4929 Жыл бұрын
cant wait for the quake series
@laz3664
@laz3664 Жыл бұрын
YES
@2dapoint424
@2dapoint424 Жыл бұрын
Thanks for uploading !! Super awesome tutorial! Where can I get Grid2D from?
@TyGadzislawieTy
@TyGadzislawieTy Жыл бұрын
Damn, nice job! I will download your engine and try to build simple game on it! :D
@CYON4D
@CYON4D Жыл бұрын
Very nice work.
@XXIstCenturyBoy
@XXIstCenturyBoy 9 ай бұрын
I gave you my thanks. This is awesome content! Edit: There is a small bug in the texture mapping, if you check around 14:47, the texture's "dirt boulders" stays the same width on the whole width of the wall, with no perspective applied to the hstep. The more distant the texture should have thinner boulder, the hstep needs to take the wall height ratio in account...
@coderflower
@coderflower 8 ай бұрын
Please make a part 3!
@AndersonReis42
@AndersonReis42 5 ай бұрын
I'm making a raycaster in lua using the love2d framework, finally managed to make a single ray shoot! I'm already looking foward the BSP
@sjb8178
@sjb8178 10 ай бұрын
Oh Jesus plz part 3
@SomeBlokeOrWhatever
@SomeBlokeOrWhatever Жыл бұрын
Me, a drop-out from CompSci who chanced into these videos while wandering around the internet and only understands about half of it: Hmmmm. _Fascinating._ I am, however, a doom mapper in my spare time, and at the end of the video you did ask for suggestions, so I have three: * The map editor doesn't seem to have a way to set different textures for floor/ceiling on the sectors or specific textures for individual wall lines within a sector. This is a feature of the og doom engine that goes a long way into making maps varied and interesting and since you managed to get the hard part (actually drawing stuff with texture mapping) down, it could elevate your engine as well. * Light levels! Doom had you set a lighting level per sector, with 255 being max and 0 being minimum. Fairly sure it just darkened all the pixels inside that sector by the reverse of that. Also something that makes maps more varied. Later you can even make light levels that change on the fly, for like flashing or flickering lights and such. * The little fade you did when you were demonstrating the floor rendering with flat colours. You could probably achieve a similar effect by applying a similar formula but to all three colour elements of the pixel while you are drawing the texture, since that, too, is just plotting colour pixels on the screen. If you really wanted to go all out, you could make these controllable parameters stored in the sector array, thus giving the map designer customisation over the fog within a sector, which can make maps more moody. Then again this would probably also call for doing the same to wall textures and we start getting even more complexity.
@SilverPro7773
@SilverPro7773 Жыл бұрын
this is a nice tutorial also about your computer that you made does it have an microproccesor
@maixicek
@maixicek Жыл бұрын
Nice job 🙂
@meerjel0120
@meerjel0120 2 ай бұрын
Idea: Use in-facing sectors as rooms, and out-facing sectors as brushes.
@satriaimenya
@satriaimenya 2 ай бұрын
i love doom, i love ginger cat
@EmiTheLoomistar
@EmiTheLoomistar Жыл бұрын
Thanks so much!! It would be awesome if you could cover the quake engine one day :D
@godfather00cz
@godfather00cz 7 ай бұрын
excellent series! part 3 please...?
@loganjorgensen
@loganjorgensen Жыл бұрын
Oh yeah that was something I wanted to suggest for any new sector based engines, 2D approximated leaning in FPP. Kind of like faux pitching but I think it uses column shifting of the whole window to approximate camera tilt, OG Star Fox was a pretty good example.😉
@THE16THPHANTOM
@THE16THPHANTOM Жыл бұрын
nice to know there are fellow java try hards/stubborn people in the comments who keep insisting on making things like this in java no matter how much they get discouraged and get weird looks.
@Davi_Dash
@Davi_Dash Жыл бұрын
let's fucking goooooooooo
@rodakdev
@rodakdev Жыл бұрын
Cant wait to play DOOM once agian!
@brandman546
@brandman546 22 күн бұрын
If you release part 3 I will click like on every video you’ve released. Plz!
@10x-developer
@10x-developer Жыл бұрын
Hey, another amazing video, and t is really easy to follow, just please add some visual indications around 10:45 when the cut is a bit too late, and those casts to (int) appear late and is easy to miss out. I got my video stopped at a bit earlier point while re -typing and when i tested it it was not working, because I missed the cast.
@Annatar3019
@Annatar3019 Жыл бұрын
I did the same thing lol, spent like an hour going over the video and different parts of the code to figure out what I'm missing.
@harsimransinghbatth5032
@harsimransinghbatth5032 Жыл бұрын
Hello, would you mind covering the Grid2D programming in a future video? Covering as in coding it along with explanation, it would be really helpful! Thanks for all the hardwork, I wish this stuff was taught in schools.
@goawayinternet
@goawayinternet Жыл бұрын
very freakin cool
@smallguillotine6750
@smallguillotine6750 Жыл бұрын
sickkk
@GuildOfCalamity
@GuildOfCalamity Жыл бұрын
The single space indenting is a baller move.
@LitoMike
@LitoMike Жыл бұрын
and now I'll port this to scratch :)
@astrangerontheinternet6901
@astrangerontheinternet6901 Жыл бұрын
Super Doom Maker
@Leo150250
@Leo150250 Жыл бұрын
Great tutorial! Fiddling with the code, that 60.0 that shows when calculating the rx and ry for the surfaces of the walls, is it related to the y offset of the walls? I'm asking because, when I doubled the game resolution here, those 60.0 didn't worked anymore, but 120.0 did. And I noticed that yo is related to the height of the window (yo = SH/2) so, when I've changed 60.0 to yo, it looks that it works now... Am I doing this right? haha
@Pablo4949
@Pablo4949 Жыл бұрын
I kept forgetting to share the port I did in python lol. I figured out texturing on my own, but I never figured out how to get floor texturing to be performant, so instead I did solid color floors for sectors and did some level trickery to make it look better. I used Tiled to make my level editor, instead of writing my own (I did the same trick where you have to draw the polygons a certain direction because I didn't want to write code to check it lol). Didn't bother doing BSP or portals, so I just designed a level that didn't obviously break as much. No proper collision detection, but just enough to let you walk up stairs.
@bobhardcore6707
@bobhardcore6707 5 ай бұрын
13:53 straight line running in a circle
@bobhardcore6707
@bobhardcore6707 5 ай бұрын
*it only has one eye
@octopro8937
@octopro8937 Жыл бұрын
PART 3 PLEASE
Let's Program Doom - Part 1
25:13
3DSage
Рет қаралды 403 М.
Make Your Own Raycaster Part 1
16:52
3DSage
Рет қаралды 403 М.
Can teeth really be exchanged for gifts#joker #shorts
00:45
Untitled Joker
Рет қаралды 17 МЛН
small vs big hoop #tiktok
00:12
Анастасия Тарасова
Рет қаралды 19 МЛН
Homemade Professional Spy Trick To Unlock A Phone 🔍
00:55
Crafty Champions
Рет қаралды 57 МЛН
A closer look at the Super NES DOOM Source Code Release | MVG
13:49
Modern Vintage Gamer
Рет қаралды 730 М.
Why The Longing Takes Four Hundred Days to Play
20:45
Adam Millard - The Architect of Games
Рет қаралды 7 МЛН
Coding a plasma effect demo on the Commodore 64 (tutorial DIY)
12:30
Commodore 64 & 6510 retro-programming
Рет қаралды 1,4 М.
The Code That Makes Mario Move
9:53
NesHacker
Рет қаралды 518 М.
Doom: альфа и бета версии (Old-Hard №59)
19:32
Дмитрий [Newbilius] Моисеев
Рет қаралды 152 М.
Voxel Doom Tested: id Software Classic Gets A Voxelised 3D Upgrade!
11:44
ANYONE can make a DOOM map.
7:05
James Paddock
Рет қаралды 113 М.
Doom Crushers Are Weird
17:17
decino
Рет қаралды 441 М.
УРА 🥳 ОБНОВА! ОТКРЫВАЕМ ЯЩИКИ!
3:19:40
Holdik
Рет қаралды 1,3 МЛН
1000+  МЕГАЯЩИК АШСАМ НЕ ТҮСЕДІ ЕКЕН?!
26:01
Асхат Gaming
Рет қаралды 43 М.
😨 Это реально Самый Высокий миф в Майнкрафт
37:29