thorwin99 / SEWorldGenPlugin

A world generation plugin for space engineers
36 stars 8 forks source link

SEWorldGenPlugin issues #80

Open WhiteFeatherx69 opened 3 years ago

WhiteFeatherx69 commented 3 years ago

Server is crashig 2-6 times each day when SEWorldGenPlugin is enabled, and server is getting massive SS drops when being in Asteroid Fields.

The GPS location updater, updatres like 20-40 times each sec.

01:15:38.5859 [FATAL] Initializer: System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.List1.Enumerator.MoveNextRare() at SEWorldGenPlugin.Session.MyEntityTrackerComponent.UpdateBeforeSimulation() at Patched_Sandbox.Game.World.MySessionUpdateComponents_0(Object ) at Patched_Sandbox.Game.World.MySessionUpdate_0(Object , MyTimeSpan ) at Sandbox.MySandboxGame.Update() at Patched_Sandbox.Engine.Platform.GameUpdateInternal_0(Object ) at Patched_Sandbox.Engine.Platform.GameRunSingleFrame_0(Object ) at Patched_Sandbox.Engine.Platform.FixedLoop+<>c__DisplayClass11_0<Run>b__0_0(Object ) at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at Torch.VRageGame.DoStart() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 288 at Torch.VRageGame.Run() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 123 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.List1.Enumerator.MoveNextRare() at SEWorldGenPlugin.Session.MyEntityTrackerComponent.UpdateBeforeSimulation() at Patched_Sandbox.Game.World.MySessionUpdateComponents_0(Object ) at Patched_Sandbox.Game.World.MySessionUpdate_0(Object , MyTimeSpan ) at Sandbox.MySandboxGame.Update() at Patched_Sandbox.Engine.Platform.GameUpdateInternal_0(Object ) at Patched_Sandbox.Engine.Platform.GameRunSingleFrame_0(Object ) at Patched_Sandbox.Engine.Platform.FixedLoop+<>c__DisplayClass11_0b__0_0(Object ) at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at Torch.VRageGame.DoStart() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 288 at Torch.VRageGame.Run() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 123 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() 01:15:38.5859 [INFO] Initializer: Generating minidump at C:\UDInstanceAlpha\Instance\Minidump.dmp 01:15:38.5859 [ERROR] Initializer: Keen broke the minidump, sorry.

WhiteFeatherx69 commented 3 years ago

00:02:42.4083 [WARN] Keen: SEWorldGenPlugin - WARNING Couldnt register asteroid object providers for assembly ProtoBuf.Net.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 00:02:42.5333 [WARN] Keen: SEWorldGenPlugin - WARNING Couldnt register asteroid object providers for assembly Steamworks.NET, Version=15.0.0.0, Culture=neutral, PublicKeyToken=null 00:02:42.8145 [WARN] Keen: SEWorldGenPlugin - WARNING Couldnt register Types for assembly ProtoBuf.Net.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 00:02:42.8614 [WARN] Keen: SEWorldGenPlugin - WARNING Couldnt register Types for assembly Steamworks.NET, Version=15.0.0.0, Culture=neutral, PublicKeyToken=null

thorwin99 commented 3 years ago

This second log is just warnings, thats nothing. It searches for custom asteroid object providers, there are 2 currently, asteroid ring and sphere. As for the other issue, i will need to investigate a bit and fix it

thorwin99 commented 3 years ago

Sim speed loss when being in asteroid belts can be solved by reducing the density. Remember, the plugin roughly uses 4 to 6 times the density of default SE. While SE might generate 5 asteroids around a player, this plugin by default generates hundred in a belt.

thorwin99 commented 3 years ago

Published a pre release for you to test: https://github.com/thorwin99/SEWorldGenPlugin/releases/tag/v2.0.5.3pre1 This should fix the crash log you posted, as for the other issues, liket he one with the gps updater, can you elaborate more on that please? The GPS updater checks if any gps needs to be deleted, which it does before simulation

WhiteFeatherx69 commented 3 years ago

