Bots and Simulations > Tips and Tricks

Understanding Collisions

(1/1)

Numsgil:
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: ---cond
start
*.robage 100 mod
stop

cond
0 =
start
50 .up store
stop
end
--- End code ---

Light:
whats mod?   :unsure:

Light:
okay I understand now :)

Numsgil:
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.

Navigation

[0] Message Index

Go to full version