Grid Spawning Code Improvements

Cheyne Stahlhut shared this feedback 12 months ago
Submitted

Hey guys,

I know this is a 'we really don't want to go there' type suggestion since it involves some of SE's core code, but I'll forge ahead anyway.

I think its fairly important to the success of both the 'game' side of Space Engineers and the function of some of the best immersion mods available for SE.

After talking with both the creators of the code for Exploration Enhancement and Modular Encounters and playing around with it myself it appears the code for spawning prefabs is in need of some serious love.

These mods are now using and looking to use in the future, the Object_Builder method of putting new grids into the game directly since its actually more efficient than the Prefab spawner code, which I believe isn't multi-threaded at all.

Looking at some of your Github code from 2016 it looks like some attempts were made to make it work a hell of a lot better with threading but that code has since disappeared from your current source code all together and the spawner is running purely from the main game thread.

I know its a complicated problem however, if some way accessible through the modapi could be found to stagger the spawning of grids over a couple of cycles as its pushed into the main game thread it would go a long way to being able to spawn decent sized grids seamlessly as players move throughout the game world.

Even with the using the Object_Builder method in parallel threads there is still 'game lag' which is really immersion breaking + gives away that something has spawned.

This type of code could also be used to improve the functionality of the copy and pasting of grids out of blueprints as well I believe as even there you can see the lag kick in as you try and copy paste something out of that screen.

Would love to hear your thoughts,

Cheyne