[DISC][PLAYER] Termination of the laserer, especially WRT blockers / cloners

Started by namida, December 06, 2020, 06:22:34 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

namida

In order for this topic to make much sense, you first need to understand the following about laserer physics:
- The laserer has a time limit, of 85 frames (5 game clock seconds)
- If the laserer hits steel, a wrong-way OWW, or empty space (due to leaving level boundaries or reaching max range), the remaining time is reduced to approximately 10 frames (unless already lower)
- This remaining time, including the "reduce to about 10", is copied to a clone, and is kept when turning around, even if the clone / turned laserer is now hitting something useful
- There is no way in which the impact point is tracked. The impact point is calculated from scratch every frame, so that it behaves like a realistic laser in terms of eg. if new terrain is introduced in its path.

The questions that arise here are:
a) Should this behaviour be kept as is, or should it change to "instantly stop when laser is no longer useful"?
b) If this behaviour is kept, should the specifics of it remain as-is, or should the 10-ish frames cutoff be cancelled (returning to the overall remaining time out of the 85 frames) if the laser later becomes useful again (due to terrain placed in the way, or a new Blocker / a Cloner turning the laserer around, etc)?

In case a decision is made to abolish the time limit on the Laserer altogether, this does not automatically mean the 10ish frame cutoff has to be abolished, but the question still remains of if it gets cancelled if the laser becomes useful again.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

IchoTolot

QuoteIn case a decision is made to abolish the time limit on the Laserer altogether, this does not automatically mean the 10ish frame cutoff has to be abolished, but the question still remains of if it gets cancelled if the laser becomes useful again.

For my suggestions I have the condition that the time limit is abolished and we have a range limit with the extra condition "stop when laser is no longer useful" - no longer useful: he hits the level edge/OWW/pure steel before reaching max range

a) "instantly stop when laser is no longer useful" - Easy and clear.

b) Even if the remaining time rule is kept I think having extra checks when it becomes useful again just makes this way more complicated as it needs to be. Again this extra rule set is a big reason why we should simply use a max range instead of weird time frames! :8():   -> Cloners for example just carry out as many pixels as the original laserer has left at the point of cloning.

namida

Quotewith the extra condition "stop when laser is no longer useful"

This is already a condition, albeit that there's a small delay before it actually cuts off the laser.

QuoteCloners for example just carry out as many pixels as the original laserer has left at the point of cloning.

A laserer does not have any concept of "how many pixels are left"; see this point from the first post:
Quote- There is no way in which the impact point is tracked. The impact point is calculated from scratch every frame, so that it behaves like a realistic laser in terms of eg. if new terrain is introduced in its path.
Instead, termination would need to be determined based on either (a) a time limit, (b) "is the laser doing anything useful?", or (c) a combination of the above. The maximum range is simply the furthest distance the laser would check (and if it has not hit anything by this distance, it ends in midair, and is considered to be "not useful").
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

What is the design history of the time limit?

The gut reaction is to ignore the original time limit. The cloner should decide by his own feeling when to stop.

a) Feels weird even though it avoids bugs. A meaningless basher will also bash the air once. I would look for something else than immediate termination.

b) Yes, you can reword the time limit into related rules, such as (When nothing useful has been lasered for 10 frames, stop.). The cloner's (most recent frame of lasering something useful) can be initialized with the time of cloning.




You can abolish the time limit and implement a range limit. That's why I've asked about the design history of the time limit. The range limit seems simpler, I assume you have a reason for trying something else first.

State is a potential source of bugs and oddities. Max range reduces the mutable state (timer, timestamp) and replaces it with a functional check.




Were I to design this: I'm biased from L2 where I don't see much negative with L2 laserer stopping rules. I would have a max range that doesn't stop the skill, and have the skill stop N frames after doing something useful.

-- Simon

namida

One thing I have given strong consideration to with the physics is "what happens if new terrain gets added in the laser's path". The other thing is that it's currently been approached from the mindset that the laser's range should be, for all intents and purposes, infinite (while having a limit on a technical level just in case we get Wrap in the future, to avoid a situation where the laser never hits any terrain).

As such - the laser performs an independent check on each frame. "If I were to fire a laser from (point slightly offset from lemming's foot, to fit the graphic) at a 1:1 angle, right now, where would it hit?" Then destruction occurs around the impact point.

The length limit is, as mentioned, only there to avoid potential infinite recursion situations. In all realistic situations (especially if Wrap never comes), the laser will reach the level boundary or some terrain it cannot destroy before it reaches this limit.

The time limit is meant to be the actual cap on the laser. The behaviour of "reduce remaining time when laser is no longer useful" looks nicer than instant stop; and perhaps adds some usefulness to the laserer as a delay skill.




I am certianly open to "if nothing useful has been hit for 10 frames, stop", which could be with or without a (in practice) length limit. The question of whether a cloner copies the source lemming's duration of this timer would still be open, though - my gut feeling is "yes", though of course the timer could very well reset on the next frame if the cloner hits something useful. Though this does raise another question actually: Must it be 10 consecutive frames, or just a total of 10 frames over the lifetime of the laserer? I prefer 10 consecutive frames, this is easier for the player to make sense of in complex situations.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

Thanks.

Right, the infinite length. Infinite length is interesting and you want it to not choke on the potential wrapping feature. I haven't considered this enough. I will sleep more over this.

It's conceivable to have both infinite length and infinite time, and stop only when there has been nothing to destroy for N frames.

-- Simon

namida

QuoteIt's conceivable to have both infinite length and infinite time, and stop only when there has been nothing to destroy for N frames.

But only without wrap, at least in the current "like an IRL laser beam" implementation of detecting where it hits. (When wrap is not in effect, if all else fails, the beam will eventually exit the level's boundaries.)
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

Okay, so on Discord, I just came up with a much better way to explain current behaviour:

Quotethe laserer, as it currently stands, should be thought of as firing 85 independent lasers (one each frame), though may stop sooner if the lasers are no longer achieving anything useful. when you see it that way, the current implementatoin makes more sense.
and each individual laser has infinite speed
(but may have a max distance)
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

Range seems to be the best way to go with this one. There ought to be a maximum range that the laser can go, regardless of what's in its path, and this is always the same no matter where the laser starts.

So, only steel, OWW and range limit terminate the laser. This is easy to understand, easy to measure, and prevents use cases that rely on knowing about "how much further a laser can go if X, Y and Z".

namida

Closing this topic now. This is more tied to range / time limit than I had been thinking, so we'll keep it in one topic from now on.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)