Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Gez

An UDMF-related suggestion

Recommended Posts

Inspired by a problem someone is having, I think it could help debugging maps a lot more if the index of elements were indicated as a comment. I.e.:

thing // 0
{
x = -320.000;
y = -256.000;
angle = 90;
type = 1;
skill1 = true;
class1 = true;
}

thing // 1
{
x = -320.000;
y = 0.000;
angle = 90;
type = 2035;
skill1 = true;
class1 = true;
}
 <etc.>

thing // 6789
{
x = -320.000;
y = -64.000;
angle = 270;
type = 1337;
special = 80;
arg0 = 1;
skill1 = true;
class1 = true;
}

vertex // 0
{
x = -448.000;
y = 384.000;
}

vertex // 1
{
x = -192.000;
y = 384.000;
}

vertex // 2
{
x = -192.000;
y = 128.000;
}

<etc.>

linedef // 0
{
v1 = 0;
v2 = 1;
sidefront = 0;
blocking = true;
}

linedef // 0
{
v1 = 1;
v2 = 2;
sidefront = 1;
blocking = true;
}

<etc.>

sidedef // 0
{
sector = 0;
texturemiddle = "BROWN144";
}

sidedef // 1
{
sector = 0;
texturemiddle = "BROWN144";
}

<etc.>

sector // 0
{
heightfloor = 0;
heightceiling = 128;
texturefloor = "FLOOR0_1";
textureceiling = "FLOOR0_1";
lightlevel = 160;
}

sector // 1
{
heightfloor = 0;
heightceiling = 128;
texturefloor = "FLOOR0_1";
textureceiling = "FLOOR0_1";
lightlevel = 96;
}

<etc.>
I know UDMF is not supposed to be written by hand, but it's still meant to be legible enough to let people look for a problem. And that would help a lot -- especially since it'd also allow to make Perl scripts or whatever else that could check for errors more easily.

Share this post


Link to post

I endorse this idea ;)

Also, I'm not sure that refusing to load an entire map on a missing first sidedef is a good idea.

Instead, why not generate a dummy sidedef and attach it instead? This is what DOOM ports do when they find such erroneous maps, rather than letting the game crash like it did in the vanilla codebase.

If DB2 can't do this for some reason, it would probably be a good idea if there was an external tool to fix up such problems.

Though, I'm curious to know how a linedef with no front side was written into the file in the first place. This obviously shouldn't be done and is probably a glitch.

Share this post


Link to post

Sure, I can work on this.
- I can have my UDMF TEXTMAP writer add comments for the indices.
- When an error such as this one occurs I can try to resolve it by adding a dummy sidedef.

I'm not sure if I can give you the line number where it failed, simply because how the system works. There is a parser which turns the text into an object-oriented structure. Then there is a reader which turns that structure into a map. It's in the second pass where it goes wrong and at that point the system has lost track of lines. But I'll see what I can do.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×