PDA

View Full Version : Hexen tags.


Danimetal
July 29th, 2007, 07:25 AM
Hi!.

This is a development question. I remember we were discussing a while ago about the tag limits. Legacy v1.42 has a greatly increased number of tags that completely covers the the number of effects you can have with the current SEGS limitations, still I remember that the Hexen-Doom type maps done for Legacy 2 will have the maximum tags set at 255.

It was argued that 255 was such a small number for modern maps, maxime is we´re using a lot of 3d floors, light effects and 3d floors intersections (these effects alone would eat 100+ tags in some maps I did, plus tags for teleporters and other effects got to 255+)... With the SEGS limit increased to twice its previous value I would like to know if the tag limits will stay at 255 and if there´s an engine reason for that. Most people will want to use Hexen features and it would be a turn-down to have to start a new map once the tags are beaten (with could happen with vastly detailed maps).

Thanks for any replies :).

MR_ROCKET
July 29th, 2007, 08:07 AM
I thought the limit was 256? :P

Danimetal
July 29th, 2007, 11:17 AM
No way!. I´ve used tags like... 1000 and 3000 in the Treasure Hunter wad :). I think...

smite-meister
August 3rd, 2007, 04:49 PM
I remember that the Hexen-Doom type maps done for Legacy 2 will have the maximum tags set at 255.

Correct, but see below.


It was argued that 255 was such a small number for modern maps, maxime is we´re using a lot of 3d floors, light effects and 3d floors intersections (these effects alone would eat 100+ tags in some maps I did, plus tags for teleporters and other effects got to 255+)... With the SEGS limit increased to twice its previous value I would like to know if the tag limits will stay at 255 and if there´s an engine reason for that.

Not an engine reason, but a map format reason.
In the Doom/Heretic map format, each linedef and sector has a 16-bit tag field which gives 65535 different tags (plus the zero tag, which means no tag at all).

Now, Hexen has a slightly different map format. Each map has an additional lump for ACS scripts named BEHAVIOR, and the linedef and mapthing data structures are different from Doom.
For some reason, the Hexen devs at this point got unbelievably stingy and allocated only 8 bits worth of "tag space" in the Hexen linedef structure, which is only good for 255 different tags. (Technically there is no dedicated tag field at all, usually it is the arg1 field which holds the tag.)
Hexen sectors still have a 16-bit tag field, they only scrimped on the linedefs.

As you said, 255 tags would be too little for big levels with complex 3D floor structures. I fixed this by introducing an extra Hexen linedef type which is used to do all kinds of Legacy-specific effects, including 3D floors. This new linedef type uses two 8-bit argX fields to hold the tag, which allows you to use tag values in the range 1-65535 for these effects.
Since all non-Legacy effects such as teleporters are still limited to tag values 1--255, I suggest these values be reserved to the traditional Hexen stuff, whereas the 3D floors etc. should use tag values 256--65535.

BTW, here is the link to the spreadsheet containing the Doom->Hexen linedef conversions and new Hexen linedef types for Legacy 2 (http://users.tkk.fi/~vberghol/doom/doom_linedefs.ods).

MR_ROCKET
August 3rd, 2007, 05:37 PM
Better put this in my personal legacy docs, and there we go.
I knew I saw that number somewhere.:P

Danimetal
August 4th, 2007, 07:47 AM
Smite, that was a beautiful idea!!!. I a most sure that the classic 255 tags will be more than enough for most teleport and lighting needs, even more if the Hexen linetype that you introduced has the "create light level from the ceiling" among them. Hats off :).

Doom_Dude
August 4th, 2007, 07:56 AM
Ahhh I forgot about Danimetal saying he would make this thread.. ;)

Nice fix smite.