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

DoomLegacy gets monster friction

Recommended Posts

I have committed to DoomLegacy, sector friction and monster friction.
It also got the independent player bob momentum.
These effects were originally by Killough in MBF and prboom, and while this code is based upon his (for purposes of compatibility) some changes, fixes, and enhancements have been made.

I have literally spent months trying to eliminate the side-effects, and I think it is now mostly transparent. No, I really do not want to hear about how some other port has had this for umpteen years.

An option allows selecting monster friction (none, MBF, momentum).
With momentum, the monsters have full time momentum. This eliminates the stall when entering an icy sector and the surge when leaving one.
Monsters being trapped at dropoff edges was the major problem, so the code reduces momentum at any dropoff, and there is code to move uninhibited off a dropoff line they are stuck on.

If you want to discuss this, please try out the code first.
It could use more testers. I would prefer to tweak it now than find out about problems after it is released. This code is not in any alpha release yet, it is only in the latest DoomLegacy SVN 838 at SourceForge.

There is also a test wad in the DoomLegacy SVN repository at //common/wads/friction.wad.
It contains examples of conveyors, monsters in a variety of friction sectors, on conveyors, and on elevated sectors with dropoffs.

There are some differences from the original that may be of interest to other port developers.
- All sectors use the sector friction. No test for sector friction enabled on this sector.
- All water friction, Heretic friction, also use sector friction.
- Function to update sector friction whenever any friction flag or attribute changes.
- Generate momentum for monsters that gives movement time that is close match to original movement. Tested in friction.wad by timing the monsters along a set distance using prboom and DoomLegacy.
- Changed the search for max friction to detect all combinations of sectors properly. The original did not detect a normal sector next to an icy sector.
- Detect stuck on dropoff, and generate a move to get unstuck.
This actually works rather well.
- Reduce bob momentum a little faster than friction, so bobbing stops just before player does.
- 3dfloors have independent friction on each slab.
- Deep water has swim friction.
- Shallow water has wading friction.

For some fun, try out the oily floor room, and slide around with the imps and pinks (and barrel).

Thank You

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  
×