VB6 Aurora > Aurora Suggestions

Simplifying turn calculations: orbital elements

(1/2) > >>

nitrah:
I am curious how the locations of the planets and other orbiting objects are calculated under the hood.

I suspect (but could be wrong) that you are calculating X/Y locations for every object every time you hit the 5 day cycle.  I suspect this is the case just by the amount of churn which hits every 5 days and how it drastically increases as the game goes on.

If this is the case, I would humbly suggest you consider looking into changing the calculation process to using a modified orbital elements method of storing the location.

https://en. m. wikipedia. org/wiki/Orbital_elements

Because the game is two dimensional and you dont simulate orbital eccentricity, you could use semi major axis, starting true (or mean) anomaly, the amount of delta mean anomaly per 5 day period, and the date to store all X/Y information.  The only variable which changes per pulse is the date.  Then, you would only need to convert to X&Y if the player is looking at a specific system or if a player or NPR has a ship with orders to go to the orbital body.

I suspect this would significantly increase turn processing time.

Thanks

Steve Walmsley:
Orbital movement is done by calculating the change in bearing based on orbital period and passage of time and recalculates the new location based on distance and bearing from the sStar. What takes time is loading and saving from the DB and checking for orbiting fleets, etc.

For C# Aurora, there is no loading or saving during turn execution and fleets are flagged as requiring orbital movement when they enter orbit. I checked my current campaign (with 500 systems and 60,000 system bodies) and with asteroid orbits on, orbital movement dropped from three minutes to 0.1 seconds.

JacenHan:
Out of interest, how long did a Colonial Wars construction increment as a whole typically take in VB6?

QuakeIV:
I have had games where there are tightly orbiting planets, and the low granularity of orbital movement (it seemed to hit every construction cycle) could actually warp planets tactically significant distances and disrupt engagements between ships and oribtal defenses.  Is there any intention to alter this?

Steve Walmsley:

--- Quote from: QuakeIV on June 12, 2018, 09:15:47 PM ---I have had games where there are tightly orbiting planets, and the low granularity of orbital movement (it seemed to hit every construction cycle) could actually warp planets tactically significant distances and disrupt engagements between ships and oribtal defenses.  Is there any intention to alter this?

--- End quote ---

I could move orbital movement from construction phase to movement phase - depends if the game play gain is worth the performance hit. Although on current performance, it would probably be fine.

Navigation

[0] Message Index

[#] Next page

Reply

It appears that you have not registered with Aurora 4x. To register, please click here...
There was an error while thanking
Thanking...
Go to full version