Re: Monday, February 6, 2017
Posted: Mon Feb 06, 2017 2:48 pm
Disclaimer: no clues about what I speak about...
I do not understand what the computationally intensive logic is.
In my own words: I can imagine a very local logic that needs to run in real time, this is when e.g. many ships are involved in a dogfight and each ship's pilot AI need to decide what to do next. Add the real time sensors and the rendering, and I shiver. As this is real time, I understand it may be difficult to put it across threads, but it is also "standard" AI without very deep thinking.
Then there is the logic were the world evolve, and AI reacts to it, taking decisions and changing the world. This is not real time. Why can this not be threaded in a lower priority thread to be executed when the dogfighting is finished and the player either look at numbers on the market of a station, or look at the view while cruising or grind at an asteroid.
As I see it, this second logic contains the main world description, while the "real time module" contains a copy of the local environment only (happens infrequently, so the large data to transfer is not a problem). When landing/interacting with the rest of the universe, the background logic provides a new, updated, copy of the universe. If sometimes, when very heavy computations are required, there is a second of delay, it can be covered with nice landing graphics
So unless the problems lies already in the "dogfighting" real-time part (in which case you will have to simplify it), I do not understand where the show stopper for threading is.
Somebody cares to enlighten me?
I do not understand what the computationally intensive logic is.
In my own words: I can imagine a very local logic that needs to run in real time, this is when e.g. many ships are involved in a dogfight and each ship's pilot AI need to decide what to do next. Add the real time sensors and the rendering, and I shiver. As this is real time, I understand it may be difficult to put it across threads, but it is also "standard" AI without very deep thinking.
Then there is the logic were the world evolve, and AI reacts to it, taking decisions and changing the world. This is not real time. Why can this not be threaded in a lower priority thread to be executed when the dogfighting is finished and the player either look at numbers on the market of a station, or look at the view while cruising or grind at an asteroid.
As I see it, this second logic contains the main world description, while the "real time module" contains a copy of the local environment only (happens infrequently, so the large data to transfer is not a problem). When landing/interacting with the rest of the universe, the background logic provides a new, updated, copy of the universe. If sometimes, when very heavy computations are required, there is a second of delay, it can be covered with nice landing graphics
So unless the problems lies already in the "dogfighting" real-time part (in which case you will have to simplify it), I do not understand where the show stopper for threading is.
Somebody cares to enlighten me?