IMB11 / Sounds

A highly configurable sound overhaul mod that adds new sound effects while improving vanilla sounds too.
https://modrinth.com/mod/sound
Other
21 stars 6 forks source link

Lag when used with Sound Physics Remastered #68

Closed WingFrosty closed 2 months ago

WingFrosty commented 3 months ago

Have you read the information above?

Provide your logs.

I don't know what logs to provide but if needed I can provide them later.

Describe your issue.

In Minecraft 1.20.4 and while using the version 1.0.1 of this mod, the "Make Bubbles Pop" mod, the "Sound Physics Remastered" mod and the required libraries, it lags when you build a 3 tall hole with water at the bottom and fill it with cows.

If they are not bouncing high on the water, hit one of them and they will start bouncing. When they are bouncing all like this, it lags a lot, especially when moving around.

This doesn't happen with Sounds 0.9.0 .

Mods installed: image

Image with Sounds 1.0.1: image

Image with Sounds 0.9.0: image

IMB11 commented 3 months ago

Will investigate, please upload your latest.log though, I can't do anything without it.

WingFrosty commented 3 months ago

Here it's my log file: https://mclo.gs/CaaSy2t

keanine commented 2 months ago

I'm also having a stutter issue on Minecraft 1.21 with Sounds 1.0.1 and Sound Physics Remastered 1.4.5. Disabling one or the other fixes the lag in my mod pack. However, installing them in a new instance does not cause a stutter. I'll report back if I find the mods causing the issue

IMB11 commented 2 months ago

You should report this issue with either Sounds Physics Remastered or Make Bubbles Pop - Sounds has nothing to do with it - I can reproduce this extreme lag without Sounds installed.

IMB11 commented 2 months ago

image

Fyoncle commented 2 months ago

You should report this issue with either Sounds Physics Remastered or Make Bubbles Pop - Sounds has nothing to do with it - I can reproduce this extreme lag without Sounds installed.

But i cannot reproduce it when sounds not installed in guardian beams.

IMB11 commented 2 months ago

Sounds doesn't do anything with guardian beams or entity splashing in general though.

Fyoncle commented 2 months ago

Sounds doesn't do anything with guardian beams or entity splashing in general though.

Well when i remove Sounds it is not lagging anymore, not sure.

IMB11 commented 2 months ago

I've put in a temporary measure to ignore water blocks in the block sounds mixin, although I am certain this isn't the reason why your issue is occuring.

WingFrosty commented 2 months ago

You should report this issue with either Sounds Physics Remastered or Make Bubbles Pop - Sounds has nothing to do with it - I can reproduce this extreme lag without Sounds installed.

Maybe it could be a non-Minecraft related issue then because I can't reproduce this lag without Sounds installed. I tried again in 1.20.4 and 1.21 as Make Bubbles Pop is now available for it and those are the results using the same method I described using multiple cows bouncing on the water:

VSync Off + Unlimited Framerate for all the tests

1.20.4

Fabric API

image

Fabric API + Sound Physics Remastered + Make Bubbles Pop

image

Fabric API + Sound Physics Remastered + Make Bubbles Pop + M.R.U. + Sounds 1.1.0

Standing Still

image

Moving (varies a lot and freezes are frequent but I managed to take this screenshot)

image

Fabric API + Sound Physics Remastered + Make Bubbles Pop + M.R.U. + Sounds 0.9.0

image

1.21

Fabric API

image

Fabric API + Sound Physics Remastered + Make Bubbles Pop

image

Fabric API + Sound Physics Remastered + Make Bubbles Pop + M.R.U. + Sounds 1.1.0

Standing Still

image

Moving (varies a lot and freezes are frequent but I managed to take this screenshot)

image

Guardian Beam Lag

Also tried the other problem reported related with Guardian Beam lag but I couldn't reproduce it with the same mods and 8 Guardians targeting me so it could be another problem. image

I'll comment again if I find something relevant...

IMB11 commented 2 months ago

I think the easiest workaround if anyone is encountering this issue, is to simply just disable Make Bubbles Pop.

Fyoncle commented 2 months ago

I think the easiest workaround if anyone is encountering this issue, is to simply just disable Make Bubbles Pop.

But thats weird, why would we sacrifice a mod.

IMB11 commented 2 months ago

Sometimes, it's easier to just remove a mod rather than going down a rabbit hole of debugging and troubleshooting for months on end to fix a problem that not many people are encountering.

IMB11 commented 2 months ago

Consider using particular if you want to keep some of the effects Make Bubbles Pop adds.

Fyoncle commented 2 months ago

Sometimes, it's easier to just remove a mod rather than going down a rabbit hole of debugging and troubleshooting for months on end to fix a problem that not many people are encountering.

But thats a "serious" incompatibility

IMB11 commented 2 months ago

and? I cant find a single place of conflict between these two mods. Sounds does not create mixins that go anywhere near anything that Make Bubbles Pop does. This is likely as @WingFrosty said, a non Minecraft issue, eg either with LWJGL, Java or the operating system

Fyoncle commented 2 months ago

and? I cant find a single place of conflict between these two mods. Sounds does not create mixins that go anywhere near anything that Make Bubbles Pop does. This is likely as @WingFrosty said, a non Minecraft issue, eg either with LWJGL, Java or the operating system

Then why its not on 0.9.0?

IMB11 commented 2 months ago

🤷

Fyoncle commented 2 months ago

🤷

Eh idk, that is sad

Fyoncle commented 2 months ago

With Sounds 1.1.0 and Make Bubbles Pop v0.3.0 the lag seems a little bit less, but still reproducable.

Tschipcraft commented 2 months ago

