CBJ wrote: ↑Sun, 24. Jul 22, 12:59
Particles just move according to a simple formula.
Which is what ships do most of the time: they move. If you have a ship in combat with a 1s time to fire, that means that 59 Frames the ship is moving according to a particle-like formula, and 1 frame of actual interaction. Most ships however are not in combat, they simply move around in formation doing 99.9% particle stuff.
CBJ wrote: ↑Sun, 24. Jul 22, 12:59
I don't know what point you are trying to make here. Cores occasionally do have to wait for one another; this is known as a sync point, and happens, for example, when you need to ensure that everything is in a consistent state at the start of rendering a frame. Other than that, what makes you think that threads are waiting for one another? They're not.
That is the old thread based approach to multithreading, while the modern way would be a task-/queue-based approach.
To illustrate that with an example: let's say two ships want to trade.
Now as I said above all the movement can be handled by a particle-like system, so in full parallel. What's left is the actual trading:
1) Ships A injects a trade request into Ship B's task queue.
2) Ship B injects a "trade accepted" return into A's task queue (or otherwise "trade refused"), containing a rendezvous point, which is an arbitrary object handling the actual trade interaction.
3) Ship A and B do "particle stuff" till they are in place, once they arrive they send an "In position" note to the arbitrary trade handler.
4) Once both ships have sent that they are in place, the trade handler queues a "wait" task into them - which will simply make them wait until further notice - and also takes the cargo to trade for either transfer or dump.
5) Once a specific time has passed the trade handler sends the cargo to the receiving ship's queue and released them from their waiting.
Now the rendering only needs to know the position and heading of the ship, which is - thanks to the particle system - always known. The actual trade interaction requires no rendering and can therefore be done off the rendering thread. If the player is looking the trade handler could also have some fake "cargo drones" fly back and forth, which actually do nothing but look good and drop a random part of the cargo in transfer when destroyed.
This form of task/queue based interaction is used in all modern logistic systems around the world, which is by nature "multi-threaded," and has proven to be very reliably and fail-safe.