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

Polyobject clipping & LOS blocking finished.

Recommended Posts

Polyobjects now clip mobj_t's, tracers, explosions, and lines of sight. Interestingly, I found that in Hexen they rewrote the entirety of p_sight.c to work on a tracer-based system instead of DOOM's method of using the BSP. They probably did this because of polyobjects, but it is an undesirable change and certainly not one I even thought about following.

At any rate, I figured out how to block line of sight with polyobj lines using the BSP, although it is not perfectly accurate -- the LOS checking will actually use the subsector attachments from the previous frame rather than those where the polyobjects should currently be attached. I do not anticipate that this will be a major or possibly even at all noticeable problem.

Now all that is left is to add code that can actually move polyobjects around, and push or crush mobj_t's that get in the way.

Share this post


Link to post

Some shots of it in action:


The imp can't see me through it.


Nor can he see me even when I'm nearly unhidden, showing the accuracy is equal to that for normal lines.

Share this post


Link to post

>:D

Just wait until Mordeth gets a hold of this and re-designs all the maps in mor.... ok so maybe we could just hide this feature from him when it's complete?

Share this post


Link to post
Quasar said:

Polyobjects now clip mobj_t's, tracers, explosions, and lines of sight. Interestingly, I found that in Hexen they rewrote the entirety of p_sight.c to work on a tracer-based system instead of DOOM's method of using the BSP. They probably did this because of polyobjects, but it is an undesirable change and certainly not one I even thought about following.



Actually I doubt that. Heretic uses the exact same sight checking code so my guess would be that older Doom versions used it as well and it was later replaced due to some bugs in there which they couldn't find.

I wouldn't be surprised if it was dumped due to this problem (which btw, is also present in the generic trace code.) Unfortunately I can't run Doom.exe anymore on my system so I can't verify it but if someone can get the same problem to show on E1M3 with older versions (1.2 and below) it's a good indicator that it uses the code which is in Raven's source.

The blockmap based code is faster, btw.

Share this post


Link to post

Well that's interesting to know actually, especially that DOOM 1.2 apparently had the different visibility system. I would have assumed a BSP-based system would be faster, though I admit I haven't exactly started up a profiler ;)

At any rate, I'll be sticking with the BSP-based code.

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  
×