Disclaimer: I’m also new to DOTS and not an expert, but this is exactly a case I want to use ECS with, but I have only done simpler stuff. Just adding my thoughts for the conversation, hopefully someone else with more experience can chime in… especially around the rendering part.
The thing to keep in mind with ECS vs OOP is that ECS is a very flat data model. For instance, there is no need to bundle things together into a galaxy! Instead, you can say that a galaxy is made up of “All Entities that Contain Star Component”. So, if you wanted to ask “how many stars are there”, then the answer is… “All Entities that Contain Star Component”. Likewise, if you were intending to have ‘paths’ (eg: hyperlanes), the galaxy would have pathways equal to “All Entities that Contain Pathway Component”… and if you want to know how many planets there are in the galaxy… it’s the same, even if they ‘belong’ to a star - “All Entities that Contain Planet Component”.
It takes a different way of thinking to design like this… which is a real struggle! It’s particularly difficult to change old sequential loop problems when changing over to ECS. For example, when you process production, all you care about is “All Entities that Contain Building Component” - not “for each star, for each planet, for each building” which would be a traditional loop. The issue is that the old loop essentially has a “controller” assumption - that is, the planet you are looping through also refers and aggregates to that planet.
With ECS, you need to make sure things are more atomic. That is, all buildings produce at the same time, on every planet, everywhere. So, in a way, you have to store what it produces in the building itself. This makes it a bit more complicated to aggregate data up the hierarchy. In this case, you may have each building cache its production, then pull that data into the planet (eg: add all buildings that are associated with the planet), then pull that data in to the star system (eg: add all planets that are associated with the planet), then pull that data into the player bank (eg: add all star systems that are linked to the player(s)). Each of those is just reading the data from it’s children and writing to itself (eg: pass in all planets as read/write, and all buildings as read only).
Having said that, you’ll need lots of references. This is likely to be dynamic buffers of entities for the parent->children and/or a single reference for the child->parent. So, an aggregation job would essentially be “for all entities with a planet resources component AND building references component”, do “for all building references, add to planet resource components”. This keeps buildings read-only and makes it thread safe, assuming only one parent, and should be fully burstable.
There are probably a ton of details that will make this more complicated. Fleets probably will have a “universe position” and a “system position”, and may belong to multiple entities (home base, current system or pathway, etc.)
As for separate scenes - I don’t really know. You probably will want a few forms of UI overlays (not a new scene) that just reads a specific entity’s data (eg: an entire planet, or a station, or a fleet/ship)… which will just be some base logic on how to access the data. You can think of that as having a data query that runs and updates ~frame. Probably have a specific entity reference, that then branches into its children, so that you aren’t process excessive entities.
There probably will be a main scene that renders all Stars/Fleet icons/pathways/borders/etc… and probably a scene and/or camera location that loads only a subset of entities (eg: a star system). Haven’t done ir before, so I won’t comment.
ECS, for this part, is probably less important than it seems (other than rendering huge amounts of objects in #1). The main benefit is the massive improvement in manipulating all the data that the game logic demands. Fleets, stations, production, trade, population… all of that is data focused and is what I would focus on. It’s non-trivial when you start getting into it. For example, figuring out if a planet has a bonus because of the system it is in? Or because there is a station over the planet? Or because there is a population of a particular type, or a zone on the planet, etc. There are some big systems - rendering is a pretty small part (if critical), IMO.