File names and structure
Posted: Tue Jul 04, 2017 2:14 pm
Something just clicked with me, a mistake I've been assuming for a while.
There's basically no requirement for file structures in this program, is there? Anything that is referenced as a texture for a wall or a sprite for a weapon effect or really anything else that appears in the game, these are all referenced solely by a name.
Because of all the time I've spent with other games and engines, I am used to the location of a file being critical to its use in the game. If I use a texture on a wall and it's in one package, but then I change the name of the package, or move that package to a different folder or sub-folder, the walls that originally used that texture are now broken.
But this isn't the case with Doom and 3DGE, is it? Here things are just referenced by a name, with no direction to a path. If I load a dozen wads, it won't matter which wad file a texture is in, because the engine is just going to look for that name. The only confusion that can arise is if multiple files have the same name, in which case, there is a logical search order and the last such name found will be used.
This revelation means a bit to me because I have been wanting to re-organize the file structure I'm using in my project. Having everything dumped into one massive wad file makes it inconvenient to navigate, and I'd much prefer to put things into little folders. But as of yet, I'm not certain what structure of folders to use, because I'm still getting them all together. But if the game doesn't search for things at specific locations, I am free to completely re-organize how things are organized if I so decide. I could even divide the expected content of the iWads into a new structure, like put all the monster sprites in their own wad, all the weapon sprites in another wad, and then put all these into a pk3 file. As long as I properly instruct the exe to include all my wads and pk3 files, I'm good. Right?
Correct me if I'm wrong.
There's basically no requirement for file structures in this program, is there? Anything that is referenced as a texture for a wall or a sprite for a weapon effect or really anything else that appears in the game, these are all referenced solely by a name.
Because of all the time I've spent with other games and engines, I am used to the location of a file being critical to its use in the game. If I use a texture on a wall and it's in one package, but then I change the name of the package, or move that package to a different folder or sub-folder, the walls that originally used that texture are now broken.
But this isn't the case with Doom and 3DGE, is it? Here things are just referenced by a name, with no direction to a path. If I load a dozen wads, it won't matter which wad file a texture is in, because the engine is just going to look for that name. The only confusion that can arise is if multiple files have the same name, in which case, there is a logical search order and the last such name found will be used.
This revelation means a bit to me because I have been wanting to re-organize the file structure I'm using in my project. Having everything dumped into one massive wad file makes it inconvenient to navigate, and I'd much prefer to put things into little folders. But as of yet, I'm not certain what structure of folders to use, because I'm still getting them all together. But if the game doesn't search for things at specific locations, I am free to completely re-organize how things are organized if I so decide. I could even divide the expected content of the iWads into a new structure, like put all the monster sprites in their own wad, all the weapon sprites in another wad, and then put all these into a pk3 file. As long as I properly instruct the exe to include all my wads and pk3 files, I'm good. Right?
Correct me if I'm wrong.