This question is mainly for @pspeed however, if anyone else wants to contribute, please fell invited
I have SolarSystems, containing ships planets ect.
For example this tree:
SolarSystem -> Station -> Hangar -> Ship -> Hangar -> Fighter -> Player -> Inventory -> Weapon -> Ammo
Now currently what I do is that I check from time to time for Entities in the database, that are not somehow transiently connected to a SolarSystem, kinda similar to how java GC kills stuff no longer referenceable.
The reason is, that I cannot figure out a better way to remove stuff, for example anything between the station and the player might get blown up, the player might disconnect (and be removed from the game, but not from the database) ect.
Doing a full check on every entity remove, to notice what i must cascade seems like much overhead compared to only scan trough all every few hours/days.
Do you have similar problems in Mythruna/your game? What is your attempt to solve it?
How are similar problems solved in your games logic?