Version 2.42.5 is now available! Direct Download Link.Major Changes /Features:Shot collision detection completely re-worked. Numerous issues with return energy shots, small radius bots, shot ranges and so on addressed in this version.
New sim energy calculations displayed on tray and a new energy graph added (See Below).
The .stifftie sysvar has been (re)implemented. There are now no *known* compatability issues with 2.37.6.
A detailed list of the changes from version 2.42.4 can be found
here.
A few words about 2.42.5.Shot collision should now be bulletproof (pun intended). If a collisoin should occur, the code now correctly detects a collision, even for fast moving shots and small radius bots. Fast moving shots should no longer be able to pass through bots in a single cycle to hit those behind, returning shots should now have the same effective range as those that initiated them and they should correctly begin their retrun journey from the point of impact. Be aware that the graphic radius as drawn for bots can be shown as slightly larger then the reality so shots which are displayed as passing through the very edge of a bot may, correctly, not actually impact in the underlying physics.
The new shot collision detection routine is more accurate and correct then the previous, but also more CPU intensive. Additionally, the "lifespan" of returned energy and body shots was doubled (their speed is half that of the initiating shot) so they hang around twice as long, increasing the average number of shots in a sim at any given time. The shot collision code is sensitive to the number of shots in the sim, so these two things may decrease the performance of sims with lots of shots (the tray now displays the total number of shots in the sim). I have done the best I can at speeding it up (and this version includes several other performance improvements in other areas designed to offset this) but anyone who wants to take a look at the routine and suggest ways to improve it is welcome to do so (NewShotCollision() in the Shots Module). It is very well documented, so people should not have too much difficulty folowing what I did. One of my goals for the next version is to do some profiling and make further performance improvements.
Note that I also changed the way cycles/sec is calculated so that it is now averaged over the past 10 seconds instead of being a snapshot of just the past second (it therefor may read funny for the first 10 seconds of a sim, either new or just loaded). This gives greater accuracy and resolution, particularly for larger slow running sims with cycles/sec in the low single digits or below 1. Additionally, I handle timer events in a lot more places in the code then before. This makes the UI more responsive and the timers more accurate so, again, especially for large, slow sims, the running time should better reflect reality. But this also may have the effect of displaying a lower cycles/sec than before. The sim may not be running any slower, it's just that cycles/sec is actually be calculated more accuratly. Note that running time still runs slow relative to real time. The whole way time and timer events are handled needs to be improved.
Lastly, the total energy in the sim each cycle is now displayed in tray along with an "Nrg Ratio". The goal here is to give you some idea of how much energy is flowing into and out of the sim each cycle. The Nrg displayed is the sum of all the energy and body (* 10) of all the bots in the sim at the end of the last cycle. Energy tied up in shots is not included until it is absorbed by a bot. Additionally, other forms of converted energy such as venom, posion and shell are also not included in the calculation.
The Nrg ratio is the ratio of the past cycle Nrg value over the average of the sim energy over the past 10 cycles. If the ratio is >1, the net energy in the sim is increasing. If the ratio is < 1, the net energy is decreasing. Note that events such as veggie repopulations can bring an enormous amout of new energy into the sim in a single cycle, playing havoc with the "smoothness" of the ratio calculation, so be sure to wathc for this if you are using this to try to maintain a certain energy average. Additionally, a new graph is now available which plots the total energy of each species over time. This can be used over longer periods to examine net energy flows and smooth out the massive inflows from re-population events.
As always, please bring bugs or other isuses to my attention.
Once again, and especially now that .stifftie is (re)implemented, I will also renew my call for people to test bots, especially multibots, from 2.36.7 and bring any behavioural differences between the versions to my attention.
Enjoy!