Code center > Bugs and fixes

Major shot and energy bug

(1/3) > >>

Elite:
Here you can see a fixed bot shot feeding


* It seems to have a non-integer amount of energy, body and waste. This is weird in itself
* Even though it just sits there feeding it isn't actually gaining any energy at allThere seems to be a strange violation of conservation of energy here
Some other strange things also happen, like a bot dying suddenly

I belive PY noticed that bots were not gaining energy from feeding and were dying suddenly

EricL:
The non integer amounts of waste, etc. are correct.  The way it works is that the engine maintains internal decimal quantities for all these things and rounds them to integers for the bot when they are put into the bot's memory.  But it is these internal values whcih are actually used by the engine for most calculations.  Most small bots will have mass < 1 for example, which will round to 0 often as far as the bot knows, but that bot still has mass, enertia, etc. as far as the engine is concerned.  What I did in this release was simply to remove the rounding for these values as displayed in the robot properties dialog.  In the next release, I'll cut off all but perhaps two places past the decimal point to make them more readable.

The energy thing may very well be a bug.  I have not had a chance to investigate this since PY noticed it.  One thing I have noticed which may be to blame is that since bots in 2.4 change size and an energy return shot has to actually hit the bot for the energy to be received, small/young bots can be at a huge disadvantage and exhibit what you see I.e. shooting, but loosing energy every shot cause the return shots miss them.

Anyway, it's probably still a real bug.  I'll investigate for sure, but probably not until this weekend.  Need a few days away from the code.

Henk:
I get this one, too.

Bot fire shots at vegs (and receive white shots), but their energylevels don't rise.

and sometimes -1 shots hit vegs but no energy comes back at all. (see screenshot)

[a href=\"http://img297.imageshack.us/my.php?image=dbbug8uh.jpg\" target=\"_blank\"]

EricL:
I'd be interested in knowing whether you can see the white energy shots coming back and actually hitting the bot or whether they miss and whether you can tell whether this has any impact on whether the bot receives energy or not....

Elite:

--- Quote from: EricL ---I'd be interested in knowing whether you can see the white energy shots coming back and actually hitting the bot or whether they miss and whether you can tell whether this has any impact on whether the bot receives energy or not....
--- End quote ---

AHA! Got it!
The -2 shots that come back have a limited range! So they just dissapear before they hit the bot!

However, there might be an entirely seperate bug that's causing the shots not to appear at all.
(ie. in Henk's screenshot)

Navigation

[0] Message Index

[#] Next page

Go to full version