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

[ADDED] Crushing Ceiling discussion before I submit it

Recommended Posts

I'm going to expose the parameterized ZDoom-compatible crushing ceilings specials in Eternity. However, before anyone uses them, I'd like to talk about them here first, so hopefully all people interested will know and maybe remark on them.

The specials are:

Ceiling_CrushAndRaise
Ceiling_CrushStop
Ceiling_CrushRaiseAndStay
Ceiling_LowerAndCrush
Ceiling_LowerAndCrushDist
Ceiling_CrushAndRaiseDist
Ceiling_CrushRaiseAndStayA
Ceiling_CrushAndRaiseA
Ceiling_CrushAndRaiseSilentA
Ceiling_CrushAndRaiseSilentDist
Ceiling_CrushRaiseAndStaySilA
Generic_Crusher

DIFFERENCES FROM ZDOOM

This is important for the ZDoom developers when they want to run Eternity maps in ZDoom.

1. Ceiling_CrushAndRaise, Ceiling_CrushRaiseAndStay, Ceiling_LowerAndCrush, Ceiling_CrushRaiseAndStayA, Ceiling_CrushAndRaiseA, Ceiling_CrushAndRaiseSilentA, Ceiling_CrushRaiseAndStaySilA

- There will be an 8-unit gap, unlike ZDoom which leaves no gap (though it's in the process of being fixed even in ZDoom)
- Under Doom crush mode, if the speed is exactly 8, the crusher will slow down (these specials don't slow down in ZDoom, except for the "Dist" specials which act exactly like this)

2. The silent crushers (except Generic_Crusher)

- they will make clunk noises on each hit, just like the classic Doom crushers.

3. Generic_Crusher

- This is heavily unlike ZDoom, and more like the Boom generalized crushers, with the added ability to set the lowering and rising speed separately. Basically this means two things:
-- if silent, they will make no sound at all (not even clunking)
-- if speed is anything less than 24, they WILL slow down. This is different from other crushers set to Doom mode, which slow down when speed is exactly 8.
In ZDoom, Generic_Crusher is redundant when you have Ceiling_CrushAndRaiseA and Ceiling_CrushAndRaiseSilentA.

BTW, I didn't put Generic_Crusher2 here yet, but I may add it later if I want ZDoom compatibility.

Share this post


Link to post
printz said:

I'm going to expose the parameterized ZDoom-compatible crushing ceilings specials in Eternity. However, before anyone uses them, I'd like to talk about them here first, so hopefully all people interested will know and maybe remark on them.

The specials are:

Ceiling_CrushAndRaise
Ceiling_CrushStop
Ceiling_CrushRaiseAndStay
Ceiling_LowerAndCrush
Ceiling_LowerAndCrushDist
Ceiling_CrushAndRaiseDist
Ceiling_CrushRaiseAndStayA
Ceiling_CrushAndRaiseA
Ceiling_CrushAndRaiseSilentA
Ceiling_CrushAndRaiseSilentDist
Ceiling_CrushRaiseAndStaySilA
Generic_Crusher

DIFFERENCES FROM ZDOOM

This is important for the ZDoom developers when they want to run Eternity maps in ZDoom.

1. Ceiling_CrushAndRaise, Ceiling_CrushRaiseAndStay, Ceiling_LowerAndCrush, Ceiling_CrushRaiseAndStayA, Ceiling_CrushAndRaiseA, Ceiling_CrushAndRaiseSilentA, Ceiling_CrushRaiseAndStaySilA

- There will be an 8-unit gap, unlike ZDoom which leaves no gap (though it's in the process of being fixed even in ZDoom)


Since this was considered a bug, no need to point it out. The current devbuilds already work like this.

- Under Doom crush mode, if the speed is exactly 8, the crusher will slow down (these specials don't slow down in ZDoom, except for the "Dist" specials which act exactly like this)


Can't you tie this to an additional bit to be set in the crushmode field? Then I could see that both engines work the same.

2. The silent crushers (except Generic_Crusher)

- they will make clunk noises on each hit, just like the classic Doom crushers.


In what way does ZDoom differ from that?

3. Generic_Crusher

- This is heavily unlike ZDoom, and more like the Boom generalized crushers, with the added ability to set the lowering and rising speed separately. Basically this means two things...:


If you choose to do it differently, I'd like to ask you to use a different special number for it. There's really no need to create a deliberate incompatibility here.
I agree that Generic_Crusher as implemented is mostly pointless, but what's done is done. No need to discuss the merits of the feature sets, I mostly agree with you here.

And since you say this is more like Boom's crushers, here's the important question. ZDoom maps them to Generic_Crusher, so do they actually behave differently there? If yes, we might need the different special anyway.

BTW, I didn't put Generic_Crusher2 here yet, but I may add it later if I want ZDoom compatibility.


If you got Hexen's crushing mode implemented, this should be a one-line as it's the same as Generic_Crusher with Hexen's crushing mode.

Share this post


Link to post
Graf Zahl said:

Can't you tie this to an additional bit to be set in the crushmode field? Then I could see that both engines work the same.

Problem is that Ceiling_CrushAndRaiseDist already has this behavior, while Ceiling_CrushAndRaiseA doesn't, and needs that extra bit you're talking about. Crush modes will get different meanings between specials.

In what way does ZDoom differ from that?

If ZDoom also makes sounds, then ignore this. I mostly mentioned that to emphasize the difference from Boom's generalized silent crushers.

And since you say this is more like Boom's crushers, here's the important question. ZDoom maps them to Generic_Crusher, so do they actually behave differently there? If yes, we might need the different special anyway.

So if it's discovered that ZDoom's Generic_Crusher needs fixing to be like Boom, does it mean that there'll be no need for another special? I'm reluctant to add a new Hexen/ACS-namespace number that's more than 255, because I'm not sure that Eternity's current ACS implementation supports specials larger than one byte (never tried).

Share this post


Link to post
printz said:

Problem is that Ceiling_CrushAndRaiseDist already has this behavior, while Ceiling_CrushAndRaiseA doesn't, and needs that extra bit you're talking about. Crush modes will get different meanings between specials.

0: keep default behavior
4: always use CrushAndRaiseDist behavior
8: always use CrushAndRaiseA behavior

combine with Doom/Hexen modes like a bitfield, so you could have 5, 10, etc.

Share this post


Link to post
printz said:

So if it's discovered that ZDoom's Generic_Crusher needs fixing to be like Boom, does it mean that there'll be no need for another special? I'm reluctant to add a new Hexen/ACS-namespace number that's more than 255, because I'm not sure that Eternity's current ACS implementation supports specials larger than one byte (never tried).


Actually there is no need for change, I believe. ZDoom already passes a value for 'completely silent' when Generic_Crusher is called with 'silent' set.

I'll look into the slowing down with speed < 24. I assume that's what Boom did, didn't it?




For specials >= 256, you need to implement two new instructions for ACS:

381: PCD_LSPEC5EX,
382: PCD_LSPEC5EXRESULT,

They are the same as the existing PCD_LSPEC5 and PCD_LSPEC5RESULT with the sole exception that there is not just one byte but one 16 bit word following the command which contains the special number.

Share this post


Link to post

A crush I was looking for was silent lower and crush stay option, but I can't find one.

Share this post


Link to post

I think you can do that indirectly with placing a sound sequence thing in the sector that assigns a silent sound sequence. AFAIK Eternity also implements that.

There's also a sector flag to silence any sound being made by sector movement.

Share this post


Link to post
Graf Zahl said:

I'll look into the slowing down with speed < 24. I assume that's what Boom did, didn't it?

Yes, if oldspeed is < 3*FRACUNIT, then slowdown to FRACUNIT/8.

Share this post


Link to post
Gez said:

0: keep default behavior
4: always use CrushAndRaiseDist behavior
8: always use CrushAndRaiseA behavior

combine with Doom/Hexen modes like a bitfield, so you could have 5, 10, etc.

This raises more questions. How about a flag that makes the crusher slow down on things, regardless of the speed parameter? And, if still possible, have another parameter that says the crushing speed?

Share this post


Link to post
printz said:

And, if still possible, have another parameter that says the crushing speed?



I think the problem with this would be that there's not enough parameters.

Seriously, though. This really suffers from the 5 parameter limitation.
Would be nice to have just one special like:

Ceiling_Crush(tag, type, downspeed, upspeed, crushspeed, damage, silent, mode),

wouldn't it...?

(Actually the only thing preventing such a change is Hexen map format compatibility - but why not be bold and break that ridiculous limitation for UDMF, ACS and Extradata?)

Share this post


Link to post

Correct. So as I see it, for ZDoom the only actual problem is that the slowing down for Generic_Crusher does not happen, isn't it?

I'll see to fix that.

Share this post


Link to post
Gez said:

0: keep default behavior
4: always use CrushAndRaiseDist behavior
8: always use CrushAndRaiseA behavior

combine with Doom/Hexen modes like a bitfield, so you could have 5, 10, etc.

How about this:

0: compatibility Doom or Hexen mode (same as before, depends on special and maybe speed).
1: Doom mode (same as before and like ZDoom in all cases)
2: Hexen mode (rest while crushing)
3: Doom-like AND slow down to 1 when crushing (regardless of special or speed)

Yeah I know this will leave Ceiling_CrushAndRaiseDist as the odd one out where Doom-mode speed 8 ALWAYS results in slowdown, but authors can just choose something like 7 or 9 instead in that case.

Share this post


Link to post
printz said:

How about this:

0: compatibility Doom or Hexen mode (same as before, depends on special and maybe speed).
1: Doom mode (same as before and like ZDoom in all cases)
2: Hexen mode (rest while crushing)
3: Doom-like AND slow down to 1 when crushing (regardless of special or speed)

Yeah I know this will leave Ceiling_CrushAndRaiseDist as the odd one out where Doom-mode speed 8 ALWAYS results in slowdown, but authors can just choose something like 7 or 9 instead in that case.


How about this:

- Types 1, 2 and 3 behave consistently.
- Type 0 will always be the compatibility fallback, i.e. for Doom Ceiling_CrushAndRaiseDist will default to 3, not to 1 like for the others.

Share this post


Link to post
Graf Zahl said:

How about this:

- Types 1, 2 and 3 behave consistently.
- Type 0 will always be the compatibility fallback, i.e. for Doom Ceiling_CrushAndRaiseDist will default to 3, not to 1 like for the others.

Yeah but this means that types 1 and 3 will be identical except when the speed argument is set to 8.

Share this post


Link to post

Why is that?

What I mean is:

1 never slows down when crushing
3 always slows down when crushing
0 only slows down with this one (actually two, I believe) special and this one speed.

Then 1 and 3 are 100% defined and we only have a single exception for historic purposes, and only in the compatibility setting.

You'd just have to add a single exception condition at the beginning of the handler for Ceiling_CrushAndRaiseDist (and Ceiling_CrushAndRaise), where you decide which crushing mode 0 should turn into and nowhere inside the ceiling thinker make any distinctions. There the crushing mode should be absolute and completely define the behavior.

Share this post


Link to post

Yeah, this is how I thought it. (EDIT: I'm gonna implement this in Eternity)

Internally, I'm modifying CeilingThinker to have these parameters, only for crushers: downspeed, upspeed, crushspeed (basic ceilings don't use them). If crushspeed is 0, then it will act like a Hexen crusher (will stop on hitting targets and resume when area is cleared). And for no slowdown, crushspeed must be = downspeed.

Share this post


Link to post

I did some checking on the slowdown. In ZDoom it is the following specials that do it:

Ceiling_LowerAndCrush
Ceiling_LowerAndCrushDist
Ceiling_CrushAndRaise
Ceiling_CrushAndRaiseA
Ceiling_CrushAndRaiseDist
Ceiling_CrushAndRaiseSilentA
Ceiling_CrushAndRaiseSilentDist

It actually depends on the movement type. Those which go down and stay down and those which move perpetually all have this behavior, but only if the speed is set to 8.

I'm going to change so that this behavior is preserved with crushing mode 0 only.
If crushing mode is 1 none will slow down and if crushing mode is 3 all will slow down.

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  
×