[BUG] Miner continues mining after walking down a slope

Started by namida, October 07, 2023, 08:52:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

namida

If a miner mines into a 45 degree slope (going downwards from the miner's point of view), the miner should stop if during his walking phase, he walks down the slope. This does not happen; he keeps mining once he reaches the next block edge.

EDIT: Confirmed this happens for bashers too... although I do need to double check if that actually happens in DOS L3D. With that being said, it kinda feels like something I should fix either way.

EDIT: I have now confirmed this does happen in DOS L3D. I still feel like it should be fixed though; especially for miners (bashers are a bit more ambiguous; we allow them to move down slopes and continue bashing in 2D, but a miner must always follow his tunnel exactly; on the other hand, the exact workings in 3D differ in other ways too, in particular the use of a walker state between the equivalent of strokes).

EDIT: A video to show what I'm meaning: https://youtu.be/lXd7yrJZz0s
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

Hard to decide. Basher lowering has precedence (most L1-style games), miner lowering has no precedence. My gut feeling, too, is that we don't want the basher's nor the miner's lowering.

Nice example level that captures both behaviors!

What happens if you place builder slabs in the basher's/miner's path? Place the slabs after he has cleared the block, when he's beginning to walk in the space, before he will reach the slabs.

Less related: What happens if you assign turner/blocker to another lemming in the basher's/miner's path?

-- Simon

namida

QuoteLess related: What happens if you assign turner/blocker to another lemming in the basher's/miner's path?
This one is already handled; the skill will be cancelled.
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

Hmm, my gut feeling is: If bashing/mining continues after lowering, then bashing/mining should also continue after getting turned/blocked.

I imagine it's hard to drop a turner/blocker into the path. Assuming we allow bashers/miners to continue after turning/blocking: { It's hard to assess backroute potential from allowing this. This trick is hard to accomplish, you'll have to drop the lemming (to which you assign turner) from above into place, near the middle or far end of the horizontal block. And terrain in Clockwork's L3D maps was hardly suitable for useful around-the-corner bashing. Corkscrew Mining comes to mind, but you can't drop lemmings into the path from above. }

How strongly do you feel about cancelling bashing/mining on hitting a blocker/turner? If you feel strongly about it, I'd also cancel on lowering, and I'd probably also cancel on stepping on builder slabs.

-- Simon

namida

Commit f5a497b adjusts this so that bashers and miners both cancel in this situation.

Where there is a step (rather than a slope), the basher / miner still continues. A miner needs to do so in the case there is a step immediately in front of him - that's how the miner works. Any extra steps (such as builder bricks, or if the slab he's on but not the one below it gets destroyed) should also cancel him. The basher should always be cancelled in this case. That's consistent with slopes, I think.
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

All right, by slab, we mean 1/4 of a 3D cube. Each basher swing affects 2 slabs. I won't call the builder bricks slabs then, for clarity.

Then your f5a497b sounds good, until:

QuoteThe basher should always be cancelled in this case.

In what case? I assume it's extra steps from a builder or more downstepping than the one allowed free downstep per horizontal block of forward basher walking. Or what do you mean with "always" for the basher?

Quote from: namida on October 08, 2023, 08:51:52 PM
Where there is a step (rather than a slope), the basher [...] continues.

This sounds like: Basher lowering by 1 slab per horizontal cube allows the basher to continue.

In particular, does the basher clear the A slabs here, then fall into the hole C, then clear the B slabs?

            +-----------+
            |:::::A:::::|
            +-----------+-----------+
  Bash ->   |:::::A:::::|:::::B:::::|
+-----------+-----------+-----------+
|:::::::::::|     C     |:::::B:::::|
+-----------+-----------+-----------+
|:::::::::::|:::::::::::|:::::::::::|
+-----------+-----------+-----------+


I'll have to sleep over this lowering.

In your f5a497b, is your basher's choice (of cancelling or continuing) consistent across all of the following 4 cases?

1. C is a hole (a completely empty slab) as in my diagram in this post.

2. C is a downslope at the earliest quarter step, i.e.,

+
|\
+-+


3. C is a downslope at the latest quarter step, i.e.,

+---------+
|::::::::::\
+-----------+


4. C is a full slab of earth, but, while our basher is walking across C, a 90-degree-crossing second basher removes C (and removes no other pictured slab than C).

-- Simon

namida

Not yet as of f5a497b. 1 and 4 are consistent (continues), as are 2 and 3 (stops). Encountering a turner / blocker also stops.

As of adf2529 these are all consistent and result in the skill stopping. The only exception is if the skill is newly assigned (ie: the basher / miner has been given the skill, but not yet arrived at a position where he starts actually bashing or mining).
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

Further testing has uncovered that builders still sometimes don't cancel when they should. I haven't found any issues with destructive skills.
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

Fixed for builders in commit 75e7ac6, meaning this bug (as far as I can tell) is fixed in all its forms now.
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

Quote from: namida on October 12, 2023, 06:39:36 AM
As of adf2529 these are all consistent and result in the skill stopping. The only exception is if the skill is newly assigned (ie: the basher / miner has been given the skill, but not yet arrived at a position where he starts actually bashing or mining).

Sounds great! Thanks for looking into all these cases.

-- Simon