Space Patch Information


NameDateSpace VersionRequiresObsoleted
S70905.gz5-Sep-970.8.2-S70908

Description

The Portable Space Code sensor handling code discards and recalculates a double-linked list containing the range of each space object from the 0,0,0 point. This list is used to reduce the amount of effort expended when checking for proximity to other space objects.

This patch reworks the method used to update this sorted range list, and does not free and malloc very small structures to store one piece of information every space object requires. Entries in the list are shuffled around, rather than regenerated. Given that most objects will usually be moving at reasonable speeds, objects will not traverse more than a few places in the list. Therefore starting from the current location (which this patch does) should mean a lot fewer comparisons than scanning the list from the list-head.

Also in this patch is code to reduce to number of recalculations performed by keeping track of which space objects moved since the last sensor update.

The primary changes are:

I will out some benchmarks up here about the changes in execution time once I have gathered the numbers.

Installation Notes

  1. Download S70905.gz
  2. Change to your space directory (eg ~/mux/src/space)
  3. Uncompress the patch using gunzip -d S70901.gz
  4. Run patch < S70905
  5. Add -DS70905 to the CFLAGS line in the Makefile to enable this patch
  6. Recompile the space code
  7. Change to your mux source directory (eg ~/mux/src)
  8. Recompile your MUX
  9. Log into your MUX and @restart it.
  10. Check @version shows that S70905 is compiled in.

This code is provided as a service to the community using the Portable Space Code. By using this code, you agree that the author is not responsible in any way for the results.

This code is provided as a service to the community using the Portable Space Code. By using this code, you agree that the author is not responsible in any way for any damage caused.


Valid HTML 4.0! Maintained by Mark Cooke
Last Updated: Friday, 28-Nov-2003 10:52:47 GMT