Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » FreeStars » Efficient Algorithm for Scanning planets/fleets/etc.
Re: Efficient Algorithm for Scanning planets/fleets/etc. Wed, 07 February 2007 23:03 Go to previous messageGo to previous message
LEit is currently offline LEit

 
Lt. Commander

Messages: 879
Registered: April 2003
Location: CT
One thing I did in FreeStars is to keep a list of objects at each location, this is useful in a lot of areas and not hard to build and maintain as things move around.

One place it's useful is in scanning. If you check if one fleet/planet is in range, you know the whole stack of them are or are not in range. Then you have to check cloaking/tachyons...

The other thing you can do is quickly rule out some objects by checking if the x or y is out of range first. IOW, if the scan range is 100ly and the scanner is at 1000, 1000, anything beyond 1100 x or y is out of range, no need to calculate the exact range or cloaking/tachyon for that combination.



- LEit

Report message to a moderator

 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New stars! server clone proposal
Next Topic: 3D tool
Goto Forum:
  


Current Time: Mon Apr 29 09:01:40 EDT 2024