Oolite is already made big steps from the player-centric "scanner populator" of Elite to the [wiki]Oolite_System_Populator[/wiki] in 1.79. After this post of cim I imagined a next step: how about if all ships in the 8 galaxies are tracked through the whole gameplay instead of respawned after hyperjumps?
In this case new ships will be created in shipyards only, all ship can get an unique name and can remember to the player, etc.
I think to an OXP level solution if possible, but I do not know all of the potential headaches about coding this idea.
I do not know also the thoughts of players: it can be a cool extension or unnecessary?
Galaxy Populator
Moderators: winston, another_commander
Re: Galaxy Populator
Ambitious.
Doing some very rough numbers:
- main station launch rate is about 1 group every five minutes. Pirates and secondary stations add some more to that, and the groups are a few ships in size on average, so let's very roughly say 1 ship per system per minute is launched.
- about half the ships are "local" traffic which will, assuming it's not destroyed, fly about for a couple of hours before returning. The other half will make a witchspace jump, average duration about a day plus a little in-system flight time. Depending on how you model time inside witchspace, we're probably looking at one trip per realspace day for any one ship, whether it's local or not, before the pilot needs a rest.
So that's 24 * 60 * 2048 ships, or about 3 million, to be tracked at any one time. You could probably say that to an approximation no-one travels between charts and only track the current chart, so maybe half a million at once.
The most efficient way to store the ship data would be to procedurally generate the ships from their entity personality and maybe a couple of other items; then you also need to store their location, especially for non-local ships, and a couple of bits for their memory of the player. With ultra-efficient storage you can probably do this in about 20 bytes per ship, so still around 10Mb per chart.
JS does not support that form of ultra-efficient storage, so you couldn't really OXP it - and an extra 80Mb on the size of the save file might be rather excessive, too. I don't think it's practical to do at all - maybe if you rewrote Oolite to support a client-server model for galaxy data and simulated the ships mostly offline with Oolite just needing to ask "who is in this system right now?", perhaps. Even then I think it's still going to be tricky to get sufficiently efficient.
...
The majority of the ships you meet - and the Elite rankings make this a necessity - are going to be:
a) people on their first or second trip into space; and
b) people who will shortly be dead even if you don't personally ensure this
So tracking most of them is I think a waste of time. What I have been considering, though (as very obliquely hinted at in some previous posts), is the possibility of introducing a class of "significant" Commanders - traders, couriers, smugglers, hunters, pirates, assassins, maybe even miners of particular renown (with skill, ship and hangers-on to match) who are somewhat persistent, rarely die (especially when the player isn't around), tracked around locations while the player isn't there, and may lead to rumours and "informal" missions in appropriate ways. By the time the player is Dangerous ranked, the game should probably consider them a "significant" Commander and do the same sorts of things to them. That I think is OXPable now (or maybe once 1.79 is feature-complete, anyway), though still not at all straightforward.
Doing some very rough numbers:
- main station launch rate is about 1 group every five minutes. Pirates and secondary stations add some more to that, and the groups are a few ships in size on average, so let's very roughly say 1 ship per system per minute is launched.
- about half the ships are "local" traffic which will, assuming it's not destroyed, fly about for a couple of hours before returning. The other half will make a witchspace jump, average duration about a day plus a little in-system flight time. Depending on how you model time inside witchspace, we're probably looking at one trip per realspace day for any one ship, whether it's local or not, before the pilot needs a rest.
So that's 24 * 60 * 2048 ships, or about 3 million, to be tracked at any one time. You could probably say that to an approximation no-one travels between charts and only track the current chart, so maybe half a million at once.
The most efficient way to store the ship data would be to procedurally generate the ships from their entity personality and maybe a couple of other items; then you also need to store their location, especially for non-local ships, and a couple of bits for their memory of the player. With ultra-efficient storage you can probably do this in about 20 bytes per ship, so still around 10Mb per chart.
JS does not support that form of ultra-efficient storage, so you couldn't really OXP it - and an extra 80Mb on the size of the save file might be rather excessive, too. I don't think it's practical to do at all - maybe if you rewrote Oolite to support a client-server model for galaxy data and simulated the ships mostly offline with Oolite just needing to ask "who is in this system right now?", perhaps. Even then I think it's still going to be tricky to get sufficiently efficient.
...
The majority of the ships you meet - and the Elite rankings make this a necessity - are going to be:
a) people on their first or second trip into space; and
b) people who will shortly be dead even if you don't personally ensure this
So tracking most of them is I think a waste of time. What I have been considering, though (as very obliquely hinted at in some previous posts), is the possibility of introducing a class of "significant" Commanders - traders, couriers, smugglers, hunters, pirates, assassins, maybe even miners of particular renown (with skill, ship and hangers-on to match) who are somewhat persistent, rarely die (especially when the player isn't around), tracked around locations while the player isn't there, and may lead to rumours and "informal" missions in appropriate ways. By the time the player is Dangerous ranked, the game should probably consider them a "significant" Commander and do the same sorts of things to them. That I think is OXPable now (or maybe once 1.79 is feature-complete, anyway), though still not at all straightforward.
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Galaxy Populator
Now this sounds promising..cim wrote:What I have been considering, though (as very obliquely hinted at in some previous posts), is the possibility of introducing a class of "significant" Commanders - traders, couriers, smugglers, hunters, pirates, assassins, maybe even miners of particular renown (with skill, ship and hangers-on to match) who are somewhat persistent, rarely die (especially when the player isn't around), tracked around locations while the player isn't there, and may lead to rumours and "informal" missions in appropriate ways. By the time the player is Dangerous ranked, the game should probably consider them a "significant" Commander and do the same sorts of things to them. That I think is OXPable now (or maybe once 1.79 is feature-complete, anyway), though still not at all straightforward.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Galaxy Populator
Yeah, don't it just.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: Galaxy Populator
Ok, I see the challenges of numbers but good ideas can help a lot and I enjoy the sub-game of solving these.
As you said we do not need to track everything to get an "enough good" result, especially not in the first versions.
It is enough to store the encountered ships in the first step. This is a growing list but defeated ships will be removed and the maximum is limited: imho enough to store 64k ship if there is an optimization to drop out the least relevant ships first, which is a good simulation of forgetting and losing data in RL.
Processing times are another challenges like the mentioned "who is in this system", so we need to use indexed data and as rare updates as acceptable. I think the first version can be made in js to see what numbers are reasonable and which bottlenecks need core support.
Significant Commanders is a very good idea for this and other improvemets also. At this point ships can be separated from pilots, so need handling of ship changes due to purchases or escapes (ship type will be the same but the owner maybe give new name to the ship).
As you said we do not need to track everything to get an "enough good" result, especially not in the first versions.
It is enough to store the encountered ships in the first step. This is a growing list but defeated ships will be removed and the maximum is limited: imho enough to store 64k ship if there is an optimization to drop out the least relevant ships first, which is a good simulation of forgetting and losing data in RL.
Processing times are another challenges like the mentioned "who is in this system", so we need to use indexed data and as rare updates as acceptable. I think the first version can be made in js to see what numbers are reasonable and which bottlenecks need core support.
Significant Commanders is a very good idea for this and other improvemets also. At this point ships can be separated from pilots, so need handling of ship changes due to purchases or escapes (ship type will be the same but the owner maybe give new name to the ship).
Re: Galaxy Populator
This is the bit I said "needs 1.79 to be feature-complete" for: issue 44 will make that much easier.Norby wrote:At this point ships can be separated from pilots
Re: Galaxy Populator
This sounds all of the amazing.cim wrote:What I have been considering, though (as very obliquely hinted at in some previous posts), is the possibility of introducing a class of "significant" Commanders - traders, couriers, smugglers, hunters, pirates, assassins, maybe even miners of particular renown (with skill, ship and hangers-on to match) who are somewhat persistent, rarely die (especially when the player isn't around), tracked around locations while the player isn't there, and may lead to rumours and "informal" missions in appropriate ways. By the time the player is Dangerous ranked, the game should probably consider them a "significant" Commander and do the same sorts of things to them. That I think is OXPable now (or maybe once 1.79 is feature-complete, anyway), though still not at all straightforward.
Given that various ships, such as those through random hits, will do a runner to another system if brought under fire, it would be very believeable that some ships persist far longer than others.
Re: Galaxy Populator
This is a very good idea - I made an OXP displaying the Elite rank of some NPCs, tracking Dangerous and above seems like a great follow-up!So tracking most of them is I think a waste of time. What I have been considering, though (as very obliquely hinted at in some previous posts), is the possibility of introducing a class of "significant" Commanders - traders, couriers, smugglers, hunters, pirates, assassins, maybe even miners of particular renown (with skill, ship and hangers-on to match) who are somewhat persistent, rarely die (especially when the player isn't around), tracked around locations while the player isn't there, and may lead to rumours and "informal" missions in appropriate ways. By the time the player is Dangerous ranked, the game should probably consider them a "significant" Commander and do the same sorts of things to them. That I think is OXPable now (or maybe once 1.79 is feature-complete, anyway), though still not at all straightforward.
Re: Galaxy Populator
On half a million potential ships in a given galaxy, very few will actually cross the path of the player. And most of them won't even be seen or noticed by him, and the remaining part will more or less be quickly forgotten.
I think that rather than implementing a feature in order to achieve some effects, one could focus on the effects themselves and find out an implementation that achieves them. Of course, it is less satisfying in the sense that the "greater" implementation could give more emerging effects (some of which might not be desirable though), but that doesn't mean the lesser one cannot have interesting side-effects.
When one follows a convoy through a wormhole, one find them on the other side as expected. I don't know how it is implemented, but it can perhaps reasonably be extended to any ship that appears on the scanner. This could result in only a few thousand ships being tracked.
Furthermore if one sets an arbitrary limit, like only one thousand, at some point the game will have to decide which ship to drop from its table in order to make room for a newly-encountered one. One could apply a common strategy in cache technology in this case: the ship that is forgotten is the one that hasn't be seen for the longest time, because the player him/herself has probably forgotten it already, or has moved to a different part of the galaxy.
I think for the second intended effect of the suggestion, which is I believe to model a galactic economy, one could just model the flow of ships and goods, and instantiate actual ships with their cargo based on these data when needed. The tracked ships could certainly be instantiated like this as well, but based on more accurate data (because tracked).
I think that rather than implementing a feature in order to achieve some effects, one could focus on the effects themselves and find out an implementation that achieves them. Of course, it is less satisfying in the sense that the "greater" implementation could give more emerging effects (some of which might not be desirable though), but that doesn't mean the lesser one cannot have interesting side-effects.
When one follows a convoy through a wormhole, one find them on the other side as expected. I don't know how it is implemented, but it can perhaps reasonably be extended to any ship that appears on the scanner. This could result in only a few thousand ships being tracked.
Furthermore if one sets an arbitrary limit, like only one thousand, at some point the game will have to decide which ship to drop from its table in order to make room for a newly-encountered one. One could apply a common strategy in cache technology in this case: the ship that is forgotten is the one that hasn't be seen for the longest time, because the player him/herself has probably forgotten it already, or has moved to a different part of the galaxy.
I think for the second intended effect of the suggestion, which is I believe to model a galactic economy, one could just model the flow of ships and goods, and instantiate actual ships with their cargo based on these data when needed. The tracked ships could certainly be instantiated like this as well, but based on more accurate data (because tracked).