thmsndk / Screeps3D

A 3D client for the MMORTS Screeps.com
89 stars 17 forks source link

Nukes causing odd "smoke" in a bottomless pit, also seems to be crashing the client #217

Open thmsndk opened 4 years ago

thmsndk commented 4 years ago

This shows having selected "smokes" probably from other shards? image

Also in regards to crashing. When I commented out this section. it seems like it became more stable due to no nukes being rendered. https://github.com/thmsndk/Screeps3D/blob/4b408ba04f9168261d66ad147496c363a9ab1095/Assets/Scripts/Screeps3D/NukeMonitor.cs#L187

thmsndk commented 4 years ago

This is where I first noticed something odd, in the bottom of the screenshot, turns out it was smokes from nukes image

thmsndk commented 4 years ago

38% time spent with archrenderer, that is a lot of time, and it seems to be almost all frames 🤔 image

thmsndk commented 4 years ago

Removed RenderArc from the Update method, arc should only be calculated once initially. or perhaps on specific other times e.g. when we detect where the nuke is located as an example.

This should be a pretty nice performance increase though.

image

thmsndk commented 4 years ago

Missiles from other shards seems to not be rendered on the arc for some reason 🤔 image

thmsndk commented 4 years ago

When running the client outside the editor, with nukes enabled. the player crashes after a little while (~30 seconds). it seems to be running fine in the editor.

Gadjung commented 4 years ago

some oom issue maybe ? if all nukes from all shards are rendered (with tail and start smoke) it can put quite some strain on machine.

thmsndk commented 4 years ago

But if it is issue with OOM, why does it not crash in the editor then? things are slightly different while running in the editor and while running in the standalone player.

e.g. if we utilize editor only scripts, the code can't even compile. I seem to recall the crash containing something about a class or something it could not find 🤔 i'd have to dig around the crash logs some more. Perhaps I can attach the profiler to it as well 🤔

Digging has to be done to figure out what is happening at least. Perhaps I can try and comment out stuff until it does not crash to figure out what causes it 🤔

thmsndk commented 3 years ago

Nukes should no longer be loaded from other shards than the one you have selected, it does not unload nukes if you change shard though. https://github.com/thmsndk/Screeps3D/blob/0bb1749055f097df98a8d9c91d04fbc8bbc1c626/Assets/Scripts/Screeps3D/NukeMonitor.cs#L135-L139