Sunday, March 18, 2018

I made a Random Map Generator For Duke Nukem 3d

I've been working on a new project since I decided to quit making TC's for Gzdoom.  This project is a not a mod for a game but a Random map Generator. And it's not for doom this time, but for Duke3d.

Duke3d needs a random Map Generator bad. Oblige radicalized how quickly you could make a map for doom. This map generator called Randuke should do the same thing for Duke3d.  Now a word of warning, Randuke is not nearly as good at making maps as oblige was for doom, it's still a work in progress, and due to the lack of an easy to use editor and my lack of duke3d mapping skills, you won't  see great maps for duke3d made with this thing ever.  But still it is capable of making fun maps that are challenging and have the setpeices of duke3d neccisary to make fun maps such as duke burgers, shop n' bags, bathrooms with mirrors, etc.

The Map Generator is based on a program called Joiner I found on RTCM one day.  I took that program which joins prefab room together randomly and populates the final maps with all items neccisary to beat the map and monsters as well, and redid the prefabs for it to make actual competent duke3d maps.  The maps are not as good as the 3d realms maps but they are fun...

There are 2 versions of randuke. A duke3d 1.4 version and a duke3d 20th anniversary world tour version. The 1.4 version lacks the new walls the 20th anniversary version can put in as well as the new weapon and monster from that version but besides that they are very similar.


Here are screenshots from the new 20th anniversary version:

Running this program is a bit trickier than Oblige. First of all there is no gui. It's a command line program for dos, number 2, it's hard to learn how to generate maps with it.  You will need dosbox to run this on windows 7 machines. Downloads are below.

Duke3d v1.4 atomic edition version: Here
Duke3d 20th anniversary World Tour Version : Here


Extract whatever  download you are using not to your duke3d folder but to a new folder called C:\randuke. Run dosbox and type

mount C: C:\randuke
now hit Ctrl+F12 over and over again till cpu cycles at the top becomes 50000 or so.
Now type randuke.bat and hit enter.

It will ask you to fill in 5 variables. The First one is  how big the level will be. Set that to no higher than 8. Then the next one determines how many "extra" rooms to put in. Set this to a low value like 3 or below 3. The rest of the values should be set to one. When it prompts you to hit enter or q hit enter.  Wait patiently for it to make a level. Once completed you need to copy the maps from the right folder and give them a name. Go to a dos prompt (NOT a dosbox prompt) and type
cd C:\randuke
Then type:
copymaps <name of your level> (where name of your level is what the file name will be - if you type in new you will get a map named new.map in your duke3d folder)

To run your map for 1.4 download eduke32 run it and go to the user maps menu to load the map.
For the 20th anniversary version, launch a new game and type the ~ key on your keyboard once you are in a map and then type in map <whatever map name you typed in for copymaps above>... To run the above new.map I would type in "map new" there... Now it will load. Hit escape to get out of the console and play the map...

Hope you enjoy the maps this generator makes. I know they are not great levels but I am not the greatest mapper with any game so I couldn't really make great prefabs for joiner to make randuke.

EDIT :

Fixed up the alignment of textures in the levels significantly...  Now it doesn't look so ugly.. Also fixed a crash bug...