thanks.. seems to work.. but i get weird reboot issues now.. it loads up all my ram and freezes. and dies after 5 mins stuck.. the GPS locator for Asteroid belts.. updates it location for the belt like 20 times a sec.. and jumps around you when close to the belt.. when looking under GPS, you can see the Asteroid belt GPS updates like there is no day tomorrow. .

thorwin99 commented 3 years ago

If it eats up the ram while in asteroids reduce the density. 0.1 is the vanilla equivalent. There is some issue with asteroids, that doesnt clean up the ram, but i dont know why thats happening. The plugin itself removes all references to them, so it should be SE. Updating is correct just not that it jumps around and refreshes the GPS list. I will check that

thorwin99 commented 3 years ago

I am sorry, but i cant replicaet that GPS issue, when getting close to an asteroid belt, that yellow dynamic gps goes away. Or do you have persistent gps activated for belts? If not, could you post the xml files for the plugin for the world here?

WhiteFeatherx69 commented 3 years ago

i'll try it out soon.. we are having some other issues. some is about to be fixed.. i keep you updated.. all i know is, when the GPS marker, while looking at it under GPS window, you can see it update the coords like 20-30 times per sec.. a bit to fast. since when getting close to the belt, the gps begins to jump all over the place to tell you where the belt is closes to..

thorwin99 commented 3 years ago

Just to clarify, do you mean asteroid rings or asteroid belts. For asteroid belts, i could not replicate the jumping around. If it is for belts, are you far away from the center (ca. >2ls)?

WhiteFeatherx69 commented 3 years ago

okay.. i have been told by many player-s that the asteroid belt, is always loaded. and can be seen from really far away.. maybe that's why it takes up so much memory.. i managed to use 20+ gb memory with seworldgenplugin.

thorwin99 commented 3 years ago

There are 2 things, if there are grids in there, they load asteroids. If not, there still might be the memory leak that somehow doesnt clean up asteroids, or they were edited. Normally it unloads asteroids, as i already tested that in singleplayer while watching the entity list. What i am not sure is, if the clientside cleans them up, but i cant affect that side with the current solution

WhiteFeatherx69 commented 3 years ago

well.. im still wondering about the Gps for the asteroid rings locator. everytime you move, unger K then GPS, select the asteroid ring GPS, you can see it's updating it's location, like 100 times a sec.. im wondering if that can cause instability, when having 40+ players, that it will update for all of them everytime they move?

thorwin99 commented 3 years ago

The thing is, it updates that location before simulation so it updates it as often as simulation runs. I am not sure if i can make that slower without putting it on another thread that would need to synchronize back to the main thread. Where do you even see it updating? the GPS list should not even refresh as an update is not the same as removing and adding it. What i could do is set a timer that has to run to 0 before updating GPSs again, so they would update once per second, but i have to see how i would go about it

WhiteFeatherx69 commented 3 years ago

You can join Upside down server. And see for yourself. Or I have a video of it

On May 15, 2021, at 12:15, Thorwin Vogt @.***> wrote:



The thing is, it updates that location before simulation so it updates it as often as simulation runs. I am not sure if i can make that slower without putting it on another thread that would need to synchronize back to the main thread. Where do you even see it updating? the GPS list should not even refresh as an update is not the same as removing and adding it. What i could do is set a timer that has to run to 0 before updating GPSs again, so they would update once per second, but i have to see how i would go about it

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fthorwin99%2FSEWorldGenPlugin%2Fissues%2F80%23issuecomment-841634846&data=04%7C01%7C%7C469e58418a784390cefd08d9178a56c9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637566705188130391%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=bzFhGKxWS4tMSdXvVElAhdsLoRy%2FydScb9mCQmaWaXQ%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAQTKMPOFLNV7U7YKLDWJSELTNZCTLANCNFSM42KBKUEA&data=04%7C01%7C%7C469e58418a784390cefd08d9178a56c9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637566705188130391%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ahItvUIGjniA37Hi5zIDBrp5222Gjwxo9ry5DNoAy7g%3D&reserved=0.

thorwin99 commented 3 years ago

Yeah, i would like to see that. I will implement a timer, so it only updates them once a second

WhiteFeatherx69 commented 3 years ago

