Skip to content

Fixed issues with moving platforms #1514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 4, 2021
Merged

Conversation

mbernard2
Copy link
Contributor

@mbernard2 mbernard2 commented Aug 19, 2020

Addresses #401 and #1389.

When an object is on top of a moving static object (e.g. platform) or a tilemap, every movement made by the static object (or tilemap) is also applied to all objects standing on top of it.

Also, easing works much better.

Here are a few examples:

  • Normal back-and-forth:
    1
  • Trampolines now work on downwards moving platforms:
    2
  • Player can stand on top of a block which itself is on top of a platform. Here's an example with unisolid tiles:
    3
  • Unisolid slopes:
    4

@weluvgoatz
Copy link
Member

Wasn't "slightly above ground" there for jump buffering?? Jump buffering is a really great feature and the game would play much much worse without it.

@mbernard2
Copy link
Contributor Author

Wasn't "slightly above ground" there for jump buffering?? Jump buffering is a really great feature and the game would play much much worse without it.

Does jump buffering have to do with being able to press "jump" while still in the air, and jump when on the ground ?

If so, I just tested it, and it still works.

@weluvgoatz
Copy link
Member

I tested it as well, and it works properly still. Thank you, just making sure :-)

The slightly_above_ground method actually never returned true, even when tested for the issue it was initially supposed to fix (and made no difference). It was probably fixed elsewhere.
* Always detect a collision with unisolid when a object is exactly next to it (e.g. standing on top of it)
* Recursively apply movement to objects stacked on top of each other
@Semphriss
Copy link
Member

Yay, finally! :D

@mbernard2
Copy link
Contributor Author

mbernard2 commented Aug 20, 2020

Don't merge yet, I found a bug that only occurs on this branch (which means it's a regression).

The bug : objects stacked on top of each other slowly move into the ground and eventually fall off the screen.

@@ -45,6 +47,11 @@ class CollisionSystem final
case (or not). */
void update();

const std::shared_ptr<CollisionGroundMovementManager>& get_ground_movement_manager()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this method can be marked const

@weluvgoatz
Copy link
Member

Any intention to still work on this? It would be nice if it was implemented, once the bug(s) were resolved at least.

@mbernard2
Copy link
Contributor Author

Yes.

@mbernard2
Copy link
Contributor Author

Almost done!

@mbernard2
Copy link
Contributor Author

mbernard2 commented Mar 4, 2021

FINALLY!
Objects can now be stacked indefinitely over one another, on moving platforms with or without easing or on solid ground. Tested with trampolines, unisolids, platform objects, moving tilemaps...
(That was a tough one!)

@mbernard2 mbernard2 marked this pull request as ready for review March 4, 2021 08:41
@tobbi
Copy link
Member

tobbi commented Mar 4, 2021

Thank you very much for this. This issue has bugged us for such a long time. I will review your code this evening and then merge it once all is good. :)

@Semphriss
Copy link
Member

Hurray!

Thanks so much for your contribution!

@weluvgoatz
Copy link
Member

There seems to be a bug where Tux can no longer ride on sideways-facing ice crushers anymore, as he just slips off of them weirdly.

@mbernard2
Copy link
Contributor Author

There seems to be a bug where Tux can no longer ride on sideways-facing ice crushers anymore, as he just slips off of them weirdly.

As of f67974b, he can ride on "recovering" crushers but not on "crushing" crushers (i.e. in "crushing" mode). I'll fix this.


BTW can someone help me diagnose why the "bsd-solaris" check failed ?

@tobbi
Copy link
Member

tobbi commented Mar 4, 2021

BTW can someone help me diagnose why the "bsd-solaris" check failed ?

Seems to be an intermittent failure. I've re-triggered the builds.

@tobbi
Copy link
Member

tobbi commented Mar 4, 2021

Thank you very much for this 🎉 I'm merging it.

🥳

@tobbi tobbi merged commit e9ffd2d into SuperTux:master Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants