MarkusBordihn / BOs-Player-Companions

Player Companions adds additional NPC which will follow, protect or help you...
Other
2 stars 5 forks source link

Strange Lag #34

Open Coraline774477 opened 3 months ago

Coraline774477 commented 3 months ago

Minecraft: 1.20.1 (possibly on newer versions as well) Forge: 47.2.19 (possibly on newer versions as well) Player Companions: from 6.7.0 to 6.11.0

From 6.0.0 to 6.7.0 everything was fine until October 11th, 2023 which was 6.7.0 of Player Companions when I started noticing some strange lag on one of my worlds that I had at the time because I the player was moving normally while every entity in the game as well as the companions were moving strangely like as if the server was lagging or something. Turns out after months of this issue happening while I was suffering from the issue that I've figured it out that it's my TPS that was taking a big hit possibly due to you fixing network performance in Player Companions in either 6.7.0.

I really wish that the logs could provide evidence of this strange TPS lag but what made me think that it was Player Companions was the fact that in the logs before I stopped playing with Player Companions is that the mod scanned all of the companions in the overworld a little too periodically/often which might cause some performance issues in the long run. But after removing the mod that the TPS lag disappears.

So until the strange TPS lag issue is resolved I'm resort to playing with Player Companions 6.6.2. I know that I could've reported this issue when it first started happening months ago but I was busy with my daily routine life and my modded adventures as well as I just didn't know which mod was causing the TPS lag till I had enough and had some time to figure out which mod was causing it, even while I was trying to continue to fight through the strange TPS lag coming from Player Companions.

Btw I've discovered your difficulty mod but that mod also causes the same strange TPS lag as well. Possibly from the same network performance fix like in Player Companions. So if I ever want to continue to play with your mods in general then I must play with them as of versions before October 11th, 2023, such as Player Companions 6.6.2.

P.S. I could've used your bug issue but I'm more used to using a blank issue instead despite it not looking as neat as one of the other options. After all I'm a eight year Minecraft veteran that still likes to report issues with a blank issue.. Also I'm no longer using TLauncher as of Tlauncher.org but instead it's Legacy, which was formerly called TL Legacy (the original TLauncher). I had tried to use the official launcher a while back to try to play on modded 1.16.5 and the official launcher just keeps crashing without knowing why since it crashes too early. While I can't install forge 1.16.5 as well as forge 1.19.2 on Legacy possibly because I removed both from my versions folder because I moved on to 1.20.1 and the forge installer can't properly install either version to my main directory anymore which my main directory it's pretty old by now btw..

However I might give Modrinth a try to launch 1.16.5 or 1.19.2 forge, since I've used Modrinth to launch Fabric 1.20.1 with the Official MCA Reborn modpack several months ago before I stopped coming onto the Official MCA Reborn SMP server. But I've never tried launching forge with Modrinth before. But Modrinth possibly doesn't have all of the mods that I play with though...

MarkusBordihn commented 3 months ago

First of all thanks a lot of the detailed report and the insights you are providing.

I currently starting to rewrite some of my "older" mods completely from scratch to make them available for Fabric, Forge and NeoForge where this mod is on the list as well. Unfortunately the need to release a mod for 3 different mod loaders for newer versions doesn't make modding easier or faster.

I will check if the performance issue could be easily solved for this version for e.g. if it is only related to a specific part. If this would be more complex to solve or would need a complete rewrite, I would focus on the new version instead to make sure such issues are covered.

In general the mod has some known performance issue, which requires are complete rewrite. For example optimizing the data which are send to and from players.

Because of the Easy NPC mod I know how to even optimize the goals like following, attack and so. Which is currently not optimized at all in the current version and could also lead to higher TPS with a lot of companions in the word and/or around you.

The current version is also a little bit over engineered because it includes functionality which is used very rare. Hopefully this will all fixed in the next gen version which also allows custom models and more. But I can't give any timelines yet.

More and more mods are available on or only on Modrinth. I will try to support both platforms as long my time allows it.

Coraline774477 commented 3 months ago

Now to come to think about the mod's data, I had installed 6.6.2 and I think that the issue was also occurring on that version as well on a fresh new world that I had already deleted because the strange lag stays in the world even after the mod is removed. To be completely honest that maybe I should've tried to delete any data from Player Companions because maybe the data is completely different in 6.6.2 and older than the newer to latest versions, like I've said above that before October 11th of 2023 that Player Companions was working just fine like how it's always has been since it's creation or whenever I first started playing with it back in 1.18.2. However, how would I delete Player Companions's data on my end? The only thing that I can delete is the mod's config file(s) but that probably wouldn't help much.

I agree with you that your older mods such as Player Companions is possibly in need of a rewrite/refactor to clean up the code as well as the data that's being sent between the mod and the player(s) so that the TPS lag would go away. Since I really do miss taming the fairies mostly because they're so cute (especially when they're babies).. I'm afraid to download a older version of the mod for an older version of minecraft because the mod's data might be borked and in need of a rewrite to clean it up. Meaning that the mod on my side might be messed up somehow in some way.

Which I had to restart my current mod lists which Cora World: MineColonies w/Epic Fight and Cora World: Epic Fight w/Guns (gun mods) are the only mod lists that have a new world while Cora World: The Twilight Forest has yet to have a new world, since all three lists had Player Companions installed that I had to get rid of for now which caused me to delete their original world due to the TPS lag not going away after the removal of Player Companions. (As well as your progressive difficulty mod)

"Because of the Easy NPC mod I know how to even optimize the goals like following, attack and so. Which is currently not optimized at all in the current version and could also lead to higher TPS with a lot of companions in the word and/or around you"

That could be the reason why, since whenever there's too many companions in the world and around the player all at once all the time that the TPS takes a significant hit from that. Now imagine that but on a modded dedicated server (multiplayer) with Player Companions installed on both sides. That could possibly cause the server to crash because the TPS would be drastically hit by too many companions in the dedicated server's world with other players in it all at once when everyone is exploring the world. Since I had noticed sometimes that when I spawned in a fresh new world that everything's fine until I start exploring the world and as I get farther away from world spawn that the performance gets worse and worse the further out I go from spawn with the mod installed.

Btw now when I make a new world without Player Companions installed that it's like as if the game's insulting me whenever I find the flower forests which is where the faries resides in...

Coraline774477 commented 1 month ago

Some mods are having the same problem as Player Companions. I think that Lex may have changed something and sneaked a fix or something into one of the updates or something because most mods were playable but now are unbearable to play with now due to the intense amount of server lag (TPS). Such as GPU Memory Leak Fix causing HEAVY lag on an intergraded server when it was working just fine before let's just say about a few months to more than 5+ months ago. Which I had it removed but obviously missed it in one of my mod lists that still had it which its not in there anymore. Either that or most of my current PC specs aren't good enough which my parents may or may not ever get me a new pc let alone being a legitimate gaming pc (either a gaming laptop or a desktop). I did recently ramp up my paging file from where I initially had it (25500 and 40500 to 30500 and 45500 instead of its recommended paging file size which if I were to reset the min and max paging file size for 16+4GB RAM then my machine would be all slow and sluggish, especially in the game on both editions aka java and minecraft for windows. However.. I don't exactly know if that would've done the trick since my APU (intergraded graphics) only has 2GB which I would have to go into BIOS to possibly change the VRAM allocation to say 6 or 8, if it'll support those amounts of VRAM to the APU through BIOS.. Dispite the paging file practically being the VRAM rather than going into BIOS but it's a last ditch effort to allocate more RAM for minecraft in general by going into Bios and set the vram higher, if supported of course.