DH-dlc: A Doom Level Compiler

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

DH-dlc: A Doom Level Compiler

Post by DavidPH »

Ever wanted to use a scripting language to make maps? DH-dlc lets you do just that.

Prominent features:
  • Variables for storing values.
    Expression evaluator which includes intuitive mathematics as well as functions.
    Scripts (like ACS) can be written as part of the map and can have map variables included.
    "Compound Objects" that can be used for prefab architecture.
    UDMF, Doom, or Hexen output.
Sample code:
Spoiler:
Downloads:
http://github.com/DavidPH/DH-dlc/downloads

I am always looking for feedback. Bugs, suggestions, or even just a note on how usage experience goes.
Last edited by DavidPH on Wed Jun 30, 2010 3:10 pm, edited 6 times in total.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends

Re: DH-dlc: A Doom Level Compiler for Linux

Post by XutaWoo »

DavidPH wrote:Even using a GUI requires planning and forethought.
It's called "doodling." :P

But yeah...I really don't see the point in this, unless DB2 doesn't work for Linux.

Still, good work.
User avatar
Siggi
Posts: 3288
Joined: Sun Oct 03, 2004 8:57 am
Preferred Pronouns: They/Them
Location: South Africa

Re: DH-dlc: A Doom Level Compiler for Linux

Post by Siggi »

XutaWoo wrote:DB2 doesn't work for Linux.
We have a winner!
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: DH-dlc: A Doom Level Compiler for Linux

Post by DavidPH »

XutaWoo wrote:
DavidPH wrote:Even using a GUI requires planning and forethought.
It's called "doodling." :P
Well yes, you can make a map just by doodling, but that doesn't mean it's a good idea (although, I'm sure plenty of great maps started from doodling).
XutaWoo wrote:But yeah...I really don't see the point in this
Like I said, the primary target are people who prefer to work with text. I can't say whether or not it's better or easier than using a GUI, just that it's different. Who knows? Maybe for some things this could actually be better. How I make maps is probably different than most other people who do (one look at my example will say as much), so I don't know whether anyone will find this useful. But if even one person does, then that makes a release worthwhile.
XutaWoo wrote:unless DB2 doesn't work for Linux.
I thought it didn't, actually (haven't checked in a while, though). But my prior point still stands: this is for people who like text. Of course, if it turns out to be useful to GUI people (perhaps use for bulk-map generation then touch-up in an GUI (I don't know where most of the time goes in making a map)), that's great, too.
XutaWoo wrote:Still, good work.
Thanks. This project would have been worth all my time (and then some) even if it never gets used, as long as I become a better programmer for having done it. Considering this was my first C++ project, I'd like to think it has.

And remember, this project isn't meant to be better or cooler (even if I think it is) than other ways of making maps. It's meant to be different. As such, it requires a different way of thinking about maps. Just as different computer languages tend to support different ways of solving a problem without any one being strictly better than another.
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: DH-dlc: A Doom Level Compiler for Linux (and Windows too

Post by DavidPH »

Just a quick update to note that I continue to do work on the project, and have managed to create a Windows binary. It doesn't use GMPLib, but I don't think that's really an issue.

I'd be interested to hear what any mappers think it would take for a text-based mapping program to replace/supplement the graphical program of their choice, or if the loss of visual feedback makes the process futile. (Or anything in between.) One of the biggest problems I've faced in this project is that I only make very crude/simple levels for my own use, so I don't have any real experience making more detailed levels. (The kind that you would actually show to another living human being.)

EDIT: And now I got DH-wad to compile in Windows as well, so I've updated the download links with the new version. I also took the opportunity to "fix" the text files in the Windows download so they use CRLF instead of LF for line ends. Also fixed a minor bug that was duplicating lumps. (It didn't cause errors, but doubled the size of the WAD and was just obviously bad.)
MP2E
Posts: 28
Joined: Mon Oct 08, 2007 3:35 pm

Re: DH-dlc: A Doom Level Compiler

Post by MP2E »

I think this is a great idea! It reminds me of WadC :P
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: DH-dlc: A Doom Level Compiler

Post by DavidPH »

Thanks, it's nice to know that someone has taken an interest in my project.
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: DH-dlc: A Doom Level Compiler

Post by DavidPH »

Just a note to say that I've switched to using git for version control (instead of manually making copies). Now you can get the very latest version from GitHub (http://github.com/DavidPH/DH-dlc). Thanks to MP2E, there are Windows builds available as well.
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ

Re: DH-dlc: A Doom Level Compiler

Post by DoomRater »

Sooo... what kind of crazy things might be planned for it? Namely, how about editing of existing maps to do things similar to what I mentioned (autogeneration of lighting sectors, for example)
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: DH-dlc: A Doom Level Compiler

Post by DavidPH »

While it is possible (with certain command line options) to load a TEXTMAP lump, altering an existing level is probably (though not necessarily) going to be a pain. Unless, of course, you start with a map already written for DH-dlc, then altering it can be quite easy depending on how it's written.

For doing a light gradient down a a straight hallway would look something like...
Spoiler:
The cool part? Once you figure out how to make one, you can turn it into a compound object and use it any time with a few lines. And compound objects are configurable, so you could add in variety as you see fit. (A curved hallway wouldn't be that hard if you know basic trigonometry, and again, re-usable.)

And I'm not sure people realize this, but DH-dlc is fully functional. I'm still working on it, but it should be perfectly usable for making maps with. (Maybe this thread should have been in Editing...)
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space

Re: DH-dlc: A Doom Level Compiler

Post by NeuralStunner »

Yay, a really tiny map!
Spoiler:
;)

All done with a batch file that:
- Makes a new folder for the map.
- Calls DH-dlc to compile the DDL script into a UDMF TextMap.
- Compiles any ACS scripts in the folder.
- Uses DH-wad to pack up the new lumps into a wad.
- Builds map nodes.

Many thanks to David for personally walking me through the language. Next I get to learn variables and loops... Liking this compiler so far! :biggrin:
User avatar
Potnop
Posts: 106
Joined: Tue Dec 19, 2006 7:24 pm

Re: DH-dlc: A Doom Level Compiler

Post by Potnop »

It'd be cool if it was able to make random maps kinda like Oblige or whatever. Except you can create scripts that tell it what kinds of random stuff to add. That's actually what I thought this was at first. It'll basically take some of your defined areas or whatever paramters you defined in the script and generate levels based on that.

It's kinda hard to think of how this would work exactly but OMG that sounds like a cool idea...
User avatar
Nash
 
 
Posts: 17468
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: DH-dlc: A Doom Level Compiler

Post by Nash »

If I ever find the time to sit down and learn this language, what I'd like to try is make a random map designer that randomly assembles pieces of "prefabs" together, similar to what Daggerfall does...
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: DH-dlc: A Doom Level Compiler

Post by DavidPH »

There are functions for generating random numbers. Combined with a few choice compound objects (which are basically configurable prefabs (although they have other uses)), it would certainly be possible to make a random map generator script.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space

Re: DH-dlc: A Doom Level Compiler

Post by NeuralStunner »

I lost 20 pounds in one week with DH-dlc! It really works! :D

:P

One of my dreams is to make a universal, master grid map that can be scripted into detailed-ish random maps while in-game (rather than compiling them all beforehand). With DH-dlc, the mapping part at least should be possible.

Return to “Editing (Archive)”