Author Topic: Idea for Speeding Up Aurora  (Read 13201 times)

0 Members and 1 Guest are viewing this topic.

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11669
  • Thanked: 20441 times
Idea for Speeding Up Aurora
« on: September 08, 2014, 05:45:47 AM »
Probably the most common complaint about Aurora (besides the UI and the install :)) is the speed at which the game runs. This is particularly an issue for larger long-term games. Another element of this is the 5-second slowdown which can occur during NPR combat.

Two limitations on any attempt to increase execution speed are the age of the technology involved and the sheer number of things that happen every turn. I can't do anything about the former without rewriting Aurora so I've been looking more closely at the latter. The slowest parts of the turn are:

1) NPR Movement orders
2) Sensor Phase
3) Setting up Trade Runs for Civilian Shipping.

The worst culprit is the sensor phase, because it happens once per sub-pulse while the other two are once per increment. It suddenly occurred to me that to speed things up I could adopt the "If a tree falls in the forest..." philosophy. As an option, I could run the current detection code only for systems in which a player unit or population is present. This is less realistic than the current system but might be acceptable as a trade-off vs performance. There are two options for the situation where only NPRs are present in a system:

1) No detection
2) Automatic detection

Both of these would significantly reduce execution time, especially for campaigns with several NPRs. The former would also completely eliminate the 5-second problem because there would never be combat without a player in the same system. That is also a downside on the realism side as NPRs would be ignoring each other unless a player was watching - although that would also lead to more situations where a player sees NPR vs NPR combat as it wouldn't start until the player forces were in the system. The latter (auto-detection) would actually increase combat between NPRs so while perhaps more realistic than no detection it might increase the 5-second problem. Therefore I am leaning toward giving players the option of enabling no detection in systems without a player presence - or perhaps make that the default and have the option to enable detection in all systems.

No detection would also reduce the NPR Movement orders as well because there would be less calculation of which target to chase.

To reduce trade run calculations, I could change NPR new trade runs to be calculated during the 5-day increment. Currently both player and NPR trade runs are calculated during any increment longer than one hour.

Interested to hear comments and feedback
 

Offline alex_brunius

  • Vice Admiral
  • **********
  • Posts: 1240
  • Thanked: 153 times
Re: Idea for Speeding Up Aurora
« Reply #1 on: September 08, 2014, 06:23:23 AM »
I am personally MUCH more exited in solutions that attack the root cause of the problem ( exponential expansion of NPRs triggering new NPRs and spoilers far far away ), instead of simply trying to mitigate the cause ( increase performance in any isolated system ).

We had a great discussion in this thread about this previously:

http://aurora2.pentarch.org/index.php/topic,7305.0.html

Other options to put limits on NPR expansion might be some way to pseudo limit their range based on technology or fuel/engine design values ( IIRC they run with infinite fuel currently ).


For the no/automatic detection solutions I would preffer if it was possible for NPRs to fight still in places that I am likley to visit. So my vote there would go for no detection unless in a system where players are present or an adjacent system.


To reduce trade run calculations, I could change NPR new trade runs to be calculated during the 5-day increment. Currently both player and NPR trade runs are calculated during any increment longer than one hour.

This would reduce civilian trade significantly, primary because it would limit trades between very close bodies ( like Earth - Luna ) that provide extreme ROIs for civilian lines and allow them to explode their operations.

Another way to regulate their expansion ( which might be a bit more boring though ) would be to have civilian ships earn income per time spent doing active jobs instead of deliveries.
 

Offline sloanjh

  • Global Moderator
  • Admiral of the Fleet
  • *****
  • Posts: 2805
  • Thanked: 112 times
  • 2020 Supporter 2020 Supporter : Donate for 2020
    2021 Supporter 2021 Supporter : Donate for 2021
Re: Idea for Speeding Up Aurora
« Reply #2 on: September 08, 2014, 06:34:44 AM »
This would reduce civilian trade significantly, primary because it would limit trades between very close bodies ( like Earth - Luna ) that provide extreme ROIs for civilian lines and allow them to explode their operations.

Why do you say this?  My reading of what Steve said is that the change here would only affect NPR, not player races.

