NiGHTS Things: Why were they programmed the way they were?

Status
Not open for further replies.

Fawfulfan

The Tortured Planet guy
I've been curious about this for a while. Why were some NiGHTS Things, like Hoops and Bumpers, programmed so that their height from the floor is equal to their Flag values, rather than their Z-offsets? Originally, I thought it had something to do with the fact that they were designed to accommodate Pitch and Yaw values, but that doesn't make sense; Pitch and Yaw are determined by the Angle value, which should have no impact on the Flag value. Wouldn't it just have made everything easier to code Hoops and Bumpers so that their Z offsets governed their height from the floor, like everything else?
 
I'm pretty sure that the Z-offset box didn't exist around the time SSN coded the hoops, so I expect SSN coded it that way so that he had to do less math while creating the NiGHTS maps.
 
That's because the Z-offset and the object's flags are stored in the same variable.

First four bits are your flags (Object Flip, Deaf, etc.)
The other twelve bits are your Z-offset.

In reality, they should be split up into two separate variables, but that would require changes to the WAD file structure and changes to the various map editors to support it. Not happening any time soon, if ever.

BlueZero4 said:
I'm pretty sure that the Z-offset box didn't exist around the time SSN coded the hoops, so I expect SSN coded it that way so that he had to do less math while creating the NiGHTS maps.

That would be my guess as well.
 
Last edited:
Partially correct. Z offsets DID exist at the time. The real reason is that I wanted to have more than 4095 units of breathing room for setting the object heights - because more so than other objects, the NiGHTS items will most certainly be placed in the air in the first place. I thought sacrificing Easy/Med/Hard/etc settings was definitely worth the tradeoff, as well as making it easier to place the objects at the height you want without doing the bit shift math.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top