Crazy Ideas
The highlighted comment was created in this revision.
First, we initialize integer to 255 to save a byte. :)
Then, in the PM code we use (integer = integer >> 1)
, instead of (integer = integer - 1)
.
If I'm right (which I rarely am), this would be smaller, faster and smarter. How does it sound to you?
Hmm, for some reason, under Jikes, both of those changes add a byte of codesize. Any number above 127 takes an extra byte, and >> is one more byte than --
So, if we do it just like Toorkild and use 64 as the initialization value, and use integer /= 2
instead of --integer
, we should break even at 249 bytes, right?
Also, I think we should try using power-3 bullets, or at least go back to power 2.6667. I think 2.33333... is a little too soft for a bot with such an aggressive movement.
If the changes work, then go ahead and release version 1.0.4.
integer/=2 takes an extra byte from --integer, but if we switch our bullet power to 3 we have that byte to spare. I'll package it up and release.
I think the higher bullet power made it waste energy quicker, giving it an extra loss or two, which pushed a bunch of bots over into the random movement instead of orbit/oscillate.
One thing I noticed while watching battles was if it starts from very far away it does loops instead of settling for a nice orbital movement. I'm thinking of decreasing the turn amount caused by the distancing, especially as it isn't as sensitive to that now that the gun can handle any distance correctly.