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

Dynamic brain activation #9712

Closed
wants to merge 2 commits into from
Closed

Dynamic brain activation #9712

wants to merge 2 commits into from

Conversation

kennytv
Copy link
Member

@kennytv kennytv commented Sep 12, 2023

Based on https://github.com/TECHNOVE/Airplane/blob/ver/1.17/patches/server/0010-Dynamic-Activation-of-Brain.patch. Modified to not have to manually patch every new entity using Brain (other than adding new config defaults), also skipping unnecessary activity checks

@kennytv kennytv requested a review from a team as a code owner September 12, 2023 03:01
@Pantera07
Copy link
Contributor

DAB(Dynamic brain activation) drowns AI entities far away from the player.
https://youtu.be/B0kRxuuwQ88

Same Issue: pufferfish-gg/Pufferfish#58

@MartijnMuijsers
Copy link
Contributor

I spent a lot of time fielding complaints from players about this: entities in the distance behaving dumbly (piglin brutes being basically pacifist sometimes), mobs dying for all sorts of reasons (see above) like drowning or suffocation, mobs not reacting properly to plugin actions (like being statue-ified for a bit after teleporting), lots of normally Paper-compatible and fairly innocent farms sporadically and unpredictably breaking, or becoming so slow or stuck at typical distances that it is indistinguishable from broken mob AI.

I would suggest not enabling this by default.

Additionally, the distanceModifier is really hard to tweak because the effects between its subsequent values are huge. I would suggest, before merging this, to determine a different, better parameter (potentially less performant, but I really don't think a few floating-point computations are going to be a killer here).

And lastly, even when server owners wish to optimize this, the desirable parameter values can be quite different for different mob types and server observations. I would support adding a way to provide more specific values for particular mob type (groups).

@electronicboy
Copy link
Member

eyes too hurty to say much, but, stuff like that video is basically in part why EAR 2.0 exists, if we want to do this, we'd probably want to look at adopting a similar set of concepts

@kennytv
Copy link
Member Author

kennytv commented Sep 12, 2023

Honestly yeah I agree after looking into it some more, even defaulting to false seems weird with an option that just breaks entities this hard. Here's non-compromising performance improvements I added put into its own patch (keeping this pr as is for history purposes): #9713

@kennytv kennytv closed this Sep 12, 2023
@kennytv kennytv deleted the brain-activation-distane branch September 12, 2023 11:20
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