sirjuddington / SLADE

It's a Doom editor
https://slade.mancubus.net
GNU General Public License v2.0
709 stars 111 forks source link

Topographic mode, and other kinds of visualization? #320

Open eevee opened 9 years ago

eevee commented 9 years ago

Something slightly annoying about map editors is that it's hard to get a sense of how the player could move through the map at a glance, since looking down from above, you can't tell what's a door or a lift or a window or what. This crossed my mind as a step in that direction, and it seemed interesting but also very hard to get right, so I hacked it in to see how it looks and what you think.

Here's Doom 2 MAP03 (The Gantlet):

screenshot of a map where sectors are colored based on their floor height

Lower floors are more blue; higher floors are more red. So the two very-blue areas stand out instantly as some sort of pit, and you can see the gradient along stairs, and it's not too hard to pick out pillars and other places the player can't climb up. Also good for indicating when your map maybe needs a little more height variation. :)

The colors aren't linear; they're clustered around height 0, based on the assumption that most maps are roughly centered at height 0. There's a magic number involved that could be adjusted, or the colors could be scaled to fit the min/max height within the actual map.

Here's MAP13 (Downtown), which has some more drastic height variation, as well as with flat rendering turned on:

same as before identical to the other image, but with colorized textures instead of solid colors

It would be even more impressive if sloped sectors were painted with a gradient showing the direction of the slope, but I haven't the foggiest how to do that at the moment. :)

Does this seem useful? Or readable, even?

sirjuddington commented 9 years ago

Well I don't see any harm in adding something like this. IMO it would work best as another display style for sectors mode rather than a completely separate editing 'mode', so eg. you would have wireframe / untextured (light levels) / textured / topographic (not sure textured+topographic would be needed). I'd also have the min/max colours configurable since personally I'd want to go with black for low and white for high.

Gaerzi commented 9 years ago

Personally I'd rather go with blue for high and red for low. Seems more intuitive to me: blue like the sky, red like lava. :) Using black for low and for background color carries the risk of confusing low places with void.

I wonder how this mode would handle 3D floors? Make the sector's color pulse through the various heights of the various control sectors? And what about slopes, get a gradient?

eevee commented 9 years ago

Oho. I had it the other way initially (red is low hue anyway) and it seemed wrong because actual terrain maps use red to mean high, but that's a neat mnemonic.

eevee commented 9 years ago

I keep thinking about the larger question of how to visualize the flow of a map. If I open up Doom 2's MAP02, I can't really tell at a glance what's going on, even if I've played the map before:

doom2_map02_pristine

But by their very nature, maps tend to have bottlenecks, places where you have to do something special to progress any further. You might carve up MAP02 like this, and get something resembling how the map feels to play through:

doom2_map02

SLADE knows pretty much everything the engine knows, so this isn't impossible to figure out. It would be tricky, granted, even for this simple map — several sectors are broken up by pillars, and the brick building requires a "jump". There are plenty of iffy questions, like whether a lift with a switch next to it counts as creating a new area. And that style of color-coding wouldn't go very far; I used up half the spectrum on one of the easiest maps ever. But it feels like the seed of something useful.

Other kinds of potentially helpful visualization:

I don't know how the UI for any of this might work, and of course scripting complicates it considerably. Just throwing stuff out there :)