DUKE NUKEM II LEVEL EDITOR (and other stuff)

Discuss classic and favorite computer or console games here.
User avatar
K1n9_Duk3
Vorticon Elite
Posts: 536
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Post by K1n9_Duk3 » Mon Feb 21, 2011 21:59

Nospike wrote:Does that mean we can have level editors now?
It's possible. I managed to write code that creates Duke2 level files from the internal map representation the viewer uses.

Surprisingly, when I use that code to save L1.MNI (E1M1), I get a file that is thirteen bytes smaller than the original one. Seems like my RLE compressing routine is a little smarter than the one that Apogee used to create the map files back in 1993. And the game was able to read the "modified" file perfectly. So it's really just a matter of creating a user interface to change the tiles and the other map properties. But I don't promise anything.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net

User avatar
Levellass
S-Triazine
Posts: 5261
Joined: Tue Sep 23, 2008 6:40

Post by Levellass » Tue Feb 22, 2011 7:57

What is the unknown data for? Now I am curious.

Seems like my RLE compressing routine is a little smarter than the one that Apogee used to create the map files back in 1993.
I had this happen with Keen RLE compressions and a few others. Often it is because we can keep all the data in memory instead of dealing with all the limitations of early computers.

Does that mean we can have level editors now?
There's already a Cosmo level editor (Two in fact) but Duke 2 is a new one.
What you really need, not what you think you ought to want.

User avatar
K1n9_Duk3
Vorticon Elite
Posts: 536
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Post by K1n9_Duk3 » Tue Feb 22, 2011 10:04

Levellass wrote:What is the unknown data for? Now I am curious.
They are basically flags controlling the behavior of the backdrop and giving indices of backdropm and music files. I already added them to the ModdingWiki pages.

And for those who didn't notice: I put some new download links in the first post of this thread when I changed the thread's title.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net

User avatar
K1n9_Duk3
Vorticon Elite
Posts: 536
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Post by K1n9_Duk3 » Sun Feb 27, 2011 19:21

After spending the last few days reverse-engineering the Major Stryker data files, I think I'll be doing a Duke Nukem II level editor next. This is what I had in mind for the basic look of the editor (these are just mockups, no actual screenshots):

Image Image

The editor will support two modes. One where the stuff on the left side is always displayed and one where the stuff will only pop up when you move the mouse to left edge of the screen and disappear when you move the mouse back over the actual level.

You can right-click and drag a frame to select tiles (both from the map and from the tilesets) and left-click to place them on the map. This should basically work like the map editor of KEENGINE.
Clicking in the "map info" area lets you change the level properties: A cursor will appear in front of "tileset" that you can move with the arrow keys. Pressing enter lets you change the value for the selected item. Pressing escape puts you back in normal edit mode.

If you have any comments/suggestions, let me know!
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net

Nickssoft
Vortininja
Posts: 98
Joined: Thu Nov 01, 2007 3:47

nice

Post by Nickssoft » Mon Feb 28, 2011 9:01

been waiting for a duke nukem 2 level editor forever, hooray for my favorite game !

User avatar
K1n9_Duk3
Vorticon Elite
Posts: 536
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Re: nice

Post by K1n9_Duk3 » Mon Feb 28, 2011 10:13

Nickssoft wrote:been waiting for a duke nukem 2 level editor forever, hooray for my favorite game !
And I've been waiting for duke nukem forever, but that's another story...
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net

User avatar
Roobar
Vorticon Elite
Posts: 2929
Joined: Tue Jan 08, 2008 16:12

Post by Roobar » Mon Feb 28, 2011 17:51

Hail to the king baby! This year Duke Nukem Forever and Duke 2 editor! How awesome is that!

User avatar
K1n9_Duk3
Vorticon Elite
Posts: 536
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Post by K1n9_Duk3 » Sat Mar 05, 2011 23:02

Well, at least the level editor has already been released. It's a BETA, but most things should work.

How to get this thing up and running:

Step 1: extract the contents of your NUKEM2.CMP file (drag them onto the exe to do that)
Step 2: load one of the extracted levels or create a new level. When you create a new level, you must select the folder with the extracted data files or you won't be able to select a tileset for the new level.

