.mass
The bot's mass: it comes from the body, the shell and above all the chloroplasts, and decides how much each push moves it.
Facts
- Address
- 10
- Name
.mass- Kind
- Sense: the engine writes it for the DNA to read
- Group
- Body, energy and state
- Written by
- The engine, in the movement phase, before the purchases and conversions of the actions phase. You read it in the next cycle.
- Cleared
- No: the engine rewrites it every cycle.
- Range
- 1 to 32000; it comes from the body, the shell and above all the chloroplasts.
- Note
- A freshly loaded bot reads it as 0 in its first cycle.
- Mutations
- picked as a read (
*)
Mass is how much the bot weighs for the physics. A heavier bot accelerates less with the same push from .up, is harder to stop and, if there is gravity, falls harder (see Physics).
It comes from three things:
| What | How much it weighs |
|---|---|
.body | 1 per 1000 of body |
.shell | 1 per 200 of shell |
.chlr | almost 1 per chloroplast (0.99) |
The difference is huge: a typical bot, with 1000 of body, weighs 1, but as soon as it buys 500 chloroplasts it weighs about 500. That is why a bot loaded with chloroplasts responds very little to its own pushes. The value never drops below 1 nor goes above 32000.
It is read one cycle late, and besides, the engine computes it before applying the cycle's purchases and conversions: if you buy chloroplasts, the new mass only shows up two cycles later. A freshly loaded bot reads it as 0 in its first cycle.
' If it weighs too much, it sheds chloroplasts
cond
*.mass 100 >
start
100 .rmchlr store
stop