https://1drv.ms/v/s!Av9qnY2ZZ1asvJJ1yfDYWHpvFIvRoA?e=gr3PEI

thorwin99 commented 3 years ago

Ah, okay yeah makes sense. I thought you mean the list itself updates, which would cause that you can't select a gps

WhiteFeatherx69 commented 3 years ago

oh. an antoher issue.. sadly.. players comments about the gps disappears and reappears when a player joins the game/world.

thorwin99 commented 3 years ago

Do you mean persistent or discovery gpss

WhiteFeatherx69 commented 3 years ago

Players just reported, they were far away, but could see the gps marker in space.. then it just Disappears, when a new player joins the server, the gps marker in space reappears.

thorwin99 commented 3 years ago

When you move away from the ring it should disappear. Does it get deleted from the gps list?

WhiteFeatherx69 commented 3 years ago

yes when you are to far away. the GPS vanish as it should. and reappear when coming in range. But the plugin is making some hits on the server.. 35 players, and players reporting some lags spikes.. so sadly, i have to take off the plugin again, sorry.. so that's all i have for now..

WhiteFeatherx69 commented 3 years ago

MyProceduralGeneratorComponent' took 1.84ms/f main, 0.00ms/f parallel (total 917.90ms) that's a lot sadly for one belt Maybe im doing something wrong.

thorwin99 commented 3 years ago

Yeah it goes through the whole system and searches the belts, that for each player. I will make it once per second or try to put it on a different thread

WhiteFeatherx69 commented 3 years ago

used 32Gb of ram. 20+ for your plugin alone.. damn

thorwin99 commented 3 years ago

So there was a memory leak that got fixed 2 updates ago. However if you can provide more details where it used those 20 Gb it would be appreciated. It can simply be the asteroid generator, since the amount of asteroids generated is quite large and there seems to be some memory leak regarding those, which is a known issue

WhiteFeatherx69 commented 3 years ago

Torch-2021-05-15.log Keen-2021-05-15.log

WhiteFeatherx69 commented 3 years ago

SEWorldGenPlugin.zip

WhiteFeatherx69 commented 3 years ago

that the settings for Seworldgen

thorwin99 commented 3 years ago

But where did you get the 20GB from

WhiteFeatherx69 commented 3 years ago

the server uses normally around 10 --> 14GB of memory, when im adding your Plugin, it goes to 30+ Gb of memory.

WhiteFeatherx69 commented 3 years ago

image that's with currently with 42 players. stable Sim speed also.. is ther eanything i can upload to help

WhiteFeatherx69 commented 3 years ago

if you want.. if you have discord.. Join https://discord.gg/JUrKZfw and ask for White Feather.. we have a few admins and support team on, that might give better details about the plugin. since they are ingame,

thorwin99 commented 3 years ago

I dont think so. The thing with that memory 'leak' is, if many players are inside asteroid rings and the density is default, then there are ca. 100 to 1000 times more asteroids than on any vanilla server. Normally you would have 4 or so loaded for each player, with the plugin 400. However, sometimes it seems to not cleanup after itself. I still cannot find out why and when it does happen but some asteroids just stay for some reason. High memory usage can be fixed by lowering the density, ever more rising memory cannot, it would just delay.

So for the time being, if memory gets to high, lower the density of asteroids. Thats all you and i can do.

WhiteFeatherx69 commented 3 years ago

our Asteroid density is at 0.1 and in the one belt we have is around the moon. at 0.2

thorwin99 commented 3 years ago

Okay, then thats weird. However 42 players at .1 density all in the ring would be 1100 asteroids. If we assume each to be 10mb in size, that works out with 10Gb. Again that memory usage while using the plugin cant really be reduced. I dont know how large an asteroid is in memory, memory leaks can potentially be fixed. If you have consistent 42 players moving around, all in the ring, and the RAM just doesnt stop to go up, then thats a leak

WhiteFeatherx69 commented 3 years ago

i don't mind the memory used, as long it doesn't take performance. we are running with around 52 players every day at peak. so if there was a way to have it without impacting the performance, I would be grateful.. so if you want any data, just ask.. I'm just relaying information from players and supporters.