John
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11669
  • Thanked: 20441 times
Re: Idea for Speeding Up Aurora
« Reply #3 on: September 08, 2014, 06:37:20 AM »
I am personally MUCH more exited in solutions that attack the root cause of the problem ( exponential expansion of NPRs triggering new NPRs and spoilers far far away ), instead of simply trying to mitigate the cause ( increase performance in any isolated system ).

We had a great discussion in this thread about this previously:

http://aurora2.pentarch.org/index.php/topic,7305.0.html

Yes, I know. I implemented several of those ideas, so reduced numbers of survey ships, NPRs don't generate precursors and I think the chance of NPRs activating new NPRs is reduced. I'll have to check the details once I get home.
 

Offline sloanjh

  • Global Moderator
  • Admiral of the Fleet
  • *****
  • Posts: 2805
  • Thanked: 112 times
  • 2020 Supporter 2020 Supporter : Donate for 2020
    2021 Supporter 2021 Supporter : Donate for 2021
Re: Idea for Speeding Up Aurora
« Reply #4 on: September 08, 2014, 06:42:40 AM »
1) No detection
2) Automatic detection

My vote would be for auto-detection for two reasons:

1)  At least for NPR vs. NPR engagements, it makes up somewhat for the lack of "I" in "AI".  I assume that at present, if another race falls off an NPR's sensors in a system, the NPR completely forgets there was a ship there leading to e.g. "yo-yo" situations.  Perfect knowledge would solve this.

2)  With no detection, you could get weird situations where two NPR empires become intermingled until a player shows up, at which point they start shooting at each other at point blank.  I suppose this could be RP'd as war breaking out right when the player shows up, but still....

On the 5 second problem: How much of the 5 second problem is due to needing to check for changes to detection status?  My vague recollection is "a lot".  If you know that everything auto-detects, then you can change the code determining the next interrupt to take big timesteps when the missiles are far away from the targets.

John
 

Offline alex_brunius

  • Vice Admiral
  • **********
  • Posts: 1240
  • Thanked: 153 times
Re: Idea for Speeding Up Aurora
« Reply #5 on: September 08, 2014, 06:42:54 AM »
Why do you say this?  My reading of what Steve said is that the change here would only affect NPR, not player races.

Ah I missed that part! But it would still prevent explosions of NPR trade operations then.

Yes, I know. I implemented several of those ideas, so reduced numbers of survey ships, NPRs don't generate precursors and I think the chance of NPRs activating new NPRs is reduced. I'll have to check the details once I get home.
Niiiiice  ;D

My response is what you get for not updating the Changelog thread!
« Last Edit: September 08, 2014, 06:45:32 AM by alex_brunius »
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11669
  • Thanked: 20441 times
Re: Idea for Speeding Up Aurora
« Reply #6 on: September 08, 2014, 06:52:59 AM »
Ah I missed that part! But it would still prevent explosions of NPR trade operations then.
Niiiiice  ;D

My response is what you get for not updating the Changelog thread!

I thought it was in the released version but after checking the dates that doesn't seem to be the case :). I'll look at what I actually changed and update the change long.

Interesting point about the trade runs. Earth - Luna run is a mini-exploit but moving all trade checks, including for players, to 5-day increment would reduce its effectiveness and improve performance. The downside is generally reducing income from shipping lines overall (even for longer runs). I'll give that some thought.



 

Offline Whitecold

  • Commander
  • *********
  • W
  • Posts: 330
  • Thanked: 88 times
Re: Idea for Speeding Up Aurora
« Reply #7 on: September 08, 2014, 07:18:36 AM »
Just a thought from my side, automatic detection could also be a good alternative to the sensors disabled options for multi- faction starts.

My vote would go to automatic detection, because I fear weird situations of intermingled NPRs that turn hostile as soon as you show up, and even worse, take breaks if you retreat.
 

Offline Beersatron

  • Gold Supporter
  • Rear Admiral
  • *****
  • Posts: 996
  • Thanked: 7 times
  • Gold Supporter Gold Supporter : Support the forums with a Gold subscription
