Author Topic: Why 32000  (Read 1220 times)

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Why 32000
« on: December 15, 2009, 04:30:16 PM »
Im wondering why the limit to bots mems are 32000

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7722
    • View Profile
Why 32000
« Reply #1 on: December 15, 2009, 04:49:38 PM »
Bot memory is stored in 16 bit signed integers.  2^16 = 65536.  Divide that by two and you get 32768.  32000 is an easier number to remember so there you go.

Incidentally I'm not sure if the limit is actually 32000 or if that's just the number everyone uses to remember easily.  You could probably check pretty easily, though.

If you can think of a reason you'd want more than that I'm all ears

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Why 32000
« Reply #2 on: December 15, 2009, 04:52:46 PM »
I knew it would be something to do with bits because of the 32000 number. What will DB3 limit be on the memory locations

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7722
    • View Profile
Why 32000
« Reply #3 on: December 15, 2009, 04:58:52 PM »
Smaller.  Probably either 2520 or 3600.  There will also be the same number of sysvars (so each sysvar has a smaller range, but there's more of them).

The idea is that if you divide either of those numbers in to 360 you can do it evenly (so angles won't be rounded like they are now), and any valid sysvar value is also a valid memory location, so it makes pointer chasing more likely to evolve.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Why 32000
« Reply #4 on: December 15, 2009, 05:02:23 PM »
Yeh, the angles in this are a bit annoying but I have finally learnt them