Hi,

So let me explain my problem with a game like Stellaris or any other space game where you would have several sector maps and a galaxy map view. If you switch to that galaxy view for example, all the logic (production, current vessel commands etc...) in the single sectors will keep running. How would you reach such implementation in Godot? change_scene() would not work because of freeing the current scene. My first thought would be working with hide/show nodes, so that they are still in scene tree and will keep processing but not rendering/drawing. Is that really the way you would implement such thing or would there be a more common (better) way?

@kryzmak said: Hi,

So let me explain my problem with a game like Stellaris or any other space game where you would have several sector maps and a galaxy map view. If you switch to that galaxy view for example, all the logic (production, current vessel commands etc...) in the single sectors will keep running. How would you reach such implementation in Godot? change_scene() would not work because of freeing the current scene. My first thought would be working with hide/show nodes, so that they are still in scene tree and will keep processing but not rendering/drawing. Is that really the way you would implement such thing or would there be a more common (better) way?

Just hiding/showing the nodes is how I would do it, at least initially. Depending on the size of your map this may be too costly to performance.

You might be able to get around the performance issue by making a node/object that processes all of the minimum necessities for each sector, and then you could use change_scene and just retrieve the data as needed from the global node/object. Granted this could have its own problems too.

I suppose the best way to know for sure would be to experiment. Personally I would just hide/show nodes for now and if performance becomes an issue, then look into optimizing then.

@TwistedTwigleg said:

Just hiding/showing the nodes is how I would do it, at least initially. Depending on the size of your map this may be too costly to performance.

You might be able to get around the performance issue by making a node/object that processes all of the minimum necessities for each sector, and then you could use change_scene and just retrieve the data as needed from the global node/object. Granted this could have its own problems too.

I suppose the best way to know for sure would be to experiment. Personally I would just hide/show nodes for now and if performance becomes an issue, then look into optimizing then.

Thanks for your feedback. Yes, the performance point is some thought I had too. I am on a very early stage in my project and can't yet assess how the impact would be. I think experimenting is the way of my choice. :wink: The suggestion with the global node unfortunately is too complex because every single object will be heavy on variables and fast changing values.

I'll keep this question unanswered, because I am keen on reading other suggestions and thoughts. Every input is welcome. :smile:

@kryzmak said:

@TwistedTwigleg said:

Just hiding/showing the nodes is how I would do it, at least initially. Depending on the size of your map this may be too costly to performance.

You might be able to get around the performance issue by making a node/object that processes all of the minimum necessities for each sector, and then you could use change_scene and just retrieve the data as needed from the global node/object. Granted this could have its own problems too.

I suppose the best way to know for sure would be to experiment. Personally I would just hide/show nodes for now and if performance becomes an issue, then look into optimizing then.

Thanks for your feedback. Yes, the performance point is some thought I had too. I am on a very early stage in my project and can't yet assess how the impact would be. I think experimenting is the way of my choice. :wink: The suggestion with the global node unfortunately is too complex because every single object will be heavy on variables and fast changing values.

I'll keep this question unanswered, because I am keen on reading other suggestions and thoughts. Every input is welcome. :smile:

Sounds good!

As far as the global node, the more I think about it the more problems I can see with it as complexity grows. Honestly I'm not really sure on what the best way to go about it would be, but I am curious to know the various approaches one can take. I always find questions like this valuable as you can always learn new things :smile: