Author Topic: 2.42.5 Changes  (Read 1732 times)

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
2.42.5 Changes
« on: May 15, 2006, 11:09:55 AM »
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.4 to 2.42.5. It is not the complete list of stuff in the next drop, 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 you have feature requests or bug reports for this version, please report those as separate topics.

1) Fixed a divide by zero problem with virgin installs.  In the case where recent builds (post the fixes to settings file formats) are added on top of a virgin 2.11 install and no LastExit.set exsits, the chartingInterval parameter was being incorrectly read in from default.set as 0 causing a divide by zero error.  Not a great first time expereince.  This had been fixed previously in the sim file load path, but not the settings file load path.  Now when 2.42.5 is installed on top of a virgin 2.11 install, things work as expected.
2) The simulation option MaxVelocity was not being saved or loaded from sim and settings files.  Now it is.
3) If you run a sim that was saved on a different machine with a different installation path or you don't have the robot txt files for that sim on your machine, then when the engine needs to load new bots (as opposed to bots reproducing) such as when auto-repopulating veggies, an endless series of message boxes could appear telling you the robot path is invalid.  These endless message boxes steal the focus and make it difficult even to close the program.  Now when a bot path is found to be invalid, the path is set to "Invalid Path" and the code checks for this to avoid the endless dialogs.  Also added a different msgbox informing the user (each time) of the invalid path if adding such a bot manually is attempted via the insert bot dropdown.
4) Added some string manipulation for species path names in the sim load routine so that the pathes to bot files are now potentially modified to point to the local install point instead of whatever the main directory was on the machine where the sim was saved.   Net net is that if you load a sim from someone else and the sim needs the original bot text files (for example when you explicitly add bots manually or when veggies get low) the program will now look for a path relative to the local main directory as opposed to the path from the machine where the sim was saved.  Putting the appropriate bot files into your \robots directory should be enough to get things to work in most cases.
5) Added a new shot collision detection routine which takes into consideration both bot and shot motion, shots which pass completely through a bot in a single cycle and shots and bots of arbitrary speed.  See this topic for details.
6) Doubled the lifetime of returned energy shots and body shots to make their effective range in terms of distance on the field equivalent to the range of the shot that invoked them.  See the linked topic in #5 for details.
7) Fixed a bug where shot collisions on their last cycle of life where not being registered.
8) Fixed a bug where returning shots (of any flavor) were not begining from the point of impact but were instead beginning where the shot that caused them would have been at the end of the cycle on which the collision was detected.  See the linked topic in #5 for details.
9) Perf improvement in VectorMagnitude().  Removed an uncessary condition.
10) Perf improvement  in DrawRobAim().  Moved conditional to test for walls, etc. up front.
11) Fixed crashing bug when Cancel is selected from the robot file browse dialog.
12) Trimmed all the robot properties displayed in the robot properties dialog so as to display only 2 digits after the decimal place.
13) DoEvents() now called every 500 shots in UpdateShots() to make the UI more responsive during this very CPU intensive routine.  This should also help address issues with the sim time running counter and cycles/sec display not being accurate.
14) Added number of shots to the tray and general tray field sizing clean up.
15) Added condition in takenrg() and other shot routines so that walls and corpses can't absorb energy shots, waste shots, venom, etc.
16) The total energy in the sim is now calculated each cycle and displayed in the tray as is the "NRG Ratio" which is the ration of the energy in the current cycle to the average energy in the sim over the past 100 cycles.  Note that this ratio will be incorrect during the first 100 cycles of sim execution either for a new sim or one loaded from a saved sim file.  
17) As part of the process of adding feature 16, lots of violations to conservation of sim energy were discoverred and in some cases addressed.  Mainly, these are places in the code where a bot near the end of it's energy is allowed to shoot or give off a shot or otherwise perform some operation which requires more energy than it has.  The shot or whatever is created, perhaps with some default minimum (which could exceed the bot's energy level) and the bot's energy set to 0, resulting in a net increase in sim energy.   There are similar cases where a bot does not have enough energy to create a shot given the shotcost, or similarly perform other operations, but is allowed to anyway if their energy is set to 0.  The code still allows this in some cases, but the total energy calculation takes it into consideration.  Thus, while sim energy can be created this way, the energy total will reflect it.
17) Improved the cycles/sec counter calculation so that it now averages over the past 10 cycles, displaying a more accurate number, particularly in larger, slower sims.  Note that cycles/sec may be inaccurate during the first 10 seconds after a sim is loaded.
18) Added a new graph with displays the total energy for each species.
19) Implemented the .stifftie sysvar.  The specific underlying values for tie elasticity will likely need to be tweaked in subsequent versions.
20) Perf Improvement.  Modified CalcStats() so that graph data is only calculated for the graphs which are currently visable.
21) Small tweak so that now any negative waste threshold level, not just -1, effectively turns off altzheimers.
22) Perf Improvement.  TieHooke() and TieDragForces() now check for .numties > 0.
« Last Edit: May 26, 2006, 11:46:25 AM by EricL »
Many beers....