Author Topic: [SUG][PHYSICS] Allow lems to jump and shimmy-reach through platforms  (Read 438 times)

0 Members and 1 Guest are viewing this topic.

Online WillLem

  • Moderator
  • Posts: 3567
  • Unity isn't sameness, it's togetherness
    • View Profile
In this situation, a Ballooner will continue to ascend until their foot reaches the top of the platform, at which point the balloon will pop and the lem will begin walking:



This feel right: the lem can walk "through" the platform to begin with, and so should only ever care about it when it's at their foot position. Shimmiers can also similarly ascend through a 1px platform if it's close enough to their starting position:


The lem lands on top of the platform at the end of the reaching action ^^^

My honest thoughts here are that we should allow Jumpers to access the top of a platform in a similar way. As long as the top of the platform is below the lemming's head at the start of the jump, they should be able to access it by jumping. So, for instance:


This should be allowed ^^^


Current Jumper checks should apply here ^^^

The same should then apply to the "reaching" Shimmier: if the lemming's head is above the top of the platform, they should be able to ascend past the platform to land on the top.

We're then asking: does the lem have overhead terrain at any point during the skill action? If so, cancel the action at the point their head meets the terrain (Jumpers fall, Reachers begin to shimmy). If not, allow the skill action to continue until their foot position meets the top of the terrain.

Just riffing here. We can of course keep the Ballooner as-is and not do anything with the other skills, but this seems good for consistency.
« Last Edit: June 28, 2024, 04:38:39 PM by WillLem »

Online WillLem

  • Moderator
  • Posts: 3567
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SUG][PHYSICS] Allow lems to jump and shimmy-reach through platforms
« Reply #1 on: June 27, 2024, 11:34:32 PM »
Coming back to this later, perhaps the check should be "at any point, does the lem have terrain at their X/Y and not at their X/Y-1? If so, begin walking". So, the terrain check would interrupt the Jumper arc/Reacher ascent sooner, but this would be easier to code and would feel more like what's already happening with the Ballooner.

So, this:


^^^ Left: Jumper arc is interrupted when terrain is found at the foot position. Right: same with the Shimmier's Reacher state. Note that in neither case is there terrain overhead which would cause the Jumper to fall or the Reacher to begin Shimmying

Online WillLem

  • Moderator
  • Posts: 3567
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SUG][PHYSICS] Allow lems to jump and shimmy-reach through platforms
« Reply #2 on: June 28, 2024, 04:33:55 PM »
Coming back to this later, perhaps the check should be "at any point, does the lem have terrain at their X/Y and not at their X/Y-1? If so, begin walking". So, the terrain check would interrupt the Jumper arc/Reacher ascent sooner, but this would be easier to code and would feel more like what's already happening with the Ballooner.

This is, in fact, not easier to code! I've just about implemented it for both and the effect is somewhat odd. It's better if the distance is further, but doesn't look right for shorter distances; the lemming 'pops' upwards with seemingly no movement:


^^^ Shimmier left, Jumper right

I'll try without interrupting the Jump/Reach state and see if that's better.

Online WillLem

  • Moderator
  • Posts: 3567
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SUG][PHYSICS] Allow lems to jump and shimmy-reach through platforms
« Reply #3 on: June 29, 2024, 01:41:09 AM »
OK, this is miles better:



NOTE: This will only happen if the topmost pixel is below the lem's original head height; otherwise, usual checks apply.

I've gone ahead and implemented this change (commits 9ed195ffe and 3fef08fe0) so we can give it a try and see if we like it.

Thoughts?
« Last Edit: June 29, 2024, 12:52:12 PM by WillLem »

Offline jkapp76

  • Posts: 393
    • View Profile
Re: [SUG][PHYSICS] Allow lems to jump and shimmy-reach through platforms
« Reply #4 on: June 29, 2024, 02:24:37 AM »
I like everything. Can't wait to try it out.
...Jeremy Kapp

Online WillLem

  • Moderator
  • Posts: 3567
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SUG][PHYSICS] Allow lems to jump and shimmy-reach through platforms
« Reply #5 on: July 01, 2024, 12:20:19 AM »
I like everything. Can't wait to try it out.

Glad to have your support for this jkapp76, thanks for posting :thumbsup:

Still looking for opinions on this either way if anyone wants to chip in now. I'll most likely do an RC for 2.8 because lots of stuff has changed/updated, so there will be opportunities to try the behaviour out before it's considered "stable".