Author Topic: Erratic ship positioning?  (Read 924 times)

Offline mindloss

  • Full Member Mark II
  • ***
  • Posts: 169
Erratic ship positioning?
« on: August 30, 2011, 07:17:01 pm »
It seems like when I order my ships around, they don't always set up at optimum range, which is the default behavior I would expect. For instance, if I order Raid starships to attack a special ops post, more often than not at least one of them will pull up right next to the thing and start firing away. This is bad because the Raid ships outrange the spec ops, and could easily shoot from back a little further. Same thing applies to most ships, although I've noticed it most with the Raid and Bomber starships... both of which are fast... leading me to think this may be an artifact/limitation of how movement is coded and checked for optimization. Is it that, or does the default behavior for ship positioning not care about ideal range in some cases?

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Erratic ship positioning?
« Reply #1 on: August 30, 2011, 07:26:20 pm »
If they are in a group, then anything goes -- they will position themselves in such a way that they all fit in the area that would be optimum range if there were only one of them.  There's nothing we can really do about that, as the position-checking stuff is already one of the most hugely complex parts of the game, and doing checks against range would just cause a computational explosion.  The code itself would be easy to write, but with so many ships it would result in game speed degrading exponentially during battles in particular.  Writing code like that which wouldn't be a CPU-killer is quite nontrivial.

In terms of a single ship that is ordered to go kill something, it will approach until it sees that it is in range to attack the target (actually, the same is true of multiple ships, too, but when they stop if they are on top of other ships they have to move somewhere nearby to shoot, and that might be too far in or out, causing them to get shot or move continually).
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline mindloss

  • Full Member Mark II
  • ***
  • Posts: 169
Re: Erratic ship positioning?
« Reply #2 on: August 30, 2011, 10:06:02 pm »
Okay... but I'm talking about (for example) a case that comes up a lot in my games where I will have three raid starships, a wide open area, and then right click a special ops post to attack. Seems like two of them usually stop around the right place, and one goes much too far, although I haven't been scientific about it.

Anyway, if I'm reading you right, this should only be a problem for larger fleets, and shouldn't be occurring in this 3-ship wide-open-space situation...?

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Erratic ship positioning?
« Reply #3 on: August 30, 2011, 10:14:14 pm »
It could easily happen with just three ships.  When they stop, they choose a direction at random to move in until they no longer collide, and in this case that might be into the line of fire.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline mindloss

  • Full Member Mark II
  • ***
  • Posts: 169
Re: Erratic ship positioning?
« Reply #4 on: September 01, 2011, 07:06:00 am »
Clarification on this: if I right-click-move three Raid ships to a location, they all get there and then scatter neatly slightly apart. It's when I right-click-attack something that one invariably goes charging in waaaay too far.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Erratic ship positioning?
« Reply #5 on: September 01, 2011, 08:27:07 am »
Hmm, sounds like it could be a bug then.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!