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.

DH-dlc: A Doom Level Compiler

Postby DavidPH » Thu Feb 04, 2010 8:26 pm

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
DavidPH
Crazy Compiler Man
 
Joined: 28 Aug 2009

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

Postby XutaWoo » Thu Feb 04, 2010 9:35 pm

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
XutaWoo
one day when going to see the rabbit, there was a previous visitor ...
 
Joined: 30 Dec 2006
Location: beautiful hills of those who are friends

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

Postby Siggi » Fri Feb 05, 2010 6:06 am

XutaWoo wrote:DB2 doesn't work for Linux.

We have a winner!
User avatar
Siggi
 
Joined: 03 Oct 2004
Location: South Africa

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

Postby DavidPH » Fri Feb 05, 2010 5:10 pm

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
Crazy Compiler Man
 
Joined: 28 Aug 2009

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

Postby DavidPH » Fri May 07, 2010 10:38 pm

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.)
User avatar
DavidPH
Crazy Compiler Man
 
Joined: 28 Aug 2009

Re: DH-dlc: A Doom Level Compiler

Postby MP2E » Fri May 14, 2010 8:58 pm

I think this is a great idea! It reminds me of WadC :P
MP2E
 
Joined: 08 Oct 2007

Re: DH-dlc: A Doom Level Compiler

Postby DavidPH » Sat May 15, 2010 9:28 pm

Thanks, it's nice to know that someone has taken an interest in my project.
User avatar
DavidPH
Crazy Compiler Man
 
Joined: 28 Aug 2009

Re: DH-dlc: A Doom Level Compiler

Postby DavidPH » Wed Jun 30, 2010 3:32 pm

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
DavidPH
Crazy Compiler Man
 
Joined: 28 Aug 2009

Re: DH-dlc: A Doom Level Compiler

Postby DoomRater » Tue Jul 06, 2010 12:45 pm

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
DoomRater
Hi, I'm bob.
 
Joined: 28 Jul 2004
Location: WATR HQ
Discord: DoomRater#6308

Re: DH-dlc: A Doom Level Compiler

Postby DavidPH » Tue Jul 06, 2010 1:45 pm

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
DavidPH
Crazy Compiler Man
 
Joined: 28 Aug 2009

Re: DH-dlc: A Doom Level Compiler

Postby NeuralStunner » Mon Jul 12, 2010 11:42 pm

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
NeuralStunner
Not "Neutral"
 
 
 
Joined: 21 Jul 2009
Location: capital N, capital S, no space
Discord: NeuralStunner#4201
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: DH-dlc: A Doom Level Compiler

Postby Potnop » Thu Jul 15, 2010 12:53 am

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
Potnop
 
Joined: 19 Dec 2006

Re: DH-dlc: A Doom Level Compiler

Postby Nash » Thu Jul 15, 2010 1:53 am

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
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: DH-dlc: A Doom Level Compiler

Postby DavidPH » Thu Jul 15, 2010 10:24 am

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
DavidPH
Crazy Compiler Man
 
Joined: 28 Aug 2009

Re: DH-dlc: A Doom Level Compiler

Postby NeuralStunner » Thu Jul 15, 2010 1:53 pm

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.
User avatar
NeuralStunner
Not "Neutral"
 
 
 
Joined: 21 Jul 2009
Location: capital N, capital S, no space
Discord: NeuralStunner#4201
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Next

Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 4 guests