This topic is just a place for me to keep track of the changes I make from one version to another, in this case from 2.42.7 to 2.42.8. It is not the complete list of stuff in the next drop (yet) just the stuff I have completed to date. I will edit this post as I complete changes and start a new topic for each new release.
If there is a zipped exe attached to this topic, it is a stable buddy drop which you are more than welcome to try. Such 'between release' exes will have letters following the release version e.g. 2.42.7a.
If you have feature requests or bug reports for this version, please report those as separate topics.
1) The Trash Compactor 'Maze" was stopping after one compaction cycle. Now it continues endlessly.
2) Changed maxShotArray and several other integer-valued varables used to index into the shots array to Longs so as lay the groundwork for having more than 2^15 shots in a sim.
3) Fixed a bug having to do with shapes absorbing shots. The test for shot inclusion in a shape was in the wrong place. Now if the option is enabled, shapes will absorb shots in the case where the shot is inside the shape, not just when it crosses an edge.
4) Tweaked shot/border collision detection. Shots fired parallel to the border were allowed to remain outside the field where in no shot decay mode, they would gather and slow the sim down. Now I set the shot position to the field edge in such cases when the field is not a torid as well as set the velocity correctly. This should keep shots in the field and allow for the possibility of bot impact at some point.
5) Drifting shapes kept their velocity after vertical or horizontal drift (or both) is disabled. Now shapes are stopped in their tracks (along the apporpriate axis) when drift is disabled.
6) Tienum now gets set to 0 after each cycle.
7) Added two new modes for incoming energy thresholds. Described
Here. Shape velocity was not getting zeroed when a new shape is created. Now it is.
9) Fixed an error in FrictionForces(). If Impulse < 0.00001 Then Impulse = 0 was actually If Impulse > 0.00001 Then Impulse = 0. Whoops.
2.42.7a Buddy Drop Download10) Fixed a minor bug with shot impact dots. An impact dot was being erronously displayed when an attempt to create a virus shot failed, resulting in mysterious cyan dots. I now correctly destory the half created virus shot in such cases without an impact dot.
11) MAJOR change in the way simulations are saved and loaded. SaveSimulation() was calling SaveRobotBody() for all bots in the bot array (5000 slots), saving a ton of data for every slot, even when most bots did not exist. This was totally bloating simulations files, making even the smallest of saved sims huge because they would contain 5000 bots, most of which .exist = false. This could also result in overflow bugs depending on the timing of when the autosave timer invokved SaveSimulation(). I've now changed it so that only existing bots are saved. This entailed changes to the "MaxRobs" value stored in the sim file (it now reflects the actual number of bots stored, not the size of the array) and also necessitated remapping tie numbers to the new numbers after bots are loaded. A new routine for doign the remapping - RemapAllTies() - was written and is now called during simulation loading. This routine needed the old bot number, which is now stred as part of the saved bot portion of the sim file. This change should prevent the timing related overflow crash but more interestingly, should make all sim files dramtically smaller for both manual and automatic saves.
12) In Vshoot(), the *shot* cost of making a virus shot was being multiplied by the vshoot value instead of subtracted. The virus cost should scale with the virus size, and .vhsoot shoudl and does cost energy relative to its value, but the actual act of shooting the virus should only cost the shot cost and not be multiplied by the vshoot value!
13) The mouse pointer now changes to an hourglass while sims are being saved or loaded.
14) Completed #2 above. Lots of additional Integer-> Long changes now allow essentially infinite numder of shots in a sim. Have tested to above 50000 shots. Should be no reason now other than perf and memory that it can't go to 50 million...
15) Shots array is now redimed 5000 at a time. Should help with the "array locked" bug.
16) Teleporter stuff enabled.
2.42.7b Buddy Drop Download17) Fixed a crashing overflow in CompareRobots2(). The Long valued var eyevalue could overflow when very very small bots were viewed. Now eyevalue is a Single and all is well.
18) Perf - shotpointer is now allowed to float. New slot searches for insertions in the shots array now starts from where the last insertion occurred.
2.42.7c Buddy Drop Download19) KillOrganism() was setting nopoff back to True!!!!! This had the effect of turning poffs back on whenever a multi-celled organism was killed, such as when it got teleported. Now the nopoff state is preserved and set back to what it was.
20) Initial size of the shots array is now 50. For sims such as null evo sims, which have few or no shots and few or no bot deaths, this should keep the perf impact from the UpdateShots() loop minimal.
2.42.7d Buddy Drop Download21) Intrasim teleportation lines were being drawn when the display was off. Now the line drawing obeys the no video option (though not the draw every 10 cycles option. Implementing this will be more difficult (and not save any perf).
22) Fixed a bug with 11 above. MaxRobs was getting set to MaxRobArray during sim load. This meant that the UpdateBots() routine was looping through all 5000 bot slots even though only a subset existed.
2.42.7f Buddy Drop Download23) More Integer-> Long changes in rob().virusshoot and VShoot(). Previous buddy drops can overflow if the virus shot is > 2^15.
24) Another one in AddGene.
25) PERFORMANCE - A bug in KillRobot was preventing the rob array from shrinking when the bot population in a sim shrinks. In the case where the last bot in the array dies, the array size was supposed to get dropped to the size of the next extant bot, but the loop to check this was looping one too many times and checking the last bot in the array, which still existed, thus preventing the array size from ever dropping. Now, the loop counts backwards from the end of the array. The array will shrink over time as designed as bots at the end die, which should have a significant impact on long run perf over time, reducing the number of iterations of the bot loops.
25) OVERFLOW - SonNumber in the bot structure is now capped at 32000 in the Reproduce routine. There are several Integer valued elements of this structure - such as Mutations - which should be changed to Longs. Not trivial, this will entail modifications to the bot save and load routines...
26) Slight tweak to shape collision detection to help prevent small bots from moving through them.
27) Fixed a typo bug in takenrg(). A small amount of an nrg shot should go to body. It was going to nrg instead.