Re: Idea for Speeding Up Aurora
« Reply #8 on: September 08, 2014, 08:59:26 AM »
Auto Detection when NPRs are in the same system, then normal detection when a player enters would be my vote.

I like exploring and finding wrecks at battle sites :)
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11669
  • Thanked: 20441 times
Re: Idea for Speeding Up Aurora
« Reply #9 on: September 08, 2014, 09:45:08 AM »
1)  At least for NPR vs. NPR engagements, it makes up somewhat for the lack of "I" in "AI".  I assume that at present, if another race falls off an NPR's sensors in a system, the NPR completely forgets there was a ship there leading to e.g. "yo-yo" situations.  Perfect knowledge would solve this.

NPRs create 'Points of Interest' (POI) when they detect something. There are different types of POI depending on the contact type (neutral, hostile, transiting, etc.). NPRs assign these POIs a priority and when they have nothing more important to do (chasing a hostile for example or checking out a current contact), they will send ships to visit the POIs in priority order. Less urgent POI disappear after a while if they are not investigated.

 

Offline letsdance

  • Warrant Officer, Class 2
  • ****
  • l
  • Posts: 71
Re: Idea for Speeding Up Aurora
« Reply #10 on: September 08, 2014, 10:44:06 AM »
1) No detection
2) Automatic detection
would it be possible to set minimum intervalls for detection, too? like one detection check every day or every 5 days? and have no detection inbetween. as far as i understand it, this would reduce detection checks by alot, still allow NPRs to fight each other but not make it automatically.

otherwise my vote is auotdetection.

also support reducing calculation time for NPR civilian shipping lines. they recently got a wealth bonus anyways (removed costs for research), if that hurts their wealth a little, take that as compensation.
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11669
  • Thanked: 20441 times
Re: Idea for Speeding Up Aurora
« Reply #11 on: September 08, 2014, 11:35:59 AM »
would it be possible to set minimum intervalls for detection, too? like one detection check every day or every 5 days? and have no detection inbetween. as far as i understand it, this would reduce detection checks by alot, still allow NPRs to fight each other but not make it automatically.

You need to maintain contact in order to fight so occasional detection isn't really possible. It has to be all or nothing.

 

Offline letsdance

  • Warrant Officer, Class 2
  • ****
  • l
  • Posts: 71
Re: Idea for Speeding Up Aurora
« Reply #12 on: September 08, 2014, 12:11:52 PM »
the intervalls could be shorter after a successful detection to allow combat.

i assumed the sensor phase takes so long altough usually nothing happens.
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11669
  • Thanked: 20441 times
Re: Idea for Speeding Up Aurora
« Reply #13 on: September 08, 2014, 01:34:16 PM »
the intervalls could be shorter after a successful detection to allow combat.

i assumed the sensor phase takes so long altough usually nothing happens.

It's not quite as simple as that. Contact would have to be maintained on every sub-pulse of every increment or missiles would lose lock, for example. Also, how do you decide when to stop using the constant sensor phase and go back to occasional?

A lot happens during the sensor phase but you are only notified when the status of a contact changes. Of course, you have to check every sub-pulse or you wouldn't know when there is a status change.

 

Offline Haji

  • Captain
  • **********
  • Posts: 442
  • Thanked: 53 times
Re: Idea for Speeding Up Aurora
« Reply #14 on: September 08, 2014, 01:51:23 PM »
Interesting point about the trade runs. Earth - Luna run is a mini-exploit but moving all trade checks, including for players, to 5-day increment would reduce its effectiveness and improve performance. The downside is generally reducing income from shipping lines overall (even for longer runs). I'll give that some thought.

For my games the shipping lines income is generally relatively low so I wouldn't mind that. However I would prefer this to be an option rather than a set value. Alternatively you could just have a main menu option where a player can specify at what intervals should the trade runs be calculated.

As for the main topic on detection, I'll just repeat what others have said for statistical purposes - no detection means too much weird stuff will happen with NPRs, like two races establishing a colony on the same planet (maybe even on each other's homeworld) and then suddenly nuking all of them at once when the player arrives. Not exactly fun. As such I'd like this to be no more than an option for players to increase their performance at the price of the realism. I'd never use it though.