Skip to content
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

Reimplement flippers #246

Open
orhun opened this issue Nov 14, 2021 · 3 comments
Open

Reimplement flippers #246

orhun opened this issue Nov 14, 2021 · 3 comments
Labels
help wanted Extra attention is needed topic:item Interactive items, e.g. equipment

Comments

@orhun
Copy link
Member

orhun commented Nov 14, 2021

Flippers item was added in #181 and I will reimplement it based on the updated guide and official assets.

@olefasting
Copy link
Member

olefasting commented Nov 15, 2021

I have yet to wire up the PlayerEvent::Collision, just so you know. It is not very hard to do this if you just follow the method I have used to implement the other events. When that is done, you will be able to trigger effects on players on collision, which should be sufficient to implement this very easily. It should just be a matter of implementing aPassiveEffect for the flippers item, that is triggered on collision events, and you will have access to both relevant player handles in the effect coroutine...

I fixed this in #250
Now, collision event will be triggered every fixed update for all collisions between players, with an is_new parameter that will indicate whether the collision is fresh or ongoing

@erlend-sh erlend-sh added this to the v0.4 milestone Dec 30, 2021
@orhun orhun changed the title Reimplement flippers item Reimplement flippers Mar 1, 2022
@orhun orhun added the topic:item Interactive items, e.g. equipment label Mar 1, 2022
@orhun
Copy link
Member Author

orhun commented Mar 1, 2022

It looks like there is some extra work needed here due to limitations of our game engine (macroquad) to handle the states for walking/jumping/crouching etc.

So I will be unassigning myself from this issue in case someone else wants to jump in. Here are the assets that I've used in my branch:

@orhun orhun removed this from the v0.4 milestone Mar 1, 2022
@orhun orhun added the help wanted Extra attention is needed label Mar 1, 2022
@zicklag
Copy link
Member

zicklag commented Jan 19, 2023

Status Update

Flippers could now be implemented with new player states. When the flippers are equipped, it would transition the player to a new player state which allows complete customization of the player movement and controls.

This may involve some code duplication between the normal player states, and the new state, but that's fine. States were designed so that, while some logic may be duplicated between states, it doesn't restrict us to the concept that every state is going to share some measure of behavior, so each state can have totally different logic and controls.

If it helps, shared functionality could be moved into SystemParams or helper functions/macros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed topic:item Interactive items, e.g. equipment
Projects
None yet
Development

No branches or pull requests

4 participants