EricsonWillians Posted June 6, 2014 I'm deeply interested in writing Doom Levels with Python, in creating them through pure code (So that I can experiment in a way it's not possible with a "Doom Builder"). Nevertheless, I need to understand pretty well how exactly a WAD file works. I need to understand the "Map data lumps", etc. I want to create an open-source library for creating doom maps with Python. But, it may be that I must make some experiments in plain C or C++. I would like to know if you have technical references concerning the Doom WADs. Do you know any source/reference beyond those Wikis? If there are none, is there someone here that has done some "experimentation" trying to read the WAD files from C or any other programming language and has some advice to share? Python allows some "bit-manipulation", but I would like to have a deep understanding of the WAD files in a way that I could store those lumps correctly without having to scrape WADs randomly trying to figure out how they work. If there's someone interested in the idea, I'm going to start it in github, so well, we could work together. Thank you! 0 Share this post Link to post
MTrop Posted June 6, 2014 If you also know a little Java, I've written an entire library for Doom's structures in Java that could prove helpful as a reference. https://github.com/BlackRookSoftware/Doom There's a primary interface in there called "DoomWad" that declares all basic functions and entry points, but what you'd really want to take a look at is one of the implementing classes, "WadFile", which implements all of the low-level operations on files. Most of the code should be self-explanatory. However, you should be aware that a Python library already exists, written by Fredrik Johansson called OMGIFOL, but it doesn't look like it covers reading all of the lump data itself yet, which is a shame. 0 Share this post Link to post
EricsonWillians Posted June 6, 2014 I was not expecting for Java! That's so much better (I understand it much better than C++). I'll certainly take a look at them, and at the Python one. Actually, I want to create a program that generates doom levels procedurally (I really want to combine Doom with Procedural Generation, which is SO MUCH opposite from the original doom-philosophy of level design.) But, I want classes/methods to just be able to create levels normally before starting experimenting, and your links will be very helpful. Thank you! 0 Share this post Link to post
Phml Posted June 6, 2014 Dunno if that's what you're looking for, but OBLIGE can make randomly generated Doom levels. 0 Share this post Link to post
MTrop Posted June 6, 2014 No problem. If you end up using the Java library, and you find that there are some trickier elements in there in terms of usability, I would be happy to receive feedback about it. Some sample projects using the Doom Library are here: https://github.com/MTrop/DoomUtils 0 Share this post Link to post
plums Posted June 6, 2014 You might also want to look at wadc, which is written in Java: http://jmtd.net/wadc/ also maybe this? https://gist.github.com/jasonsperske/42284303cf6a7ef19dc3 0 Share this post Link to post
EricsonWillians Posted June 6, 2014 hardcore_gamer, Python is an open-source community-developed somewhat functional-inspired somewhat scripting general-purpose high-level programming language that supports object-oriented, imperative, functional and procedural styles or paradigms. Phml, that's exactly what I want, but I would like to play with it from raw code. (For example, writing an algorithm to generate maze-levels procedurally.). Also, there's no definite solution for the "procedural problem", so my implementation could be very different. MTrop, sure! I'll let you know once I've explored it :). Plums, thank you! I'll take a look at them. 0 Share this post Link to post
exl Posted June 6, 2014 I wrote some pathfinding code for Doom maps in Python a while ago, its level data handling code might be of interest: https://github.com/GitExl/DoomPath/tree/master/src/doom/map Python's struct module will be your friend! 0 Share this post Link to post
GreyGhost Posted June 7, 2014 EricsonWillians said:I need to understand the "Map data lumps", etc. I'd start with the Unofficial Doom Specs. 0 Share this post Link to post
Gez Posted June 7, 2014 EricsonWillians said:I'm deeply interested in writing Doom Levels with Python, in creating them through pure code (So that I can experiment in a way it's not possible with a "Doom Builder"). Nevertheless, I need to understand pretty well how exactly a WAD file works. I need to understand the "Map data lumps", etc. I want to create an open-source library for creating doom maps with Python. But, it may be that I must make some experiments in plain C or C++. I would like to know if you have technical references concerning the Doom WADs. Do you know any source/reference beyond those Wikis? In addition to specs detailed on the Doom wiki (and also found on other places like the ZDoom wiki), you have the original Doom source code as a reference, as well as the source code of Doom editors (obligatory example), which may or may not be easier to follow and understand. 0 Share this post Link to post
clamgor Posted June 7, 2014 Phml said:Dunno if that's what you're looking for, but OBLIGE can make randomly generated Doom levels. I think what he means by random generation is the way that Minecraft creates endless maps using am algorithm or something. Imagine that, an endless Doom dungeon. I don't think you could do that to a WAD, though. Maybe a program with source port features that loads the Doom IWADs in order to create endless dungeon-esque maps using all the textures and various bits and pieces of the core maps. 0 Share this post Link to post