Posted by: AbuDhabi
« on: January 14, 2014, 11:42:59 AM »What exactly happened with the Belasco Commune?
Wow, you waited for the wrong time to reply on this one, Steve's actually made this exact change in the next patch :p.
Thank you steve, and thank you belasco commune for playing tag with those silly Russian Oscar class destroyer commanders.
It's also partly because a lot of the potential intercepts are far from simple. If your destination is a moon orbiting a planet that is orbiting a star that orbits another star which in turn orbits a third star (while taking lagrange points into account), then working out an intercept course is tricky. I found this when I had to do exactly that calculation in Newtonian Aurora (because constantly changing course is expensive in fuel) and also allow for acceleration and deceleration of a ship that is constantly losing mass (and therefore changing acceleration rate). As noted above, it isn't often an issue so it seemed like a look of effort to solve a minor issue.
Steve
For the vast majority of the game, it doesn't matter. Your ships move so much faster than the planets that you're not really losing much by direct chase. For the portion where it does matter (extremely slow, conventionally-engined commercial vessels in the early game), you can work around it by placing waypoints. That's what you have to do when trying to intercept enemy task groups, and I haven't heard anyone complain about having to manually work out those intercepts. In fact, that's a major part of games like this.
While it would be nice if the game predicted planetary positions and moved toward those, in most cases, it just doesn't matter. So I wouldn't call it "terrible," so much as "inconvenient." If you have an alternative implementation ready to go, why not submit to the Pulsar 4x group? The base functionality of Aurora is unlikely to be changed, especially in marginal cases like this.
Are you saying it is not terrible that pathfinding does not do any prediction for where the target they're headed for is going to be considering their speed?
This is extremely helpful.
So the database gets loaded into memory? That would be faster, yes.
it is unlikely that accessing disk-bound data would be faster.I would think it's in memory.
The reason that the X/Y coordinates are stored is so that you can have one function that sets where a TG is moving (or a mineral packet / missile /etc is being sent). That function just looks up the X/Y position of whatever target object (lots of tables in the game have an X/Y coord, and many also have a "last x" / "last Y" so that you can draw the movement trails as well).
As for the question about what happens if a planet / body moves when a ship is trying to go there, it depends on what order things happen during the production cycle. If planets move first, there is no problem, as the X/Y for the body will be updated before the ship tries to figure out how to get there. I would assume body motion comes first for this reason, but it's possible it may not. Just watch a slow conventional engine freighter trying to catch up with a planet and you will see that they aren't doing any kind of predictive motion interpolation. They just head directly for the body.
As for why to store X/Y for each object rather than calculate it on the fly each time, that should be obvious. Performing a calculation is almost always going to be slower than a simple DB lookup. When you compound this with potentially thousands of calcs/lookups every increment, it can get slow pretty quick.