Tabela de conteúdos
Tile Editor
In sBotics, the Tile Editor provides the ability to customize each tile of the arena, allowing fine control over the simulation environment. Additionally, you can import and export tiles as sTiles
or json
files for use in other arenas. Each tile comes with a set of default settings that can be adjusted to create unique and challenging scenarios.
The default settings of a tile are represented in JSON
format, as shown in the example below:
Basic Data:
"image": "https://cdn.sbotics.net/connector?_token=wdwMzUKdhGpNJIO6QRcFSKbCIh4RyDEa5LzDsYAw&cmd=file&target=fls2_VGlsZXMvc3RyYWlnaHQtbGluZS5wbmc", // Tile image "markable": false, // Allows manual checkpoints (deprecated) "has_checkpoint": false, // Indicates whether the tile has a checkpoint "is_ramp": false, // Indicates whether the tile is a ramp/incline "is_endgoal": false, // Indicates whether the tile is the final goal "rescue_zone": false, // Indicates whether the tile is part of a rescue room "enter_score": { ... }, "exit_score": { ... }, "random_type": "none" // Randomization type (none, straight, curve)
“image”
: URL of the tile image.“markable”
: Allows creation of manual checkpoints (deprecated).“has_checkpoint”
: Indicates if the tile contains a checkpoint.“is_ramp”
: Indicates if the tile is a ramp/incline.“is_endgoal”
: Indicates if the tile is the final goal of the arena.“rescue_zone”
: Indicates if the tile is part of a rescue zone.“exits”
: Defines the tile exits, controlling the direction the robot can move (read more below).“enter_score”
: Scoring Object for entering the tile for the first time.“exit_score”
: Scoring Object for exiting the tile for the first time.“random_type”
: Determines if the tile can be replaced by another type during arena randomization (using the “dice” button). Possible values:“none”
(default/disabled),“straight”
, and“curve”
.
Tile Exits
In the tile's JSON configuration, there is a very important setting for arenas with defined paths: the tile exits. Tile exits tell the simulator where to look for the next tile when following the path.
Each tile has 4 input sides and 5 possible exits: a
, A
, b
, B
, and blocked
(no exit on that side).
"exits": { "side_a": "exit_A", "side_b": "blocked", "side_A": "exit_a", "side_B": "blocked" },
In sBotics, the line formed by the arena starts from the final tile towards the “checkpoint-tiles,” with the last checkpoint found being the starting point for the robot.
The“side_”
entries represent the side from which the robot is supposed to exit the tile, while“exit_”
indicates the side the robot is expected to enter from in order to exit through that side (since “side” and “exit” references are reversed by design).
A classic example of this system is how a dead-end should be configured in the simulator:
It may seem confusing that entering through “A”
leads to exiting through “a”
on the previous tile, but considering we are tracing the path backwards, it actually makes sense.
Warning: On the Start Tile, all“side_”
entries must be set to“blocked”
.
Objects
Besides tile settings, the editor also allows you to add objects to the arena. These objects can have different types, rescue scores, and the ability to serve as evacuation points (evacuation_bonus
).
Object properties include:
- Material (
m
): Defines the object's color, using the available sBotics palette:White
,Gray
,Dark Gray
,Black
,Green
,Lime
,Teal
,Cyan
,Blue
,Purple
,Magenta
,Pink
,Red
,Brown
,Orange
, andYellow
.
- Type (
t
): Defines the object's shape. - Weight (
w
): Defines the object's mass (objects with a mass other than 0 are affected by gravity). - Reset Position: Enables whether the object resets to its initial position on every new attempt (valid only for non-static objects).
- Position (
X
,Y
,Z
): Defines the object's position in the arena. - Rotation (
X
,Y
,Z
): Defines the object's rotation (in degrees). - Scale (
X
,Y
,Z
): Defines the object's size. - Rescue Score: Sets the score for rescuing the object.
If the object is of type “Evacuation Point” (rescue area), you can specify bonuses for certain rescue types using a Scoring Object for each bonused object inside “evacuation_bonus”:
Example from a red rescue area in OBR arenas:
"evacuation_bonus": { "ObjectDeadVictim": { "points": 0, "multiplier": 1.4, "attempt_points": [], "attempt_multipliers": [] } }
To reference object types for rescue, use the naming scheme with the object's English name in PascalCase, preceded by “Object”: ObjectCuboid
, ObjectRescueKit
, ObjectLiveVictim
, etc.
If the object is of any other type, you can set a score that will be granted for rescuing it in any rescue area, using a scoring object:
"rescue_score": { "points": 0, "multiplier": 1, "attempt_points": [], "attempt_multipliers": [] }
To modify entire arenas, see Arena Editor.