Parameters: Field and edges
The size of the world and what happens at its edges: walls, or connected sides so that whatever leaves through one comes back in through the other.
This group decides how much world there is and how it ends. It has five parameters: the width and height of the field, and three switches for the edges. In Experiment's basic mode the same values are chosen with two controls, Field size (the fifteen classic sizes and the Classic base one) and Edges (walls, toroidal, or one of the two cylinders); here they show up separately and you can set them by hand.
Size matters more than it looks: a large field spreads the same population over more surface, so bots meet each other less often and vegetables get more light (see photosynthesis). The edges change the geography: with walls there are corners to get cornered in and a floor where whatever falls piles up; with connected sides there is neither. How a bot behaves against a wall is covered in the edges of the world, and the overall picture of the world in the field.
Field width
In twips; 32000 is the default world.
- Default
- 32000
- Usual range
- 1000 to 2304000
- Variable
FieldWidth- Key
base:fieldW- Live
- needs a new simulation
- Mode
- advanced only
The width of the world, in the same units used to measure positions and speeds. The app starts at 32000; the F1 league base sets it to 9237. It is the only parameter in this group that is not applied live: changing it needs a new simulation.
Up to a width of 32000, .xpos reads the position as it is. In a wider field, the engine scales it down proportionally so it fits between 0 and 32000: in a 64000-wide field, a bot at the right edge reads about 32000, not 64000.
Field height
In twips; 32000 is the default world.
- Default
- 32000
- Usual range
- 1000 to 1728000
- Variable
FieldHeight- Key
base:fieldH- Live
- needs a new simulation
- Mode
- advanced only
The height of the world. The vertical coordinate grows downwards, and the bot reads it as depth in .depth; as with the width, in a field taller than 32000 the reading is scaled down proportionally. The app starts at 32000 and the F1 league uses 6928. It also needs a new simulation.
Height matters more when there is gravity (Y gravity (downwards)), because the floor is the bottom edge, and in pond mode (Pond mode (light by depth)), where the light drops one step every 2000 units of depth (see photosynthesis).
Toroidal (both axes)
Connects top↔bottom and left↔right at once.
- Default
- no
- Usual range
- yes / no
- Variable
Toroidal- Key
opt:1- Live
- can be changed while the simulation runs
- Mode
- advanced only
- Note
- Derived: it is 1 when both axes are connected. Edit the axes (or the «Edges» control).
It is a shortcut: it reads “yes” when both pairs of edges are connected, and then the world is a torus, with no edges in any direction. In the app it can't be edited: it is derived, and you change it with the two parameters below or with the Edges control in basic mode (the Toroidal option). The F1 league base connects both axes.
Top ↔ bottom connected
What leaves at the bottom enters at the top.
- Default
- no
- Usual range
- yes / no
- Variable
Updnconnected- Key
opt:2- Live
- can be changed while the simulation runs
- Mode
- basic and advanced
It connects the top edge with the bottom one: whatever leaves through one appears through the other at the same speed. It applies to bots, to whole multibots (they cross in one go, without stretching the ties) and to shots. When it is off, the two edges are walls: the bot ends up leaning against the wall, slowed down, and reads .edge as 1.
Watch out if you use downward gravity (Y gravity (downwards)): with this axis connected there is no floor, and bots fall forever, reappearing at the top. In pond mode, buoyancy (.setboy) also only works with this axis not connected (see gravity, ponds and tides). With the Edges control, it is the Cylinder (top↔bottom) option.
Left ↔ right connected
What leaves at one side enters at the other.
- Default
- no
- Usual range
- yes / no
- Variable
Dxsxconnected- Key
opt:3- Live
- can be changed while the simulation runs
- Mode
- basic and advanced
It connects the left edge with the right one, in the same way. A bot that keeps moving right in a field with walls ends up stuck against the edge; with this axis connected it goes around the world again and again (the example is in the edges). With the Edges control, it is the Cylinder (left↔right) option.
With random sun (Random sun (weather)), the lit strip also wraps from one side to the other when it leaves the field, whether or not you connect this axis.