thorwin99 commented 3 years ago

Again, i will try to move the gps updating either on another thread, or make it update once a second or both, that should save some performance

WhiteFeatherx69 commented 3 years ago

thanks.. I appreciate it

thorwin99 commented 3 years ago

https://github.com/thorwin99/SEWorldGenPlugin/releases/tag/v2.0.6.3pre1 This is a prerelease version with the performance improvement for dynamic gpss. This release in general will therefore focus more on performance, so if you find more performance issues, please let me know, since you guys are running a server with the plugin, it should show those issues even more.

WhiteFeatherx69 commented 3 years ago

cool.. any idea how to cleanup the memory on asteroids,??

thorwin99 commented 3 years ago

No, normally they despawn when no player or grid is near them, except edited ones

WhiteFeatherx69 commented 3 years ago

the New gps updater works.. i'll you know when i heard from players.

WhiteFeatherx69 commented 3 years ago

18:05:59.4125 [FATAL] Initializer: System.ArgumentException: Key 76561198010533981 already exists Parameter name: key at Torch.Collections.MtObservableSortedDictionary2.Add(TK key, TV value) in C:\build\workspace\Torch_Torch_master\Torch\Collections\MtObservableSortedDictionary.cs:line 148 at Torch.Managers.MultiplayerManagerBase.RaiseClientJoined(UInt64 steamId) in C:\build\workspace\Torch_Torch_master\Torch\Managers\MultiplayerManagerBase.cs:line 121 at Torch.Server.Managers.MultiplayerManagerDedicated.<>c__DisplayClass45_1.<RunEvent>b__1() in C:\build\workspace\Torch_Torch_master\Torch.Server\Managers\MultiplayerManagerDedicated.cs:line 317 at Sandbox.MySandboxGame.ProcessInvoke() at Sandbox.MySandboxGame.Update() at Patched_Sandbox.Engine.Platform.GameUpdateInternal_0(Object ) at Patched_Sandbox.Engine.Platform.GameRunSingleFrame_0(Object ) at Patched_Sandbox.Engine.Platform.FixedLoop+<>c__DisplayClass11_0<Run>b__0_0(Object ) at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at Torch.VRageGame.DoStart() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 300 at Torch.VRageGame.Run() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 123 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() System.ArgumentException: Key 76561198010533981 already exists Parameter name: key at Torch.Collections.MtObservableSortedDictionary2.Add(TK key, TV value) in C:\build\workspace\Torch_Torch_master\Torch\Collections\MtObservableSortedDictionary.cs:line 148 at Torch.Managers.MultiplayerManagerBase.RaiseClientJoined(UInt64 steamId) in C:\build\workspace\Torch_Torch_master\Torch\Managers\MultiplayerManagerBase.cs:line 121 at Torch.Server.Managers.MultiplayerManagerDedicated.<>cDisplayClass45_1.b__1() in C:\build\workspace\Torch_Torch_master\Torch.Server\Managers\MultiplayerManagerDedicated.cs:line 317 at Sandbox.MySandboxGame.ProcessInvoke() at Sandbox.MySandboxGame.Update() at Patched_Sandbox.Engine.Platform.GameUpdateInternal_0(Object ) at Patched_Sandbox.Engine.Platform.GameRunSingleFrame_0(Object ) at Patched_Sandbox.Engine.Platform.FixedLoop+<>cDisplayClass11_0b__0_0(Object ) at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at Torch.VRageGame.DoStart() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 300 at Torch.VRageGame.Run() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 123 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() 18:05:59.4125 [INFO] Initializer: Generating minidump at C:\UDInstanceAlpha\Instance\Minidump.dmp 18:05:59.4125 [ERROR] Initializer: Keen broke the minidump, sorry.

WhiteFeatherx69 commented 3 years ago

someone is saying it is caused by the GPS

WhiteFeatherx69 commented 3 years ago

