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

Add physics modifier wrapper to prevent physics override conflicts between mods #288

Closed
ClobberXD opened this issue Nov 30, 2018 · 7 comments

Comments

@ClobberXD
Copy link
Contributor

With more and more mods overriding player physics (sprint, medkits, etc.), things are getting pretty complicated to ensure the overrides work together and don't conflict with each other.

I'm planning on making a light-weight physics modifier wrapper around set_physics_modifier that applies modifiers on top of each other. Mods would be able to access the modifier "layers" they created, and modify them without affecting the modifier layers set by other mods.

@AKryukov92
Copy link
Contributor

Is there anything else but sprint and medkits to override player physics?
Does current state of complexity obstructs implementation of some specific feature?
Any additional layer of abstraction only adds complexity. I'd rather keep things simple.

@ClobberXD
Copy link
Contributor Author

ClobberXD commented Dec 1, 2018

Is there anything else but sprint and medkits to override player physics?

As of now, that's it, but if shooter is going to be replaced by another guns mod gunslinger (WIP for now), this would also meddle with physics overrides: ClobberXD/gunslinger#1

Any additional layer of abstraction only adds complexity. I'd rather keep things simple.

It's actually the other way around. Physics overrides are the most complicated to work with directly, when there's more than one mod involved. See minetest/minetest#7269 and a relevant topic on the Minetest forum

You've already seen how medkits and sprint barely manage to work together with respect to physics overrides. Both the mods have to add special methods and checks to each other, making the mods dependent on each other. If a third mod needs to modify physics overrides, then all three mods would have to interface with each other, the best they can. You can see where I'm going with this - the more the mods that modify player physics overrides, the more difficult it gets to make them work with each other without any issues.

@ClobberXD
Copy link
Contributor Author

Should this be a part of ctf_pvp_engine instead? That way, mods in the modpack can also make use of physics modifiers for features like slowing down the player when they have the flag.

@ClobberXD ClobberXD self-assigned this Dec 2, 2018
@AKryukov92
Copy link
Contributor

It could be completely stand-alone modificitation bundled as submodule.
If done right, it might become a part of MT itself.

@ClobberXD
Copy link
Contributor Author

ClobberXD commented Dec 2, 2018

There are many mods out there that allow for physics modifiers. It's just that they have too many features, which end up bloating those mods. See #289 for my proposed implementation. I've tried to make it as light-weight as possible.

If done right, it might become a part of MT itself.

For that, there's already a "controversial" PR: minetest/minetest#7269

@ClobberXD
Copy link
Contributor Author

Should this be a part of ctf_pvp_engine instead? That way, mods in the modpack can also make use of physics modifiers for features like slowing down the player when they have the flag.

In a bid to make ctf_pvp_engine more generic, I'd probably implement flag-bearer slow-down in ctf_match or some other local mod.

@AKryukov92
Copy link
Contributor

May be it is better to borrow implementation, you mention here.
Why to implement just another modifier manager, Ifroblem already has a solution?
Do you see any flaws in referenced solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants