[Rejected][SUGGESTION] New tool: "Inverter"

Started by Crane, January 03, 2018, 09:38:55 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Crane

So I confess this is partially based off the old "Cheapo Copycat" mechanics, but I would like to propose a new tool that, if used on a lemming, causes him to flip upside-down and be pulled towards the ceiling (or the right way up again if the lemming was already upside-down).

When upside-down, all subsequent tools perform as expected, but with the up and down directions flipped, so using a Miner will cause the lemming to move towards the top of the level, for example.

When used, the lemming will likely fall in his new direction, and might splat if not careful.

Nuances:

  • The lemming inverts about his feet. This ensures the lemming doesn't become stuck in the terrain upon inversion
  • A lemming walking on the ceiling can have all skills assigned to it as normal - this includes the Cloner, which will create another lemming walking upside-down, and the Inverter itself which will switch the lemming back to the floor
  • Can be used on a lemming currently performing a task, which may cause their vertical direction to change in the case of Builders, for example, but will likely cause them to stop if their feet are in open air after inversion
  • If used on a Swimmer, the lemming will (normally) fall out of the water
  • Can be used on a Blocker, but will remain a Blocker if his feet is on terrain after inversion (which will happen if the Blocker is inside a tunnel that's only a pixel tall)
  • If used on a Climber, the lemming will invert but continue to climb the wall he's climbing (albeit in the other direction)
  • Splat distance is NOT reset if used on a Faller
  • An inverted lemming interacts with obstructions and objects as normal
  • Cannot be used on an Ohnoer (Bomber), Exiter, Flipper, Splatter, Frier/Vaporizer, Drowner or Stoner, or a lemming dying to a custom trap (because the lemming object no longer exists).
  • The Inverter is not a permanent ability - if used on a Walker, the lemming afterwards will remain a Walker, just with gravity switched

The icon, I suggest, should be of a Lemming that is facing right but falling forwards, with an up arrow to his upper left, and a down arrow to his lower right.

How's it sound?

Colorful Arty

That's the idea I had for anti-gravity lemmings! This skill will be included in my Tech Mechs project at the very least!
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0


Crane

Here's a concept image for the icon that I quickly put together. It could probably use some improvement, but you get the idea.

Crane

Here's a second attempt, although I'm worried it looks maybe a bit too comical! :P :lix-tongue:

namida

The problem with that, at least last time I was involved, is that this would be a nightmare to implement. (If antigravity was implemented anyway, implementing such a skill alongside it would be very easy, though.)
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)

Crane

Hmmm, I take it that it isn't as simple as inverting the y-axis or subtracting instead of adding vertical coordinates or whatnot... granted each individual lemming would need a Boolean flag that dictates if they're inverted or not.

mobius

even from my tiny knowledge of coding I can see how difficult this is while simple in principal. Unless there's some magical "reverse" or "mirror" function which can be created... basically every code relating to lemmings movement must be duplicated and mirrored. All the skills (assuming skills can be assigned to upside down lemmings; which I would strongly urge they could else what's the point?) must be adjusted to.

That being said; Essman obviously did it; why not contact him about it? :P

[getting off topic]
IMO I'd prefer upside down gravity to be implemented in some object form instead of in a skill assignable. But this is mainly due to my experience with Lemmings Revolution.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Crane

