Changes between Initial Version and Version 1 of Ticket #1425, comment 9


Ignore:
Timestamp:
Jan 6, 2013, 7:51:20 AM (11 years ago)
Author:
zoot

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1425, comment 9

    initial v1  
    11Replying to [comment:5 quantumstate]:
    22> I'm also concerned about efficiency.  Your damage rate algorithm is n^2^ with n being the number of attacks in a 5 second period.  With units attacking once per second, in a large battle we could have a lot of attacks happening.  It should be fairly easy to store damage per turn instead.
    3 I've [https://github.com/zootzoot/0ad/commit/29dbcebd481b3d79d8e4cf9301fe4bbcf8b44258 done this]. Instead of recording damage per attack, it now records damage per timer period.
     3I've [https://github.com/zootzoot/0ad/commit/29dbcebd481b3d79d8e4cf9301fe4bbcf8b44258 done this]. Instead of recording damage per attack, it now records damage per timer period. (Edit: I subsequently did [https://github.com/zootzoot/0ad/commit/7f4d875f0f57dea0c6f687f725625d973fb09cce this] logic fix to the damage rate calculation.)