Have some fun with this. If you find any bugs, let me know!
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net

User avatar
Paramultart
VBB's Partner in Crime
Posts: 3004
Joined: Mon Jul 26, 2010 8:36

Post by Paramultart » Sat Mar 05, 2011 23:21

Oh... My... Goodness...

I've always wanted to make my own levels for DN2 since the game first came out.

I applaud you, K1n9_Duk3. At first I thought your level viewers were obsolete, but now it's clear that all of that paid off. You are truly amazing.

Thank you.


You should post this on the 3DRealms forums. ;)
"Father Mabeuf was surveying his plants"

User avatar
K1n9_Duk3
Vorticon Elite
Posts: 536
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Post by K1n9_Duk3 » Sun Mar 06, 2011 16:37

Paramultart wrote:At first I thought your level viewers were obsolete, but now it's clear that all of that paid off. You are truly amazing.
Well, level viewers are relatively easy to create once you know the structure of the level and graphics files. And I think that a level viewer is always the first step in the process of creating an editor.

But editors require a LOT more code (Duke2View has around 270 lines of code, Duke2Edit has about ten times as much). It was the knowledge I gained while working on the level editor for KEENGINE that really helped me out here, even though I wrote the whole thing from scratch.



By the way, if you find stuff that makes the game crash but is not reported as an error by the editor, please tell me so that I can add warnings and errors to the scan routines. Makes the whole thing a little more user-friendly.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net

User avatar
Roobar
Vorticon Elite
Posts: 2929
Joined: Tue Jan 08, 2008 16:12

Post by Roobar » Sun Mar 06, 2011 20:22

Very nice, but the graphics are too tiny on 1920x1080 for work. There's got to be a way to magnify them/editor. Btw it seems that the DN2 tilesets are very small compared to the Keens all-in-one ones.

User avatar
K1n9_Duk3
Vorticon Elite
Posts: 536
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Post by K1n9_Duk3 » Sun Mar 06, 2011 21:22

You can use [ALT]+[ENTER] to switch to fullscreen mode and you can also use the [NUM +] and [NUM -] to zoom in and out.

The editor could work at any resolution higher than 640x480, but there's no menu option to change the resolution right now.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net

User avatar
Paramultart
VBB's Partner in Crime
Posts: 3004
Joined: Mon Jul 26, 2010 8:36

Post by Paramultart » Mon Mar 07, 2011 0:24

K1n9_Duk3, if you managed to make a Monster Bash editor (of any kind, really), you would be a god.

Also, I'm postponing all Keen projects to finish a complete DN2 shareware level expansion pack. VBB may help.

Is it possible to edit sprites and end scenes?

EDIT: I really love the interface. Possibly one of the best editors I've used.
But you should really emphasize that you have to hold the right mouse cursor to use the copy tool. It took my a few minutes to realize that.

EDIT2: The "actors" plane could use improvement. Having a cluster of letters representing the final character of their hex value and having to hover over each character to find out what object it represents is unpractical to say the least. I can't tell you how long it took for me just to find the exit object. How was I to know it was the red letter B? :/
"Father Mabeuf was surveying his plants"

User avatar
DHeadshot
Vorticon Elite
Posts: 1874
Joined: Fri Aug 14, 2009 10:21
Location: UK
Contact:

Post by DHeadshot » Mon Mar 07, 2011 13:45

Paramultart wrote:Also, I'm postponing all Keen projects to finish a complete DN2 shareware level expansion pack.
Even Shmaynoria 2? :(
Cereal Board!
Deltamatic wrote:Prepositions are things I end sentences with.
(Cereal wiki has sadly died)

User avatar
Paramultart
VBB's Partner in Crime
Posts: 3004
Joined: Mon Jul 26, 2010 8:36

Post by Paramultart » Mon Mar 07, 2011 14:16

I haven't been working on it lately, anyway, and a DN2 levelpack should only take a couple days.
"Father Mabeuf was surveying his plants"

Post Reply