Math Problems

For the last 2 days I’ve been encountering what to me were absolutely baffling problems with my scripts to create a dynamic creature population system.  I felt totally broadsided out of the blue at more points than I can shake a stick at.

For a while things seemed alleviated once I discovered that Realm Crafter rounds down all decimals to the nearest integer.  Needless to say, this wreaked havoc on my circular coordinate-to Cartesian coordinate conversions.  After I dropped the circular coordinate plan and just went with squares, things seemed to move along a bit better.

But then more mysteries reared their ugly heads, and, long story short, I located their source:  the math order of operations was not consitent.  I clearly identified it and it is indeed a bug.  Granted, there appears to be a way to work around this bug (use paretheses like they’re going out of style), but it’s still frustrating how many hours I’ve poured into this project so far, many of which I felt an absolute moron, all because there was were two devious bugs.  Makes me further appreciate a really good QA staff.

At any rate, after getting a crude set of scripts to work that appoximate a crude vision of the creature system, I have set about re-writing everything from scratch.  I learned loads from the first set, so I’m sure this follow-up set of scripts will be better.