Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Kyka

Object height in ZDoom

Recommended Posts

http://img258.imageshack.us/my.php?image=lowobjectbb5.png

As you can see from the picture, the hanging dude is sitting well below the shower from which he is strung.The port is Zdoom, and this level is intended for Zdoom (though it will wind up being Boom compatible).

I think I recall reading on a thread somewhere that this is caused by the way the sprites are rendered on gl ports, and not with software rendering.

Question is simple. Is there an easy way to fix this? Unless I am mistaken, objects hang from the lowest ceiling that is within their defined area "box", even if that ceiling is off centre, so I probably cant get away with putting a new sector with a raised ceiling in the middle of the shower head.

Share this post


Link to post

Thanks CodeImp, but no, it is a mere Boom level. Should probably have mentioned that.

The funny thing is the objects sit at exactly the right heights when in the 3D viewer in Doombuilder.

Share this post


Link to post

I think this could be a sprite offset issue. In the past when I have been setting up my own sprites for things that hang on the ceiling in Zdoom, their Y offset has to be the same as the actor height to make them attach to the ceiling properly.

The old Doom hanging bodies generally come pretty close to this "formula" (usually just a unit away IIRC) but the Doom2 ones tend to have Y offsets of about 5 units less than their height which would mean they haven't been "pushed up" enough for them to align to the ceiling in Zdoom.

So the actor isn't hanging lower than the ceiling in your pic, but the sprite Y offset, and the way it is handled, makes it look that way.

Share this post


Link to post

So it is the sprite and not the actor itself? I see.

I had a play around with it at any rate, and it seems that the height of hanging sprites is determined by the height of the ceiling at the centre of the sprite's x and y coordinates (from a top down perspective) rather than, as I had assumed, determined by the lowest ceiling height that happened to fall within the sprites' "box."

So a small, raised "hole" in the middle of the shower seemed to fix the problem.

Thanks for the replies.

Share this post


Link to post

You could also put a self referencing sector with a higher ceiling where the thing is hanging. It would look cleaner, probably.

Share this post


Link to post
Spleen said:

You could also put a self referencing sector with a higher ceiling where the thing is hanging. It would look cleaner, probably.


Now this is a good idea. Wouldn't have occurred to me to use a self referencing sector in this context. Thank you.

Share this post


Link to post

Alternatively, you could add the sprite to your wad and fix the offsets there. Since that sprite only has a single frame, it wouldn't cause too much trouble. Have you tried playing this in other ports though? What's the behavior there?

Share this post


Link to post
EarthQuake said:

Alternatively, you could add the sprite to your wad and fix the offsets there. Since that sprite only has a single frame, it wouldn't cause too much trouble.


I agree that this would be an easy thing to do... for someone who knows anything about doing things like this. :P Everything I know about stuff like this, I know from these forums... but in reality, I have never actually done any of it. I only know how to map.

Have you tried playing this in other ports though? What's the behavior there?


Just got off trying the map in PRBoom, and the sprite sits (as far as I can tell) at exactly the same height as in the ZDoom screenie I posted above.

Share this post


Link to post

Open doom2.wad in XWE (obviously taking care not to modify it), and look at the sprite in question. You'll see it has an X and Y offset at the top of the viewer. You can't use a patch wad to directly change these offsets, but you can reinclude the sprite in your wad and use the same offsets, but just bumping the Y offset a little. Remember the position of the sprite in doom2.wad, and use the same offsets for the sprite in your wad. Then try adjusting the Y until it's flush with the ceiling.

Share this post


Link to post

So the offsets are used in the rendering of sprites? That's good to know. I heard that the offsets were completely ignored in the rendering of patches so I thought that was true for all graphic lumps.

Kyka said:

I agree that this would be an easy thing to do... for someone who knows anything about doing things like this.


XWE actually doesn't take that long to get used to. Wad editing doesn't involve crawling through the wad file with a hex editor anymore.

Share this post


Link to post

Yeah... I will learn how to do scripting and modding, but I promised myself I would finish this mapset before I embarked on what is (at least for me) an entirely new learning curve.

Thanks for the explanations and the encouragement. I will get there.

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
×