19:05:36.6546 [FATAL] Initializer: System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext() at Patched_Sandbox.Game.Multiplayer.MyGpsCollectionUpdate_0(Object ) at Patched_Sandbox.Game.World.MySessionUpdate_0(Object , MyTimeSpan ) at Sandbox.MySandboxGame.Update() at Patched_Sandbox.Engine.Platform.GameUpdateInternal_0(Object ) at Patched_Sandbox.Engine.Platform.GameRunSingleFrame_0(Object ) at Patched_Sandbox.Engine.Platform.FixedLoop+<>c__DisplayClass11_0b__0_0(Object ) at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at Torch.VRageGame.DoStart() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 300 at Torch.VRageGame.Run() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 123 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

WhiteFeatherx69 commented 3 years ago

at System.Threading.ThreadHelper.ThreadStart() System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext() at Patched_Sandbox.Game.Multiplayer.MyGpsCollectionUpdate_0(Object ) at Patched_Sandbox.Game.World.MySessionUpdate_0(Object , MyTimeSpan ) at Sandbox.MySandboxGame.Update() at Patched_Sandbox.Engine.Platform.GameUpdateInternal_0(Object ) at Patched_Sandbox.Engine.Platform.GameRunSingleFrame_0(Object ) at Patched_Sandbox.Engine.Platform.FixedLoop+<>c__DisplayClass11_0b__0_0(Object ) at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at Torch.VRageGame.DoStart() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 300 at Torch.VRageGame.Run() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 123 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() 19:05:36.6546 [INFO] Initializer: Generating minidump at C:\

WhiteFeatherx69 commented 3 years ago

Patched_Sandbox.Game.Multiplayer.MyGpsCollectionUpdate

Qrahn commented 3 years ago

Ok Qrahn here, also from UD here. We have used your plugin extensively prior to these bugs. The ring orbits a starting moon and i wish for a secondary ring around a planet. Now Thorwin, you stated that all the asteroids load/render in. This is not true since we have concealment and a render distance of 10km. Meaning only starting players render in the asteroids. Which are just a couple a day. Rest of the world is +/-0.01 density and means we solely rely on the rings. Due to these problems, we have to change mapsettings constantly. Myself and players report constant streaming inside the asteroid belt, even when sitting completely still. Our profiler constantly hits: MyProceduralGeneratorComponent' took 1.84ms/f main, 0.00ms/f parallel (total 917.90ms) or higher ms rates. I wanted to execute Dottrace for you, but we already yeeted of the plugin once more.

I dont know what is wrong. I mean at this point i want to throw money at you to help us install it properly and if installed to help us troubleshoot it.

thorwin99 commented 3 years ago

So first, the whole log for that crash would be helpful. As for streaming with the asteroids, the current problem that the plugin has with multiplayer is, that asteroids need to be synced by tricking SE into thinking they are modified, and therefore every player needs to know them. A more detailed explanation is simply, SE doesnt generate asteroids server sided. It does so client side. Since server and client use the same seed for the world and every cell is generated in a predictable manner, only clients need to generate the asteroids and every client gets the same result when moving to a cell. Thats how vanilla SE works.

Due to the plugin being server side only first, it cant affect that client side generation. That means, the plugin needs to stream generated asteroids to the players. However, that cant sadly be done selectively, so every player knows every asteroid on the server. That is not optimal, i know that. However, that was the only way to do it, without creating a client plugin that would communicate with the server to spawn the asteroids selectively for each player and only for that player. That would be the optimal way. Since a mod cant spawn an asteroid with the normal SE methods, as far as i know, i cant simply create a client mod that would take that role, spawning asteroids clientside instead of server side. So i am sadly stuck with streaming ALL currently rendered asteroids to ALL players at ALL times.

If i knew a better way to do that, i would, however i simply dont. I dont want to force people to use client-side plugins just to join a server, since plugins are way more powerfull than mods.

The performance of the Procedural generator is so bad, because it generates so many asteroids for all players at once. Same problem as stated before. Optimally i would make all that stuff clientsided, but that can only be done by either modifiyng SE with a plugin to allow that, or by completely integrating such generation system into the game.

I would love to fix those issues eventually, but i just dont have any idea how. Thats why the procedural generation is still how it is. Initially the plugin was only a singleplayer one (version 1.0 or something) and i added multiplayer compatibility only a bit later with that trick, since everything else i tried failed at that time.