Quote:
curtadams said:
An interesting idea for SP would be to have the computer pre-compute the turns with background threads. First plan the AI turns. Then, once that's done, calculate all the battles as the player sets them up. Because the turn calc time is small compared to the playing time it should be pretty easy to stuff most of the work into the background from a time viewpoint (the programming, admittedly, isn't so easy).
|
Actually this is not a bad idea. It is usually not a good idea to put something like the AI in a seperate thread, but in a TBS it should work fine. I am not sure how cpu intensive playing the background music is, but I think it would be a good candidate to receive it's own thread as well since it only changes during combat it seems..
Using a method like you describe, all that would have to processed between turns is the battles. You could even process most of the battles before the end of the turn as well, and reprocess the battles that include the human player/players during the space between turns.