 Today we're going to be looking at PR Boom, PR Boom Plus actually. It's one of the many versions, open source versions of the Doom code, if you remember, Doom from the mid-90s, one of the best games ever, has been open source for a long time and many people have taken their own take on it. PR Boom is one of the more popular, should probably be in your repositories for your distro. You're running Debian, so if you're on a Debian or Debian-based system, this tutorial will work for you. If not, the first few things, basically getting stuff installed might be slightly different. First thing we need to do is there are some tools you need installed. One you'll need a compiler. I'm using GCC, so make sure GCC is installed, but you'll also want some libraries you need. Now, I don't know if there's all the libraries, but you'll want these libraries listed here. I'm going to put notes, a link to some notes in the description, so look in the description of this video for a link to notes with pretty much everything we're going to be doing today and plus some. These libraries you're going to want to make, and you're going to want to do WOD file. I have my CDs that I've had for 20 years of all the games, so I have the WOD files. Even though Doom, the code is free and open source, the WOD file, the WOD file contains all the art, all the sounds, all the levels. That sort of stuff is not free, but there is the shareware version and it is in the repositories for Doom and most, it's on the repositories for Debian and most Debian based distros. So go ahead and use aptitude or aptget if you're on something like ubuntu and install these packages right here. If you have the Doom WODs, put those on your system as well. I have all the WODs from the original games installed, so mine defaults to Doom too. So when you start the game, it may look different. You can also install PRBoom, you know, sudo aptget install PRBoom and I think maybe when you install that, it might try to install either the shareware WOD or there's also free Doom, which is a free and open source WOD file. So I would suggest installing PRBoom from your repositories first. Make sure it all works. After that, you should be good. Next, we can download the source code for PRBoom Plus, which is up on SourceForge. This is the URL here, again, check out the notes and description for that so you can get that because I know it's kind of long. So I downloaded that. Next I'm going to untar it. So I'm just copying and pasting stuff from my notes instead of typing them out. So tar, untar and unzip that file. Next we can move into our PRBoom folder. So here we are. I'm going to clear this out, list. So here are our files. And next what we want to do is we're going to want to configure this for our system. So forward slash configure and that will hit enter. That's this script that came with the source code will hit enter and this will take a few seconds. Basically you only have to configure it the first time. And next we're going to type make. Again, we installed make. It was the first thing we did in this tutorial. It was one of the files we installed, one of the programs we installed. And the first time you run make it's going to take a little bit longer than it will in times after that because it's going to make all the files for the game that are needed. And it's basically taking everything from source and making objects and libraries and compiling it all where after this when we make changes, it's not going to have to recompile all those although you can using make clean or just delete the folder and start from scratch. So yeah, this particular compile right here is going to take the longest but when it's done, which is just finished, we can now play PRBoom that we just compiled. The binary is inside the source folder. So what I'm going to do is I'm going to do .slash src to get into that folder, say that I'm running from that folder and PRBoom plus hit enter. And there we go again. I have doom 2 because that's the WOD that I have and it defaults that even if you have doom 1 installed. So let's go and see if we can change some of the game. We're going to edit the source code here. So I'm going to say Vim and go into that source folder. And the first thing we're going to do is we're going to edit a file called d underscore and I'm using the English version. So English dot H. And here are most are messages from the game. So like when you pick up an item or when you're at the menus, there's going to be certain messages and here they all are. And they're all defined at the top here as different variables. So you just find the message that you want and you can modify it. So let's go ahead and have a quick look here. Let's go ahead and modify the one that says right here for nightmare mode. So we're defining nightmare mode. So we're creating a variable called nightmare mode. Now when you see these little backslashes like this, that basically means the next line is basically like being on the same line. So all this is defining one variable and you could write that all on one line, but they put it on multiple lines to make it easier to read. So that's why this backslash is here. These backslash ends inside the quotes are saying new line. If you've done any program, you probably know that already. And here we're actually using a variable within this variable. So this is when you go to choose nightmare mode, if you're familiar with Doom, you choose nightmare mode, which is the hardest level, which is extremely hard, it asks you, are you sure? This skill level isn't even remotely fair. So that's written on two lines. And then there's a two line break. And then it's going to display another message called press YN, which is this variable up here. There's a few times in the game where it asks you to press yes or no, Y or N. And so instead of typing this out each time, they define it in a variable at the beginning of the game. So what we're going to do here is we're going to change this message. Instead of saying, are you sure I'm going to say, are you crazy? And just to show you, I'm writing that in all capitals. In Doom, these messages are always capitalized. So it doesn't matter whether you type it uppercase or lowercase here, it's going to display uppercase in the game. And so we're saying, are you crazy? And we'll save this. And we'll just run make again. And you'll see it doesn't take nearly as long this time. There we go. Now, again, I can run PR boom plus. And now if I come in here, choose new and go down to nightmare mode. It says, are you crazy? So our message took effect. Let's go ahead and quit out of this and go back into. And by the way, I'm using Vim as my text editor. I should have said that earlier. You can use any text editor that you prefer. I just like Vim. As long as it's a text editor and not a word processor, you should be fine. So let's see what other messages are here. I want to change the one for when you pick up some health. So right here, pick up health bonus. So when I pick up a little blue health bonus, up in the top left of my screen, it should display picked up health bonus. What I'm going to say here is I'm just going to change this message all together. I'm just going to say very cool exclamation mark. So I'll save that, type make. It will recompile it. And I will run the game. And now, if I run past these guys, there's some blue health bonuses down at the end of this corridor. And if I go pick them up, look at the top left of my screen. It says very cool each time I pick one up. So that is how you change messages. Pretty much all your messages, at least for English version, is in this file. And there's other files for different languages. I haven't really messed with that. But yeah, you can change, you see, they're all just set as variables. Here's the message for when you exit episode two. That's the message that's displayed. Also, again, the code is good for Doom 1, Doom 2. So make sure you get the right message for your right game. But that is where you can change most of your messages. Next, we're going to look at changing some sounds. So if I vim, again, it's my source folder, sounds.h. You can see here, there's this file. And there's your music is defined here. And then here, we're also down past that. These are all your sound effects. Sound effects, I'll start with SFX. And then the name of that sound effects, that's how they define them. So this is where they're defined. And they're getting those from the WOD package. But that's not where they're used. That's just where they're defined. So what I can do here is I can now, well, let's go back into there. And say, I'm going to just search for pistol. And right here, we can see this is what the pistol sound when you shoot the little bang bang gun, the little hand gun, the pistol. That's what it's sound is called. I can use grep, a tool to search through files. I'm going to grep for that from all the files in my source folder. So I can do that. I can see all the different times that that sound effect is called. And if I scroll through here, I can see one called menu.c. Menu.c is where most your menu stuff is defined. And when you're in DOOM, so let me go ahead and just run DOOM here. When I choose an option here, listen, let me turn my volume up. So let me turn it back down now. When I choose one of those, you can hear that gunshot. So let's go ahead and go into that menu file. So vim source menu, or was it mmenu? And it was the, let's scroll up and find out can I scroll up. I don't remember if it was the header file, or if it was, I'll just grep again. So grep for that, and it's the C file. So vim, or whatever your text editor is, source mmenu.c. And in here, I've already done this in my vim jump to the last place I was. But in this particular case, it's online, 5,544 for the menus. And in here, I can change this to a different sound. So you can go back to the file we were just in, look at different list of sounds, and change it. I'm just getting from my notes here that the teleporter sound, when you go through a teleporter, is tele-pt. So I'm going to save that. And when I recompile and turn my volume back up and start DOOM again, now, instead of hearing a gun sound when I click this, we hear the teleporter sound. So again, options crashed the game. OK, go back in here. So we're getting the teleporter sound instead of the shotgun sound, or the pistol sound. Not sure why the game crashed again there. Interesting. But that is how you can change which sounds are played at different times. You can look through the list of sounds, which you can actually grep by doing this. So grep for SFX underscore all the sounds in the header file. And it'll give you a list of what all the sounds are called. And then they're pretty clear. I mean, this is shotgun, cocking the shotgun, plasma, BFG, chainsaw up is the sound of the chainsaw as it's coming up, idle, chainsaw hit. So most of these are pretty straightforward. So you find the one you want, and then you can grep through the files and find where they are used. So that's changing sounds. Let's actually now go and change some of the things about the player. So clear the screen. I'm going to go Vim. And I'm going to say plus 1, 2, 3, 0. What that's saying is jump to line 1,230, because I've already know where this is, at least in this version of the source code. And I'm going to get that from the info.c file. And this is where objects are defined. You can see right here at this part says object things defined. And so all your objects, your player, your bad guys, the zombie, the shotgun men, the cyber demon, the health packs, are all defined here. And so right here is the settings, at least the default settings for when the game starts for empty player, that's for the player. So we can change stuff for the player in here. For example, we can change down here, let's change. Oh, and also I want to mention, be important in future tutorials, each object has its own number. The player is negative 1. For example, here possess, which I believe is the basic zombies, they're 3,004. So if you want to create a new object, you've got to give it its own unique number. But we'll talk about that more in the future. So here, we're just defining stuff again about the player. One of the things that we can change in here, you can change, they're all labeled, the radius and height. So if you make this a higher number, you might be able to walk down hallways because you're going to hit the ceiling. And right here, we're going to change some of this stuff, these flags. So the player is solid, we can remove that. Shootable, drop off, I believe, means when you walk off the ledge, you don't just keep floating, gravity actually will pull you down. The pickup, I think we can pick up items if we remove that, I don't think we'll be able to pick up items. And it says not in deathmatch, I'm assuming that there's a different type of player for deathmatch. But what I'm going to do here is, I'm going to change it, so I'm going to remove this MF Shootable. Save that, make the file, rerun Doom, and go in here. And now that I'm not Shootable, the bad guys aren't going to attack me. They'll see me. They'll roar when they see me, but they're going to ignore me because I'm not Shootable. You hear them do that? I can even shoot them. They're just going to ignore me. And this is true for all the bad guys. They actually turned their backs to me. It's actually kind of weird. It's like they're like, I'm ignoring you. I think they all just turn, I guess that would be probably be west, if we're looking at the map. Yeah, or sorry, east. So yeah, so I'm not Shootable now, so they're all going to ignore me, even if I'm shooting them. So that's one thing you can change. I'm actually going to go back in and put that back in because I want to be Shootable for future stuff. So mf underscore shootable. So yeah, that's how you can make yourself Shootable. Now, we can change our initial health, too. If we vim into another file, and I'm going to jump to line 62 of this file in our source folder. And this one's called pinterc. And here are some settings for our player as well as well as other things. So I can change our initial health here. I can change this to 555. So when I start the game, my initial health will be 555. So I'm going to save that. Type make, make that, run doom again. And now when I go in, you can see my health is at 555. And you can make that number much bigger if you want. But anything over three digits is going to run off the side. So if I set it to 1,000, it actually would start off, would look like 0,0,0 until I got shot once, and then it would drop down to 900 something. But you'll notice, I just want to point this out, that we didn't change our max health. So we're good. We're running around. It's like, if I can't pick up this health pack, because that health pack is set to not allow you to pick it up if your health is over 100. But the little blue vials of health in the game always allow you to accumulate one health over 100 up to 200, which is set as a max for that. So if I actually go to grab one of those, pardon me, kill these guys. OK, I can go and also my health drops to 200. And that's because of the function for those vials say, don't let it go over 200. So that's something you would have to change somewhere else. And I think that's where I'm going to stop for today's tutorial. And just showing you where stuff is and how you might be able to modify it to make the game more fun. We're going to get to a lot more fun things in future tutorials. Next tutorial, I'm going to show you how to change and create your own cheat codes in the game. For example, a regular cheat code is IDKFA. And you can see I just got all the keys, all ammo, and all the weapons. My health went to 200, and my ammo went up to 400, and my armor went up to 200. So I just got all those things by typing IDKFA. And it says, very happy ammo added as the message. So we're going to learn how to create our own cheat code so we can type whatever we want and have it do different things in the game. That's what we're going to learn next time. And in the future, we're going to learn how to at least modify the weapons in the game. One of the things I like doing is taking the double barrel shotgun and making it as fast as the chain gun. That's a fun thing to do. So I hope you look forward to the next tutorial next week. I hope you're enjoying this, learning how to look through a rather large project and modify it to make the project do cool things. So as always, please visit my website, filmsbychrist.com. That's Chris of the K. There should be a link in the description, as well as a link in the description to notes on what we just did. Everything I did is in those notes, as well as some added stuff that we're going to go over in the future. So if you want to get a head start on next week's stuff, go ahead and look at my notes and you'll be able to see that. All right, thank you for watching. And I hope that you have a great day. OK, this is an introduction to filmsbychrist.com. I'm Chris. That's Chris of the K. That's me right there. My daughter, Amber, and my wife, Jennifer. We pretty much live in the swamps of Florida. I'm a firefighter by day, as well as by night. We work long hours. But that's not why you're here. You're here about the videos I put up on YouTube. These videos are mainly about computers and programming, which means most of my videos look something like this. And if that's what you're interested in, great. And if not, that's all right. I do videos on other topics, too, such as video editing, special effects, photo editing, 3D design, and music creation. If you are one of my viewers and you enjoy my videos, my Patreon page is a place where you can go to help support my videos. So I ask that you take the time to go to my Patreon page and look at different levels of rewards you can receive for different levels of backing. There should be a link in the description of this video if you were watching it on YouTube. Otherwise, you can visit patreon.com forward slash metalx1000. And I thank you for your time and your support. Have a great day.