Code center > Bugs and fixes
Got bots that behave differently in 2.37.6 and 2.42.4?
EricL:
--- Quote from: Endy ---Maybe just adding a button to stop drawing them would be best. Then players could hide them for some increased speed.
--- End quote ---
It turns out that doing the actual drawing of stuff in DB is not all that CPU intensive relative to the rest of the code. Oh sure, if you have a small sim, then the drawing part is a reasonable fraction of the total computation and turning off the graphics results in a noticable increase in cycles/sec. But for large sims, it's in the noise. The time it takes to draw stuff is linear to the number of things being drawn with a small constant overhead for each thing (e.g. each tie, bot, shot). But the vast majority of stuff in the sim needs to be calculated whether graphics are on or not and some of those things are worse than O(N) ((I.e. nonlinear - doubling the number of bots needs more than double the number of CPU cycles because the number of possible interactions - who sees who, ties, shots, etc. increases faster than 2X). Shot collision for example is proportional to both the number of shots and the number of bots in the sim, though there are a lot of perf shortcuts now that make it a lot better then O(N^2). So, the computation time it takes for the sim as a whole increases non-linerally with the size of the sim and the physics calculations, etc. become a larger and larger percentage of the total CPU time as the sim size increases.
So, not drawing shots saves very little. You still have to keep track of them, do all the math to figure out collisions, release energy, etc.
Bottom line, drawing stuff is easy. Figuring out what to draw, now that's hard...
Elite:
Helios, Light's legendary MB, doesn't work in 2.4
It just doesn't form 4-cell MBs like it's supposed to
Numsgil:
Dollars to donuts it has to do with the more dynamic sizing in 2.4. That's where I'd concentrate my debugging efforts.
Endy:
Not sure if it's been fixed yet, but I figured out what was causing the mysterious poison shots to be returned on occasion by bots/walls without any poison. It's caused by shots again near the end of their lives, apparently with nrg being just below zero, these would cease existing next cycle but I guess they're not caught in time. Anyways the oddball poison shots returned don't have any real nrg or poison, so don't compose a major threat.
Added right before the poison shot generation area:
If nrg <= 0 Then GoTo exitsub
Did the trick and stoped them from forming
Also found another minor bug in shots, allowing walls to receive stray shots, giving them nrg and waste. Probably at least part of the reason they keep occasionally dieing on me.
Added some code to check that a bot isn't a wall in the -2 shot case handling section to correct for it.
Something else is also going though, I had a mutant TheOne figure out a way to kill them in a single shot. Sneaky bots, I'm going to try and trouble shoot where the problem is.
EricL:
--- Quote from: Elite ---Helios, Light's legendary MB, doesn't work in 2.4
It just doesn't form 4-cell MBs like it's supposed to
--- End quote ---
Well, first off, .stifftie is not implemented in 2.42.4. But that is only part of it.
The main issue is that unless I am mistaken, Helios should not work in any version and the fact that does in 2.37.6 is a bug. It attempts to use .fixlen, .fixang and .stifftie well before it is a multibot, like at .robage 2 and 3. My understanding (as PY says very adamantly here) is that these sysvars should not work unless a bot is a multibot and that bots arn't multbots until a tie has hardned and the only way a tie can harden is for it to exist for 20 cycles so that is what the 2.42.4 code enforces.
So, the reason it is not forming 4 bot multibots ( I think) is that it expects to stiffen the tie to its first offspring and fix it's length to move the offspring away to make room to reproduce again at a specific age , but of course this does not work (by design) so the other offspring can't be born on the cycle it wants them to because it's first baby is still in the way adn this messes it up.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version