Currently, tech numbers are stored in cores and transmitted between server and clients using "huge bitmasks".madpeople wrote:QUOTE (madpeople @ Sep 8 2007, 07:15 PM) more pre/def numbers too, 65 536 should easily be enough but 4 294 967 296 (4 bytes = int data type = 32 bits) could work too /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
code change, not core change /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
400 possible numbers means it's 400 bits (= 50 bytes) because we use 1 bit per number.
All objects except projectiles have at least 2 sets of 400 bits (stations have 3 sets).
4 294 967 296 diff numbers would require 4 294 967 296 bits, that's is 536 Mbytes just for 1 set... no way /laugh.gif" style="vertical-align:middle" emoid=":lol:" border="0" alt="laugh.gif" />
Eventually we could change code by not using "huge bitmasks" but a dynamic list of numbers instead but this might impact network traffic a lot.



