Author Topic: Understanding Collisions  (Read 3934 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Understanding Collisions
« on: May 24, 2005, 04:04:18 PM »
This is a quick bot that will help you understand the nature of collisions in DB.  Put it in a sim with veggies that get 40 energy per cycle, and you can get an idea of collisions at different mass differences.

Code: [Select]
cond
start
*.robage 100 mod
stop

cond
0 =
start
50 .up store
stop
end

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
Understanding Collisions
« Reply #1 on: May 24, 2005, 07:05:18 PM »
whats mod?   :unsure:

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
Understanding Collisions
« Reply #2 on: May 24, 2005, 07:09:27 PM »
okay I understand now :)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Understanding Collisions
« Reply #3 on: May 24, 2005, 07:09:42 PM »
Mod is a wonderful but never used command that came with 2.35.  Whereas div takes the quotient, mod takes the remainder.

Ie:  mod = modulos command.  5 6 mod is 5.  6 5 mod is 1.  (5/6 = 0 remainder 5.  6/5 = 1 remainder 1).

There are a few other never used commands as well.  pyth being an example (would be useful in complex vector manipulations.)

They're all listed in the readme for 2.35, as well as how they work.