Difference between revisions of "Thread:Talk:Cunobelin/Danger function/reply (10)"
Skilgannon (talk | contribs) m (Reply to Danger function) |
Skilgannon (talk | contribs) m (Edit: I misread that, it shouldn't have problems with different bits being worth different amounts, although you're limited to 8 values per attribute, if you want to stick 4 in an int.) |
||
Line 2: | Line 2: | ||
One thing to be careful of, ''don't'' test a gun against surfers if you want to know how good it is. In fact, if you gun is good at hitting surfers, chances are it will be pretty miserable at hitting regular random movement. Rather test against RaikoMicro, and check what [[CunobelinDC]] got in the rumble as a comparison. | One thing to be careful of, ''don't'' test a gun against surfers if you want to know how good it is. In fact, if you gun is good at hitting surfers, chances are it will be pretty miserable at hitting regular random movement. Rather test against RaikoMicro, and check what [[CunobelinDC]] got in the rumble as a comparison. | ||
+ | |||
+ | Edit: I misread that, it shouldn't have problems with different bits being worth different amounts, although you're limited to 8 values per attribute, if you want to stick 4 in an <code>int</code>. Gray codes should still work, and give you much finer granularity. |
Latest revision as of 18:31, 19 June 2013
That's pretty cool, reminds me of what I am doing in Cotillion's gun. Although, I think there would be problems with some bits being worth more than others unless you used some variation on Gray codes in your XOR. Perhaps doing the XOR, then disassembling the result and adding them back together as a single integer representing distance would be faster than simply using bitCount? Although, even then I think there might be issues with the distance metric not being correct.
One thing to be careful of, don't test a gun against surfers if you want to know how good it is. In fact, if you gun is good at hitting surfers, chances are it will be pretty miserable at hitting regular random movement. Rather test against RaikoMicro, and check what CunobelinDC got in the rumble as a comparison.
Edit: I misread that, it shouldn't have problems with different bits being worth different amounts, although you're limited to 8 values per attribute, if you want to stick 4 in an int
. Gray codes should still work, and give you much finer granularity.