Author Topic: Error overflow!  (Read 3313 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Error overflow!
« on: December 03, 2006, 10:30:56 AM »
Selecting 'Bots can see shapes' immediately causes an overflow.  
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Error overflow!
« Reply #1 on: December 03, 2006, 01:24:50 PM »
Cool!  This crash occurs when the shapes position is being assigned to a bots refvars.  I neglected to add a check for shape positions > 32000 and didn't test shape visability on larger fields.  

Nice find.   Fixed in 2.42.9h.

At some point, we need to decide what we want to do when .xpos, .ypos, .refxpos, .refypos and so on exceed 32000....  It's not as simple as it sounds becuase it impacts things like angle...
« Last Edit: December 03, 2006, 01:25:32 PM by EricL »
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Error overflow!
« Reply #2 on: December 03, 2006, 04:08:55 PM »
My vote is still for dividing xpos and ypos by 120 (the default robot diameter).  It's not a 100% solution, but it does extend the range from 32K to 3.8 million.  If we then use -32000 to 32000 (with 0,0 being the center of the simulation instead of a corner), we can double this to about 7 and a half million.

On the other hand, I'm leaning towards removing all the "absolute" references bots have.  Originally they were created to allow for ant bots.  But a pheremone trail feature would supplant the need for any absolute references.
« Last Edit: December 03, 2006, 04:10:03 PM by Numsgil »

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Error overflow!
« Reply #3 on: December 03, 2006, 05:32:39 PM »
I vote for removing absolute references on the basis that they are unrealsitic.  Replacing them with relative references would be fine.
Many beers....

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
Error overflow!
« Reply #4 on: December 03, 2006, 06:02:32 PM »
I agree, couple absolute references with the new eye sysvars is turning bots into laser guided machines, though this would cause problems with some bots
« Last Edit: December 03, 2006, 06:11:53 PM by Light »

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Error overflow!
« Reply #5 on: December 03, 2006, 06:22:27 PM »
I agree, makes more sense.
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Error overflow!
« Reply #6 on: December 03, 2006, 10:28:42 PM »
Good, I was afraid I was going to have a debate on my hands