 his video nine in this series we're just messing with the doom executables mostly but now we're shifting gears and going from the code and the binary the actual program of the game into the media part of it which are wad files their packages think of them kind of like zip files full of all the pictures sounds levels music all the artistic part of the game in them and now I want to point out that doom has been open source for a while and there are different ports of it we've been working with PR boom there's other ones chocolate doom and one called the boom each having their own special functionalities but the wad file in doom is not free so the source code is under a GPL but the game media is still copyrighted information so when you're on a Debian based system for example you can solve PR boom and you also have an option in the repositories for Debian anyway to install the shareware version of the game which the first nine levels or so of the game and if you want to get the full game the code doesn't change but you need to get the wad file off the original CDs so I have those because I still have my CDs from your game if you look hard enough online you can find them but you're really supposed to buy them I there may or may not be some sort of reference on where to get them in the notes for this video which in the in the link in the description just a little hint there anyway so I'm gonna be messing with the doom one and doom two wads here if you want to go fully open source with both the game and the media there is free doom that should be in your pod stories which has been an ongoing project I haven't checked to see whether it's up to date but for a while at least not too long go they were keeping pre-up to date where their goal was to replace all the copyright material all the textures for the walls all the sprites for the characters and objects all the music everything all the graphics and audio and levels from doom they are creating their own and replacing the ones in the game and it's called freedom so check that out but how do they do that well they need to extract these wad files modify stuff and repackage them and we're gonna do a few different views on these and there's wads and then there's I wads and I'll get more into that in the future but let's go ahead and just start these are the tools that you'll need for this video so use apt get or aptitude whichever you have on your system and or prefer or use your graphical package manager mh wave edit will use in one of these upcoming videos to edit the audio gimp will use to add some images we may use image magic to add some images and then the big thing is do text which also will be under your repositories at least on Debbie and as doom watt editor this doom watt editor that's why I haven't commented out just points to do text and do text has been around for a long long time I'm pretty sure back in the 90s when I used to mess with the game which is some of my first real programming if you will in a way my real first experience developing on computers was mainly messing with doom and doom to do text was a watt editor they had and I think I also use one called win text which was like a GUI front end for Windows for this but we're gonna be looking at the basic command line for this which is basically unpackaging and repackaging and if you want to install PR boom that should install the basic game and I think by default it will also install the shareware version of the game or freedom so go ahead and install those I haven't installed so I'm not gonna do that once you have those installed what we need to do is we need to use do text to extract our wads so I'm gonna say dash doom because I'm gonna extract doom one watt if you're gonna do doom to you'll be doing to and then tell it where the watt is which if you've installed them on your system if you download them you have them in folder somewhere to install them to your system so that PR boom sees them without you having to tell them where they are they are going to be under on a Debian based system usr share games doom and then doom dot wad will be the doom one wad then we're gonna say dash E T R A T C for extract and when you enter it extracts everything in that log file so I can list here you can see there's multiple different folders I'm gonna open up a file browser to into the same folder here so like levels we're not gonna really get into those much but you'll need a level editor there is one in the repository's I don't know what's called we're going to mainly be looking at sound effects and visual stuff so for example here we have graphics and here are some graphics for the game including the player's face which is on the toolbar in the game you know the main logo screen so that's that there so let's go ahead and actually let's modify this title image all the images are ppm's which gimp can handle so let's go ahead I'm gonna right click this and say opening game so there we go we have it it's 320 pixels by 200 pixels and that's your main logo main title screen when you start the game now let me go ahead go back to my shell here and what I'm gonna do here is I'm going to quickly download an image I'm going to download it and if I just open this in a shell I have that open on another workspace so they're not gonna flip through anyway it's let me copy that address and open up a new window here that just redirects to an image of me and my daughter in Colorado I kind of take this picture just because this big little rock here it kind of reminds me of the sky textures and doom so I'm gonna take that image I'll just save as and I'll put in my temp folder as main dot jpeg doesn't matter as long as I know where I saved it let's go back to Gimp okay best thing to do when you're editing these files is to basically put them in place of the original files so instead of creating a new file and saving it over this what I'm going to do is I'm going to open that file that I just downloaded and instead of saving this over that because there's certain settings not so much for the pictures but definitely for the sounds but I want to make sure that the resolution everything set properly so I'm gonna do here's I'm gonna go scale not canvas but image scale and as you can see as I said 320 by 200 let me put this to 300 see what it is oh and that actually rescales it down to the same resolution there which actually what I'm gonna crop myself out of this photo so I'm gonna do is I'm gonna say 500 scale see what that looks like I'm gonna copy that I'm gonna paste that over this and move it like so and I'm gonna make that a new layer I'm not going into detail on how to use Gimp but you can edit these pictures however you want what I'm gonna do is I think I'm going to create a new layer just for fun and make it a red layer and it's there we go so we have red image and I'm just going to choose one of these overlays till I find one but like there we go dark and only that kind of looks doomish so let's go ahead and I'm just going to now hit control E or you can go edit and we can override the original picture and so I can close out Gimp now and if we go back into our file manager which I'm using PC man and go into our graphics folder right there is our image that I have replaced so what we need to do is we need to package this back into a wad file so what I'm going to do now is I'm going to say do text and we want to package it now there's two different types of wads again I'm gonna do a basic what this would be like an add-on file to add features to the game where you can also make an eyewad which is basically like making a new game I'm gonna say dash doom because it's a doom one wad and again I'm going to tell it where my oh no I'm sorry I'm looking at my notes here I was gonna say dash wad or dash make I'm sorry it's late in the day and I'm gonna call it one dot wad hit enter and it just packaged everything up into that wad file now to run that I'm gonna say PR boom dash file I also want to tell it what version of doom run because by default I have do one do two and soft I start PR boom it automatically starts up doom to this is a doom one wad so if I was to just run PR boom and type in file and what did I call my wad file just one okay one dot wad and I try to start that there's the logo screen but then when I go into the game you notice how things are blurry that's because I loaded up a doom one wad for doom two and although you can make wads that modify stuff in both but since I repackaged all the artwork there's some stuff that's missing and so some of these textures are missing and it's causing problems not problem against that more later on but what I want to do is tell it which eyewad I want to run dash eyewad and I'm gonna again say usr share game our games doom doom one or doom dot wad and that's all has to do with wherever you have your wad files saved now if I hit enter there's my logo screen my main title screen and I go into here and we started up doom one and as you can see all the textures are proper and if you look at those mountains up there you kind of see why I kind of pick that picture as the title screen let's change another graphic and so let's go PC man or whatever file browser you use and I'm gonna go into graphics again right here is our doom logo so I'm gonna open that up in Gimp again and zoom in okay unlike working with PNGs or GIFs or GIFs there's not a transparent layer but we're using a certain color as a transplant parent color so you see this greenish color here that's actually transparent in the game so what I'm gonna do is I'm gonna select my color here click my eyedropper and choose that color okay and then I'm gonna flip that to my background color and I could paint over what's here but what I'm gonna do is again put the background color control a to select all and hit delete and when you delete without a transparent layer it makes the background color whatever you deleted so right now we have a completely transparent image if I was to resave this you would not see the words doom at the top of the main menu what I'm gonna do now is I'm going to open up a browser and I could create text in Gimp but to make things easy I'm just gonna go to cooltext.com if you've never been here it's a quick easy way to create some text and I'm gonna type in Linux here and I'm gonna pick some colors let's pick this red color and let's pick that red color and make it a little bit darker okay so now we have this cool text here I'm just gonna right-click and save this image as and I'll call it main title logo in my temp folder for now and so what I'm gonna do is I'm just gonna say in here I'm gonna say file open and recent files main title logo there it is now look at the resolution my text is bigger than the original photo see if I was to try to save this it's not too much bigger so probably wouldn't cause any problems but it's best to keep things the same resolution so I'm gonna do is I'm gonna say scale this image not canvas but the image and I'm gonna say one two three and that was the longest size so save that control a control C control V to paste it in here now I can control E and export that over the original and control Q to quit out of GIMP and if I go back to my shell here I can again if I now if I try to do text make one what I'm gonna get an error because by default it's not gonna let you overwrite that wad that you made so I'm going to say remove one dot wad or just create one of the new name now I'll do text make wad and it will generate that new wad for me and now I can again say we're saying here start doom what I what am I using I'm using the doom one I wad wherever I have that place and I'm going to append to that with file of one wad that we just created so I hit that now if I escape you can see at the top instead of doom it says Linux and I'll quit out of that okay so we're moving along here now let's list things out okay so here is my doom one wad and you can see it's 12 megabytes it's 12 megabytes because I'm repackaging all of the art from the entire game and all the sounds and all the music into this file we're really I only changed two images and so now if I was creating a new eyewad if I was creating a new game that I'm going to just completely replace everything you want to create an eyewad and the way you do that is first of all let's remove the wad file I have and here if I correct then I say eyewad now you can obviously use the man file all this is very listed in the man file but this is saying don't just make a wad file make an eyewad file meaning you don't need any other game wad so you don't need the original wad you don't need the doom one doom two wad you're making your own based on that so I'm going to call this new game dot wad okay so now when I start PR boom instead of saying to load the doom one wad and then append to that the doom one wad or the one wad that we created I can just say PR boom eyewad and I will say new wad and in this particular case I get the same results again it says Linux at the top there and the main title was different but basically I created a new game using all that art I don't have the right to create a game with all this art because it's all copyrighted unfortunately in a copyrighted way that's not open but again something like the free doom project if you replace all the art and sounds and levels and all that you can create your own eyewad game and lots of games have been made using the doom game engine heretic was one there were two versions of a checks game for the check serial that was doom based and you actually see code for that in the PR boom source code so that's the difference if you're making a modification for the game you're just gonna create a regular wad if you're gonna create a whole new game you're gonna create an eyewad now again even though when we created a wad that appended to the game it was still 12 megabyte the size of the entire game how can we get around that well again if we go into our file browser here we have all these folders full of all different things so what I'm gonna do is I'm gonna highlight all those and delete them come into here and I have everything sorted by modification date I can shift delete so the newest two that I did were at the end there okay so we deleted all the non-essential things anything that I didn't change going back to our shell here if I try to package this now like so I'm going to get an error right away it's saying can't find level episode one level one wad that's that's a level file the reason for that is because we have if we list out here this wad info file so if we cat that out or put them into it open it with a text editor you can see it lists everything that it's going to try to package do text creates this when you export stuff from a wad file and then it tries to repackage it all when you package it so we have to remove from here what we don't we don't want okay we're not using and there's more that we are not using that we are using so it might be easier to just delete the whole file and put in what we need so if we come down here we can search for graphics and we can see that us area starts with the brackets in the title of the folder that it's supposed to be in anything with a pound symbol as a comment so we don't even need those so what we need is graphics and then the list of the artwork that the graphics that we have added so let's quit out of that and let's just say echo nothing into the wad dot text now if we go back into that you can see there's nothing in there let's add a line that says graphics and let's list what's inside our graphics folder we got two files here and so let's go ahead and paste them in here each on their own line without their extension and in the original file things were all capitalized I don't know if that matters usually I capitalize it just to be sure but let's try it without capitalizing it so let's try running do text make wad one and it looks like it completed successfully if we list out now instead of 12 megabytes we have a 72k file which is much much better so if you're only gonna be making a few changes you just remove what you don't want and let's just check to make sure that our wad file still works so we're just gonna say PR boom oh well again well now we should be able to do it without telling it what doom water so when I run this now it's going to default to doom 2 because I have that installed and that's what it defaults to but I don't think we'll get that graphical editor so we got our main title screen we got Linux at the top there if we go into here yeah we don't get those blurry walls because the reason we got those blurry walls were because of some of the graphics that we were putting into that wad file were not compatible and it doesn't matter they're not there anymore so this wad file that we just created is compatible with those both doom one and doom two and really any doom-based game because the things we put in there are the title and the title screen so it's always going to be the same are always gonna be available okay and I think that will be it for this drawing I look more at wad files next week so I thank you for watching and I hope that you enjoy this tutorial please visit filmsbychrist.com that's Chris with a K there should be a link in the description and as always have a great day there's also again a link in the description to show notes all the notes on all that we've got over a day and some stuff for next week video if you want to get ahead so check out the links in the description thanks and have a great day