Well, I wouldn't say duplicated, but every line of code that controls vertical movement would need to be replaced with a conditional branch (e.g. changing "Inc(Y);" to "if bInverted then Dec(Y) else Inc(Y);", or having a "DeltaY" value that's added to the coordinates but which is negated upon inversion etc). And yes, I propose all skills be assignable to inverted lemmings (I'll adjust my first post).

As namida said though... if antigravity were implemented, then an assignable tool would be an easy enough addition. Having an interactive object that changes gravity (Cheapo Copycat had 4 types... "always animated: set lemming to ceiling", "always animated: set lemming to floor", "animate on activation: set all lemmings to ceiling", "animate on activation: set all lemmings to floor") would depend on the tileset and what puzzle is desired. The difference between the tool and an interactive object is that the tool would toggle the lemming's orientation rather than explicitly setting it to the ceiling or the floor, so has a bit more flexibility and puzzle application.

Colorful Arty

The code to implement it should be time consuming, but relatively simple, unless the code was written poorly. Essentially, the lemming class would need an attribute called isInverted which is False if the lemming is normal and True if the lemming is upside down. The code for movement and skill usage would then check the isInverted flag and execute the appropriate code. That's how I'm planning on coding it anyways.
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

namida

Better suggestion: The lemming's orientation is stored in an integer, 1 for normal, -1 for upside down. Any vertical movement distances can then simply be multiplied by these values. This is a bit more efficent. It's also already what NeoLemmix does for distinguishing left-facing from right-facing.

Some more abstract concerns might exist: For example, should an updraft just have the normal effect on an upside down lemming? If not, should an upside down updraft have the normal effect - and if so, should an upside down updraft also have no effect on regular lemmings.
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)

Colorful Arty

From a realistic standpoint, the updraft should speed up an inverted faller making them splat when they pass it. From a gameplay standpoint, I would make updrafts slow down any faller for simplicity's sake.
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Simon

#12
Quote from: Colorful Artycode for movement and skill usage would then check the isInverted flag

Quote from: namida on January 04, 2018, 03:43:16 AM
1 for normal, -1 for upside down. Any vertical movement distances can then simply be multiplied by these values.
It's also already what NeoLemmix does for distinguishing left-facing from right-facing.

This check/multiplication should happen in a Lemming method that the skills then call, not at every call site.

In the skill code, you really want to describe the skills in terms of "in front of" and "beneath the foot" and never explicitly mention the directional state.

-- Simon

Nepster

Quote from: namida on January 04, 2018, 03:43:16 AM
Better suggestion: The lemming's orientation is stored in an integer, 1 for normal, -1 for upside down. Any vertical movement distances can then simply be multiplied by these values. This is a bit more efficent. It's also already what NeoLemmix does for distinguishing left-facing from right-facing.
Quote from: Colorful Arty on January 04, 2018, 03:40:03 AM
The code to implement it should be time consuming, but relatively simple [...]
Yes, this namida's suggestion would be the simplest way to implement it. But as Arty said, it will be extremely time consuming: I would have to read thousands of lines of code and adapt all occurances of the y-coordinate. This applies not only to the actual skill code, but also to rendering-related code parts like the skill blueprints. In addition to that, I would have to test all skills in all terrain situations, in order to make sure I didn't forget one of them.
Upshot is: Not the intellectual difficulty is the problem, but the amount of time required to implement it. Btw. this is basically the roadblock for almost all features on my to-do list: I know how to code them, just writing it down takes soooooo long.

Quote from: Simon on January 04, 2018, 04:03:54 AM
This check/multiplication should happen in a Lemming method that the skills then call, not at every call site.

In the skill code, you really want to describe the skills in terms of "in front of" and "beneath the foot" and never explicitly mention the directional state.
I disagree here: You only want that in code that you write completely anew. In existing code like for NeoLemmix that uses a different structure and had already dozens of bug-fixes over the past few years, you certainly want to keep the existing structure and only modify it in the least possible way. Everything else just produced tons of bugs that had already been fixed in the past.

Crane

For the updraft thing... the simplest solution would be that it affects lemmings in both directions, although that might be a little weird from a visual and realism perspective.

Personally, I'd say that if the lemming is inverted, the updraft either has no effect or increases the fall counter to splat distance (possibly accelerating them while they're inside the trigger region, although I'm not sure how badly this will affect Gliders).  At the same time, if the updraft object itself is inverted, so it's effectively a downdraft, inverted lemmings are slowed while normal lemmings are accelerated.  That's even more work though and it depends on if namida feels like any of this is worth implementing.