FYI, Make Bubbles Pop has nothing to do with the underlying issue here, it was just the trigger since it creates a lot of bubble pop sounds when there are a lot of bubble particles around. I found that I can reproduce the fps drops when chaining four or more command blocks together, each with the command

playsound minecraft:block.stone.break ambient @a

Sound Physics 1.4.5 and Sounds 1.1.0: 2024-07-16_18 51 10

Sound Physics 1.4.5 and Sounds 0.9.0: 2024-07-16_18 49 52

For a quick fix, you can set the bubble pop volume to 0 in Make Bubbles Pop's config as of v0.3.0.

IMB11 commented 2 months ago

I dont see how Sounds is causing Sounds Physics Remastered to lag under many sound events

IMB11 commented 2 months ago

Sounds doesn't touch any of the underlying sound/aux system.

keanine commented 2 months ago

I've done some more testing and my issue does appear to be the same and not off topic. Sound Physics really doesn't like the way Sounds handles its sound events for some reason. If it wasn't fine on previous versions then I would just assume it's not a solvable problem, but something must have changed in one of the mods in the recent updates. My guess is that Make Bubbles Pop combined with Sound Physics Remastered exacerbates the problem by creating even more Sounds events, however I haven't done any testing with that mod.

Below I have screenshots from testing. As you can see the framerate on the multiplayer server is unplayable. The singleplayer world feels laggy but reads as a respectable FPS in the F3 screen and is a reduction regardless. I'm unable to figure out what the cause of the immense lag on the server is, however we have a lot of cows and bubble columns

Here's my mod list. For these tests I simply disabled and enabled the Sounds mod. mod-list

Cow world (No Sounds mod) cows-nosounds

Cow world (Including Sounds mod) cows-sounds

Friends server (No Sounds mod) server-nosounds

Friends server (Including Sounds mod) server-sounds

Here's a copy of the cow world I used for testing SoundTestWorld.zip

IMB11 commented 2 months ago

But the thing is, none of the situations this occurs in has modifications done by sounds, also, sounds doesn't "handle" sound events, it creates them in the same way vanilla does.

IMB11 commented 2 months ago

The fact FPS is low even when no sounds are playing makes zero sense, I've encouraged sounds physics remastered dev to investigate further, I'm stuck here, I've looked into everything.

keanine commented 2 months ago

Yeah it's a strange one for sure. Did you add a lot of new sound events since 0.9.0? I've not checked out the source for Sound Physics Remastered, but it's possible that it processes every sound event registered and the increase in added events is the cause of the FPS drop. The more I see of this the more I think it might just be an incompatibility in how these mods work, in that Sound Physics just isn't efficient enough to handle so many additional sound events.

IMB11 commented 2 months ago

No clue, I spent the entirety of today trying to mess around to see why this is happening - just nothing is working. Only thing I can suggest is messing about with this option;

image

and see if anything happens.

IMB11 commented 2 months ago

@keanine Please let me know if this does anything

WingFrosty commented 2 months ago

That solved the problem! With that option enabled I don't get anymore the horrendous fps and lag spikes.

The last tests I did were without resource packs so something is very resource hungry when that option is disabled.

IMB11 commented 2 months ago

Alright then, I'll have to bake sound groups for SPR.

keanine commented 2 months ago

Apologies I missed your @, yeah I can confirm that all stutter is completely gone with that option enabled for me too. There's still an FPS impact but it's not noticeable in gameplay and was hovering around 150 on my friends server in the same area as the previous screenshot where I got 270, which is more than enough. When I disabled the option again I was supposedly getting about 70 FPS according to F3, but had the same half a second stutter between frames as my last test. Makes me wonder how reliable those figures the debug screen gives you are.

IMB11 commented 2 months ago

Might be fixed in 1.1.2 - please let me know if its still not performing very well.

Fyoncle commented 2 months ago

Might be fixed in 1.1.2 - please let me know if its still not performing very well.

Thanks, will try

Fyoncle commented 2 months ago

image 19 FPS, still not fixed, not even close.

IMB11 commented 2 months ago

What happens if you remove Make Bubbles Pop?

Fyoncle commented 2 months ago

What happens if you remove Make Bubbles Pop?

image Still horrible FPS

IMB11 commented 2 months ago

and toggling the block sound disable option in Sounds?

Fyoncle commented 2 months ago

and toggling the block sound disable option in Sounds?

Still the same with a little amount of better fps, instead of 20s its around 40 or 50

IMB11 commented 2 months ago

Im going to release 1.1.3 which fixes an oversight in the refactored block sound mixin. However, it seems Make Bubbles Pop just sucks within ocean monuments - i have extremely low FPS with Make Bubbles Pop when im in ocean monuments, you could set Particles: Decreased in settings which seemed to improve it from single digit FPS to 50-60 FPS.

IMB11 commented 2 months ago

Seems Make Bubbles Pop is just unrelated to this issue entirely

Fyoncle commented 2 months ago

image 1.1.3 Also suffers from the same issue, make bubbles pop is disabled. Config does NOT fix that too.

Fyoncle commented 2 months ago

@IMB11

Tschipcraft commented 2 months ago

... However, it seems Make Bubbles Pop just sucks within ocean monuments - i have extremely low FPS with Make Bubbles Pop when im in ocean monuments, you could set Particles: Decreased in settings which seemed to improve it from single digit FPS to 50-60 FPS.

Make Bubbles Pop increases the bubble particle lifetime a bit compared to vanilla to allow the bubbles to reach the water surface more often. Since Guardians produce a lot of bubbles when they swim around, the particle count increases quite quickly, causing low fps. I might be able to reduce the particle count they produce in a future update. For now, bubble lifetime can also be decreased in the settings (related to https://github.com/Tschipcraft/make_bubbles_pop/issues/4#issuecomment-1758593635)