Released source to MAPtoWAD — Quake/HL to GZDoom converter

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
User avatar
printz
Posts: 2648
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Released source to MAPtoWAD — Quake/HL to GZDoom converter

Post by printz »

Since I wasn't advancing on it any more, I've decided to simply release the source code, in its current state, of MAPtoWAD.

MAPtoWAD is a command-line utility that can read Half-Life uncompiled .MAP files (built using something like Worldcraft v3 or Hammer, I think) and convert them to GZDoom TEXTMAP (UDMF) lumps.

It reads all brushes from the Half-Life uncompiled map (.MAP, not .BSP) and uses their coordinates to build equivalent 3d floors in a GZDoom setting, all inside a very large 16384x16384x16384 cube sector with sky and line_horizon background, which would be very useful for making void maps. The result is something unreadable unstable in Doom Builder, but fully playable in GZDoom.

I stopped working on it because of a serious limitation: no speed optimization on GZDoom 3d floors at all.

Here is the source code, compilable with Dev-C++ or whatever works for you.

HOW TO USE IT:

- download Worldcraft for Half-Life so you can make HL maps
- download Wally so you can collect the textures from Doom into a Quake/Half-Life WAD
- find a Wad browser that can extract textures into PNGs without resorting to patches
- use Wally to import those into a WAD
- setup Worldcraft to use that WAD
- start mapping!
- after saving, do NOT try to use BSP/VIS/LIGHT. Just go to the command prompt and launch maptowad <halflife .map input> <gzdoom textmap output>
- use your favourite Wad browser to import the textmap into a UDMF setup
- use your favourite node builder on that setup.
- play!

As an example of where I used it, it's this HPack WIP: http://forum.realm667.com/viewtopic.php ... 4&start=10 . I wish I had more updated screenshots. You may need to update the source code for your needs.
Last edited by printz on Tue Jun 26, 2012 2:19 am, edited 1 time in total.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Post by Nash »

Holy freaking crap. This is amazing. I was just thinking the other day about asking whether anyone has attempted to write something that can convert brushes into UDMF.

I didn't ask because I thought it was just impossible to do. I mean, all the overlapping brushes... how in the heck would it be converted into 3-d floors for GZDoom.

But it looks like you figured it out. :O

What would it take to make the map readable in Doom Builder? Pretty sure you'd need to get it into DB2 to populate it and edit it further for Doom usage...
User avatar
Tormentor667
Posts: 13530
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Post by Tormentor667 »

I was already impressed by the HPack map, but this is still fucking awesome as hell. Now I want someone to convert Quake 1 E1M1 to GZDoom with that converter :)
User avatar
printz
Posts: 2648
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Post by printz »

Nash wrote: What would it take to make the map readable in Doom Builder? Pretty sure you'd need to get it into DB2 to populate it and edit it further for Doom usage...
Sorry, it can be opened, but it's unstable, due to so many linedefs and sectors in close proximity. If you move them a bit, when it comes to overlap them, DB2 will crash. Also, don't run Visual mode. Updated the wording in the OP.

Tormentor667: sadly it only converts raw MAP files (and currently only of Half-Life, which are slightly different from Quake's; someone'll need to update the code), not compiled BSP. So you'll have to find the "source map" of E1M1.

Then also, it's for void maps, not typical maps. For the latter, I'm highly thinking of trying something for Eternity, which does have BSP for complex 3D maps (which are nothing else than multi-layered 2D maps).
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Post by Nash »

I remember Romero releasing all of the uncompiled source maps for the Quake shareware a few years back. Also, too bad maptowad's output can't be post-edited with in DB2.
User avatar
leileilol
Posts: 4449
Joined: Sun May 30, 2004 10:16 am
Preferred Pronouns: She/Her
Location: GNU/Hell

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Post by leileilol »

Actually Romero released all the Quake maps including the ones that didn't make the cut (like the elusive DM7, the just-started DM8, the start of Dismal Oubliette, and the ARMOR brush item), but under the GNU GPL.

The difference between BSP29 (Quake) and BSP30 (Half-Life) are different clipping hull sizes, external textures and 24-bit lightmaps.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Post by Nash »

How does your converter decide how and where to place the control sectors? I am especially amazed at how it's doing it for sloped 3-d floors too.
User avatar
printz
Posts: 2648
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Post by printz »

It places them at the east of the square. It creates new control sectors when a new combination of 3d floors is found. For each new combination of N 3d floors, N control sectors are created. It's not the most efficient, but it was working for me.

Thanks for the interest :)

Also, the name needs changing. There's already a "maptowad" (not by me) which converts Wolfenstein 3D maps to AFADoomer TC wads.
Post Reply

Return to “General”