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

vertexes lump

Recommended Posts

okay this goes out to anyone who knows programming and/or a lot about the doom map format.

so I'm making a lump manager util type thing in my spare time, and as a sort of distraction I decided to make a map loader that would output some basic stats on the maps (and also because I hadn't made a class in a while and I wanted to make sure I still remembered). Anyways, it all went smoothly except for loading the VERTEXES lump (which btw should really be called VERTICES but I digress). Here's a snip from the doom specs:

These are the beginning and end points for LINEDEFS and SEGS. Each
vertice's record is 4 bytes in 2 fields:

(1) X coordinate
(2) Y coordinate

now to me that implies that every vertex is stored in 4 bytes so thus to get the # of verts a map has you take the byte size of the VETEXES lump and divide it by four. makes sense right? so I've been using various other editors to compare and such while I've been doing this. so I load up zort09 for testing and here's my program's input/output:

$> ld /doom/levels/zort09.wad
PWAD with 54 lumps...
$> loadmap MAP01
Verts   : 5417
Linedefs: 4628
Sidedefs: 7973
Sectors : 663
Things  : 488
now when I load up the same zort09.wad in wadauthor here's the stats it shows me:

and then in deepsea:

and finally in XWE:

now the lump size of the VERTEXES lump in zort09 is 21668 bytes (says my util and wintex and xwe) and 21668 / 4 == 5417 which would lead me to believe that deepsea and wadauthor have somehow both counted the verts wrong and come up with the exact same number somehow (I don't believe that to be the case tho), or is there some sort of undocumented feature of the VERTEXES lump that I should know about, or perhaps some sort of error with the zort09 vertexes lump, any info at all would be helpful because it's driving me a bit nutty

also on an interesting note, if I load map01 of massm2 the vert count for wadauthor and my own util are exactly the same, but doom2.wad's map01 is off in the vert count between the two (I didn't contrast it with deepsea or xwe though).

edit: btw you should know that my prog actually reads in the verts and sticks all their coords into an object, it doesn't just divide the lump size by 4 to get the number of verts :P

Share this post

Link to post

The VERTEXES lump also contains additional vertices created by a node builder which are necessary to split lines into segs. All editors I know of discard those and don't count them because they are useless for editing a map.

Share this post

Link to post

eh, they're useless if you're editing your map in an editor that doesn't has a vertice base... i personally tend to leave some random verts around when i'm testing my maps.

Share this post

Link to post

Wads can contain unused vertexes that are generated by the node builder. Level editing utilities very likely remove these vertexes as they load the map, whereas resource viewer utilities simply process the raw data and ignore whether or not vertexes are attached to any lines.

I am not 100% certain this is the cause, but I'd bet money on it.

BTW, both vertexes and vertices are accepted plural forms for vertex. From dictionary.com:

n. pl. ver·ti·ces (-t-sz) also ver·tex·es
4. Mathematics.
a. The point at which the sides of an angle intersect.
b. The point on a triangle or pyramid opposite to and farthest away from its base.
c. A point on a polyhedron common to three or more sides.

Share this post

Link to post

Woops. It took me so long to look up the definition of vertex that Graf Zahl beat me to the point I was making ^_^ Oh well.

Share this post

Link to post

ohh I see, I hadn't even thought about segs, I'll just run a check against the linedefs lump when it gives a vertex count etc etc, thanks for the help dudes

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