The general view of the level editor is shown in Figure 1:

Figure 1 - General view of the level editor
The editor consists of three areas (Figure 1):
- Main panel
- Toolbar
- Working area
To allow you to working with the areas that extend beyond the limits of the in-game area, the editor allows you to move the working area using horizontal and vertical scrollbars.
The main panel has three tabs:
- Object
- Lib
- Anim
The toolbar features the following object management tools:
- Add object
- Select object
- Create Path
- Select Path
- Edit Path
- Batch Moving
2.1. Objects tab
This tab contains the tool for creating campaigns and levels.All changes are saved automatically, but you can use the “Save” button to save the data manually. All levels should be created within campaigns. The list of available campaigns is accessible through a dropdown menu (Figure 2):

Figure 2 – List of campaigns
- New campaign
- Delete campaign
- Campaign settings
- Send campaign
To create a new campaign, press the
button.
The new campaign is added to the list of campaigns and becomes active under the default name: campaign <campaign number>.
To delete a campaign, select it in the list and press the
button.
After the campaign is deleted, all the levels in this campaign are deleted as well!
Figure 3 – Campaign parameters window
This window allows you to edit the following parameters:
- Brick template for the «Bonus bricks» bonus
The creation of levels is the main purpose of the editor. Prior to creating any levels, you must select an existing campaign or create a new one (see 2.1.1. Campaigns).

Figure 4 – List of levels
- Move the level up
- Move the level down
- New level
- Delete level
- Level settings
To create a level in the selected campaign, press the
button. The new level will appear on the level list with a default name level <level number> and become active.
To delete a level, select it in the list and press the
button.
To edit the main level settings, press the “Level parameters” button. The level parameters edit window will appear in the working area (Figure 5):

Figure 5 – The level parameters edit window
This window allows you to edit the following parameters:
- Level ID
- Background
- First effect
- Script
- Settings of the “Bonus Brick” bonus
- Settings for the “Random bonus” bonus
- Directed light on the level with the following parameters:
- Direction vector (X,Y coordinates)
- RGBA of the light source (Red, Green, Blue, Alpha)
- Shadow alpha
- Shadow distance
- The “Board shadow only” option
Each level consists of a tree of objects, which is displayed in the level object window (Figure 6):

Figure 6 – Level objects window
This tree contains the following information:
- Level layers with objects (groups of objects)
- Paths
The tree allows you to drag elements using your mouse (drag-and-drop).
Layers contain all of the major elements of the working area, such as brick templates, special objects, light sources, etc. If no layers have been created on the level, the user cannot place any bricks in the working area.
To make a layer active, just click the corresponding line.
2.1.3.1. Creating layers
When the “Add layer”
button is pressed, a new layer called layer <layer number> is created and placed above all previously created layers.
2.1.3.2. Removing layers
To delete a layer, select it in the tree and press the “Del” key on your keyboard.2.1.3.2. Changing the layer order
You can change the order of layers by dragging them up or down relative to their default position. A horizontal line will appear inside the objects window that will mark the new position of the layer. This line moves when the mouse is moved. Once the mouse button is released, the layer will take its new position.
2.1.3.3. Adding bricks to a layer
The elements are added to the working area from the library (see “Lib”).To add bricks, choose the “New object” tool, select the necessary bricks in the list of templates (or create new ones in the brick template editor) and put them onto the working area by pressing the left mouse key. The bricks will be placed on the selected layer or on the top layer if no layer is selected.
The sequence of objects in the list corresponds to the order of object rendering in the working area. The objects that lie deeper are located in the lower part of the list. The objects from the upper part of list are located above others. To change the sequence of objects, drag the lines using your mouse.
To animate several bricks as one object, you need to add them to a group.
Only static bricks can be united in a group!
When a brick is added to a group, its physical property will be changed to “Physical Static.” This property cannot be changed to anything else for a brick in a group (see 4.4. Changing brick parameters)
2.1.4.1 Create/modify
To add a group, press the “Add group“ button:
.
A new group will appear either on the current layer or, if the objects are located on different layers, at the beginning of the highest layer on which the selected objects are located.
If there were two or more selected objects (or groups) when a new group was created, they are moved to a new group (otherwise, the group will be created empty). If elements of other groups or whole groups are added to a new group, they are moved to it. (Group nesting is not supported).
The order of object in a group is the same as the order of objects before they were added.
You can add objects from any layer of the current level to the newly-created group using drag-and-drop (similar to moving layers).
2.1.4.2. Deleting groups
To delete a group, select it in the group list and press the “Del” key on your keyboard.
2.1.4.3. Ungrouping
Any group can be disbanded. To do that, select the necessary group in the tree and press the “Ungroup” button:
. All the objects of the selected group are moved to a higher level (layer level), with the same object order, and the group is deleted.
To be able to work with several bricks as with a single object, you can add them to selections.
To create a selection, select several bricks in the working area and press the “Add selection” button:
. Selections appear in the object tree as a separate Selection node. When the selection is clicked in the tree, the bricks comprising the selection are automatically selected.
To change the selection identified, double click it in the tree and rename it in the parameter editing window that pops up (Figure 7):

Figure 7 – Selection parameters
This tab contains the brick templates library.
Buttons:
- start the brick template editor
- create light sources
You can use several filters to find the necessary template:
- Settings filter (both standard and user settings are displayed)
- Brick shape (rectangular, triangular, circular)
- Number of lives (1,2,3, unbreakable)
The search results are shown as an image list (Figure 8):

Figure 8 – The list of brick templates
- Select the “Add Object” tool (or press “1” on the keyboard)
- Choose the brick template by left-clicking on the list
- Move the cursor to the working area and press the left mouse button. The brick texture will appear in the specified location. (The coordinates of the object center will be defined by the coordinates of the cursor during the click.)
The ID of the added textures will appear in the campaign tree.
To change object parameters, do the following:
- Select the “Select object” tool (or press “2” on the keyboard)
- Double-click the object
- Set the necessary parameters in the opened window
To add a new brick template, press the “Brick template editor” button. The brick editor window will open in the working area (see “Brick template editor”). All templates added through the editor appear on the brick templates list.
You cannot use the brick template editor to delete a template already used in a level!Brick textures are bricks without physical properties.
You can choose from several template filters:
- By settings (both standard and user settings are displayed)
- By brick shape (rectangular, triangular, circular)
The selected brick textures are shown in a list (Figure 9):

Figure 9 – Brick textures
To place a brick texture onto the working area, do the following:
- Choose the “Add object” tool (or press 1 on the keyboard)
- Choose the texture in the list by pressing the left mouse key
- Move the cursor to the working area and press the left mouse button. The brick texture will appear in the specified place. (The coordinates of the object center will be defined by the coordinates of the cursor during the click.)
The ID of the added textures will appear in the campaign tree.
To change object parameters, do the following:
- Pick the “Object selection” tool (“2” on the keyboard)
- Double-click on the object
- Set the necessary parameters in the opened parameters window.
There are unique objects for each setting in the game. These elements are not bricks and have their own set of parameters.
Figure 10 – Special objects
To place a special object in the working area, do the following:
- Choose the “Add Object” tool (or press “1” on the keyboard)
- Select an object in the list by pressing the left mouse button
- Move the cursor to the working area and press the left mouse button. The image of the special object will appear in the specified place. (The coordinates of the object center will be defined by the coordinates of the cursor during the click.)
The ID of the added textures will appear in the campaign tree.
To edit object parameters, do the following:
- Choose the “Select object” tool (or press “2” on the keyboard)
- Double-click an object
- Set the necessary parameters in the new window
This tab offers the following animation tools (Figure 11):
Figure 11 – Animation tab
- add a keyframe to the timeline
- remove a keyframe from the timeline
- create animation between keyframes
The “Animation behavior” list defines the type of animation playback.
If the “Default animation” option is checked, default animation will be automatically created between keyframes.
To enable the timeline, check the “Show Timeline” option.
For a detailed description of animation parameters, see chapter 6, Object Animation.
The tab also displays the total number of bricks on the level.
The tab contains the following tools for managing objects in the working area:
- Add object
- Select objects
- Create path
- Select path
- Edit path
- Batch moving
You can switch between these tools using keys 1-6, respectively.
The working area of the editor is the future gaming area of the level. That’s where the main level creation work takes place. This area is the size of the gaming area in the actual game.
While creating a level, you can add bricks and light sources to the working area. Once you add them to the working area, you will be able to use your mouse to change their position and size, and select a specific object or a group of objects.
4.1. Selecting bricks on the working area
4.1.1. Bricks and arbitrary groups
When you select a brick or a group of bricks (not an existing one, but an arbitrary one) in the working area, a rectangular selection appears around the brick or group of bricks (Figure 12-13). You can transform the brick (bricks) using this rectangle.
Brick transformation is carried out with the help of markers located on the selection frame. Each marker is responsible for a specific function. For instance, corner markers allow you to rotate an object. If the Ctrl button is pressed dusting the brick rotation, it is performed with a 15 degree step.
Figure 12 – Brick selection

Figure 13 – Selection of a group of bricks
Apart from the selection frame with corner markers, the brick (group) center is marked by the transformation point. The coordinates of this point are set relative to the center of the brick (group), which is initially equal to zero. The transformation point can be moved anywhere within the working area.
Possible operations with a selected object:
- Move (both with the mouse and keyboard)
- Rotate (relative to the transformation point)
- Change horizontal size (not for object groups)
- Change vertical size (not for object groups)
- Change both dimensions
To remove a brick, press the “Del” key on the keyboard.
Each group is an object with group center parameter. The group center is marked by the following icon:
All group centers are shown on the working area for both selected and unselected groups (Figure 14).
To start working with a specific group, choose it in the tree or click the center point of an existing group in the working area.
Figure 14 – Groups and group centers
There is a selection rectangle around the center of the active group. Use it to move or rotate the group.
Groups rotate around the transformation point in the center of the selection rectangle. The coordinates of this point are set relative to the center of the brick (group), which is initially equal to zero. The transformation point can be moved anywhere within the working area.
When double-clicked, the group center icon shows the group parameters window.
While creating levels, you might need to place objects in a line or with even spaces between them. For these purposes, the level editor features combinations of keys that significantly simplify object alignment:- Ctrl +H -- horizontal alignment
- Ctrl +T -- vertical alignment
- Ctrl+Alt+H -- horizontal alignment with even spacing
- Ctrl+Alt+T -- vertical alignment with even spacing
- Ctrl+M -- flip horizontally
- Ctrl+Alt+M -- flip vertically
4.3. Copying objects in the working area (bricks and groups of bricks)
You can copy the bricks or groups of bricks on the same level using the “Alt” key.
Here’s what you need to copy an object:
- Select a brick or a group of bricks in the working area or the object tree.
- Press Alt (this is the moment the copy is created).
- Holding the Alt button, move the copied brick (group of bricks) to the necessary location in the working area.
The copy of the object will have the following ID in the object tree: <id_of the copied objects> copy ( <copy number >)
Placement of object copies (bricks or groups of bricks) in the object tree:
- When a single object is copied, the copy will be placed on the top position of the layer containing the copied object.
- When several objects are copied from a single layer, object copies will be placed on the top position of the layer in an order corresponding to the order of copied objects on the layer.
- When several objects are copied from different layers, the copies will be placed on the top positions of the corresponding layers.
- When a brick belonging to a group is copied, the copy will be placed on the top position of the group.
4.4. Changing brick parameters
Double-clicking on a selected brick will open the brick parameters edit window (Figure 15):

Figure 15 – Brick parameters
You can change the following brick parameters:
- ID
- Union ID – used in scripts to operate several bricks at once (bricks within a single union)
- X and Y coordinates (relative to the object center)
- Size
- Width – equal to that of the brick template by default
- Height – equal to that of the brick template by default
- Color and transparency (Red, Green, Blue, Alpha)
- Brick mass (Mass). The default value is specified in the template.
- Rotation angle (Angle)
- Score point for destroying the brick (Score). The default value is specified in the template.
- Hit points of the brick (Hit point)
- Physical characteristics of the brick (Physical state):
- Can move and rotate (PhysicalDynamic)
- Cannot move, but can rotate (PhysicalRotation)
- Can move, but cannot rotate (PhysicalMovement)
- Cannot rotate, motion restrained to the vector (PhysicalRestrainMovement)
- Cannot move and rotate (PhysicalStatic)
- Lighting ratio (Light). default value is specified in the template
- Brick template
Several filters will help you select the necessary brick template:
- By settings
- By brick shape (rectangular, triangular, circular)
- By the number of lives (1,2,3, immortal)
- By flags
- Snapping to path (Snap). Available for an active object; if the option is checked, a list of id’s of existing paths becomes available).
- Flags (checkboxes):
- Not required to complete the level (not needed to win)
- Absolutely unbreakable (immortal)
- Ignore ball
- Ignore bricks
- Brick bonuses – opens the bonus edit window (Figure 16).
Each bonus assigned to a brick has a certain chance of being dropped when a brick is destroyed. The total probability of a bonus being dropped should exceed 100%.
Figure 16 – The brick bonus edit window To assign a bonus, you need to:
- Press the “Add Bonus” button and see a selection of available bonuses.
- Choose a bonus and specify its probability (bear mind that the program makes sure this value is under 100%)
- To confirm the changes, press “OK”, press “Cancel” to reject them
- Brick effects – the effects edit window opens (Figure 17):
Figure 17 – Effects edit window
The following effects can be added to a brick:
- A gem in front of the brick
- A phasing effect with the following parameters:
- Effect frequency
- Time before switching to a transparent state (Time Offset)
- Transparency time (Alpha change time)
- Alpha (Phased alpha)
- Float effect with the following parameters:
- Clockwise (direction). If the flag is set, the motion clockwise; if not, counterclockwise
- Period
- Amplitude
- Light effect. The brick becomes a source of light with the following parameters:
- Two radiuses: Light big radius (1st) – the area with maximal lighting intensity; Light small radius (2nd) – there is no lighting beyond this radius; 2>1 – the lighting intensity between 1 and 2 is interpolated.
- Color and transparency (R,G,B,A)
To save the properties, press “Ok”. The window will close. When “Cancel” or “ESC” is pressed, the window closes without saving changes.
Double-clicking the center of a group image opens the group properties edit window (Figure 18):

Figure 18 – The group properties edit window
You can change the following parameters:
- ID
- X, Y coordinates
- Dimensions
- Width
- Height
- Rotation angle
- Color and transparency (R,G,B,A)
- Path snapping (if the option is checked, the list of I’s of existing paths becomes available)
4.6. Changing brick texture parameters
Double-clicking a texture will open its properties edit window (Figure 19):
Figure 19 – The texture parameters edit window
You can change the following texture parameters:
- ID
- X, Y coordinates (relative to the object center)
- Size
- Width – equals to the brick template width by default
- Height – equals to the brick template height by default
- Color and transparency (R,G,B,A)
- Rotation angle
- Brick template
There are several filters for template selection:
- By settings
- By brick shape (rectangular, triangular, circular)
- Path snapping (if the option is checked, the list of IDs of existing paths becomes available)
To save the properties, press “Ok”. The window will close. When “Cancel” or “ESC” is pressed, the window closes without saving changes.
4.7. Changing the properties of special objects
The game uses the following special objects:
- ball generator
- black hole
- the element that changes the ball direction
- the element that turns balls into fireballs
- the element that turns balls into railballs
- portal (entrance)
- portal (exit)
Double-clicking a special object opens the brick parameters edit window. All special objects have common parameters (Figure 20):
Figure 20 – The edit window of a special object
You can modify the following parameters:
- ID
- X, Y coordinates (relative to the object center)
- Size
- Width – equals to the brick template width by default
- Height – equals to the brick template height by default
- Color and transparency (R,G,B,A)
- Rotation angle
- Path snapping (if the option is checked, the list of IDs of existing paths becomes available)
Additional portal parameters (entrance)
The “Portal” element consists of two parts: the one the ball enters (entrance) and the one from which the balls flies out (exit). To identify the portal from which the ball will come out, use the ID parameter of the receiving element (Figure 21):
Figure 21 – The ID parameter of the exit portal
The ID of the portal from which the ball element comes out is represented by a list of IDs of all exit portals. You can only select one element. That is, it’s possible to have a single exit for multiple entrances, but not vice versa!
Additional parameters of the black hole
The following parameters can be specified for the “Black Hole” element (Figure 22):
- Effect radius
- Mass (used for calculating the attractive power between bricks and the black hole)

Figure 22 – Mass and radius
Animation of objects (groups of objects) in the editor is performed using keyframes.
Keyframe transformation is carried out using the following methods:
- Motion-tweening – a method intended for changing object attributes.
- Motion-guide – a method intended for moving objects along a path (Bezier curve)
You can animate objects or existing object groups, which are animated as a single object.
Timeline is used for object and group animation.
The timeline (Figure 26) is shown when an object (group of objects) is selected. It contains the key animation moments.
The timeline is common for all layer elements.
The timeline is based on a 10 frames per second scale.

Figure 26 – Timeline
The timeline allows you to see the created object or group animation during scrolling.
If several bricks from different layers are selected in the working area, the timeline is shown for all selected layers.
5.1.1. Adding keyframes to the timeline
To add a new key event to the timeline, do the following:
- Select the necessary position on the timeline.
- Press the
button on the main panel (“Anim” tab). The selected frame becomes a keyframe for the future animation sequence. The first frame becomes a keyframe automatically. The timeline between the keyframes is grey (no interpolation between keyframes), unless the “Default animation” option had been enabled before the creation of keyframes. (In this case, the timeline becomes green –interpolation between keyframes is enabled.)
5.1.2. Removing keyframes from the timeline
To delete a keyframe, do the following:
- Choose the keyfame you want to delete.
- Press the
button on the main panel (“Anim” tab). If the keyframe is located between two animation sequences (marked in green on the timeline), these sequences are merged and interpolation is made between corresponding keyframes.
The editor allows you to move keyframes (the duration of animation changes as well). You can move keyframes within an animation sequence to which it belongs or, if it is the last keyframe, move it from the preceding keyframe to the end of the timeline.
To move a keyframe, do the following:
- Use your mouse to select the necessary keyframe (the active keyframe is visually marked on the timeline).
- Move it on the timeline within the allowed range.
This method of animation is based on the following concept: all you need to do to create an animation is set specific object properties in the starting and ending keyframes; the software will interpolate the intermediate values and transform the object.
Animating with motion-tweening
- Place a new object (or a group of objects) on the working area or select an existing one.
- A timeline is shown for the selected object. Create the keyframes. Switch to the ending keyframe and modify the necessary object parameters.
- Select the timeline segment between the keyframes (it is highlighted in blue) and press the
button. An animation sequence is created. It is marked in green on the timeline. - Use the “-” button to remove keyframes.
5.3. Motion-guide (motion along a predefined path)
A path consists of the following elements (Figure 27):

Figure 27 – Path
- Anchor point. A Bezier curve is limited by the points that define its shape. If there are more than two anchor points in a path, it consists of multiple Bezier curves. Anchor points can be moved relative to each other; that will change the shape of the path.
- A segment between two anchor points (Bezier curve or a straight line)
- Guide line. This line goes through any anchor point. It is tangential to the Bezier curve. There can be one or two guide lines.
- Marker – the end of a guide line. Markers are used for changing the length and direction of guide lines.
The following path management tools are available:
– the main tool for the creation of the path base.
– the tool used for selecting an existing path with the help of a selection rectangle
– the tool used for editing the parameters of an existing path
- the tool used for moving multiple objects along the path
To create a path, do the following:
- Select the path creation tool
(or press “3” on the keyboard)
- Choose the necessary position in the working area and press the left mouse button; the first anchor point will appear.
- Move the cursor and press the left mouse button again – a new anchor point connected with the first one will appear. Repeat the process until the right path outline has been created.
- When the path is created, press the right mouse button to complete the process.
- The name of the created path (path<path_number>) appears in the Paths section of the level’s object tree.
To change the path parameters, do the following:
- Select the necessary path in the Paths branch of the object tree (it will be surrounded by a selection rectangle in the working area) or:
- Choose the path selection tool -
(or press “4” on the keyboard) - Choose the necessary path in the working area and it will be surrounded by a selection rectangle.
- If you need to change the size, location or rotation angle of the path, use the selection rectangle.
- Double-clicking the path will open the path parameters window (Figure 28)
Figure 28 – Path parameters window
You can edit the following path parameters:
- Path name
- Lock path option
- Even distribution of objects option
You can delete the active path by pressing “Del” on the keyboard.
To edit a path, use the path edit tool
(or press “5” on the keyboard). Changing the shape of the path is possible only in anchor points.
Adding an anchor point
- Point the mouse cursor to a curve segment.
- Select “Add point” in the context menu. An anchor point appears in the middle of the curve segment.
Removing an anchor point
- Select an anchor point.
- Choose “Delete point” in the context menu.
Changing the line properties between two anchor points
The path between two anchor points can have two states: curve and straight line.
To switch between these states, do the following:
- Point the mouse button to a curve segment
- If this segment is a straight line, the “Unset Line” option will be available in the context menu. When this option is selected, the segment turns into a Bezier curve.
- If this segment is a Bezier curve, the “Set Line” option is available in the context menu. Choosing this option will convert this segment into a straight line.
5.3.4. Using a Bezier curve to animate object movement
The process of object (group) animation using paths:
- Enable the “Snap” option in the object parameters (in an existing object group) and select the necessary path in the available list of existing paths (Bezier curves).
- Once you have selected a path from the list, the object (group) is automatically bound to the start of the curve by a transformation point or a group center (that is, the coordinates of the transformation point match the coordinates of the start of the Bezier curve) and the object will be moving along this curve (the transformation point will be following the curve).
To make multiple objects move along the line, use the SnapToPath tool (or press “6” on the keyboard). Then use your mouse cursor to grab any of the objects on the path and move it. Other objects will move along with the main one, preserving even spaces between them.
- Insert keyframes into the timeline and create animation between them using motion tweening.
- Move the object into necessary positions in keyframes.
5.4. General animation playback parameters
- Standard animation playback mode (Once)
- Looped playback (Loop)
- PingPong animation playback (PingPong)
- Inverse animation playback (Inverse)
To assign a script to a level, use the “Level Scripts” button on the Lib tab. To do the same with a brick (group of bricks), press the “Script” button on the same tab.
The script syntax matches that of the Lua language
Lua documentation:
http://www.lua.ru/doc/
http://www.lua.org/manual/5.1/
Assigning a script to the level start
You need to choose a campaign and a level, then press the “Script” button. The following window will appear (Figure 29):

Figure 29 – The level script edit window
The script text should be entered in this window. To save the script, press “OK”; to abort changes, press “Cancel”.
Assigning a script to a brick (group of bricks)
You need to select a brick (group of bricks) and press “Scripts” in the brick (group) parameters edit window. The following window will appear (Figure 28)

Figure 30 – The brick (group) parameters edit window
Press “OK” to save the scripts, press “Cancel” to abort the changes.
Scripts can be assigned to the following events:
- Global
- Level start (Init Level)
- Brick
- Collision of a ball with a brick (On Ball Collision)
- Collision of a brick with another brick (On Brick Collision)
- Brick destruction (On Destroy)
The following variables are available for brick events:
OnBrickCollision
self – the brick itself
brick – the brick that collided with the event-generating brick
OnBallCollision
self – the brick itself
ball – the ball that collided with the brick
OnDestroy
Self – the brick itself
The list of functions:
General:
GetElapsedTime() – returns the time elapsed from the start of the level (in milliseconds)
Wait (time_in_ms:float) – pauses the script for a specific time time_in_ms (in milliseconds)
RunScript(script_body:string) – runs the script_body script
Level:
AddExplosion(effect_id:string, pos_x:int, pos_y:int) – add an explosion effect with an ID equal to effect_id and coordinates X,Y: pos_x, pos_y
CreateBonus(bonus_id:string, pos_x:int, pos_y:int, speed: float) – create a bonus with ID equal to bonus_id and coordinates X,Y: pos_x, pos_y
CreateBrick(brick_id:string, template_id:string, pos_x:int, pos_y:int) – create a brick with ID equal to brick_id , template template_id and coordinates X,Y: pos_x, pos_y
IsBrickExists(id:string) – brick existence flag for the given id
IsBrickExists(brick_object: Brick) – existence flag for the brick_object object
GetBrickUnion(id_union:string) – return an array of Lua bricks comprising id_union union
Example:
Destruction of all bricks comprising the union1 union.
local union = GetBrickUnion("union1")
for i,b in ipairs(union) do
b.SetHp(0)
end
GetBrick(id:string) – returns a pointer to a brick object with the specified id
GetAllBricks() – returns a pointer to the object by going through all level bricks using the Next() function.
Example:
Destroying all bricks on the level with ID different from "test" and "test2"
local brick = g_Level.GetAllBricks()
while not brick.IsEnd() do
if brick.GetId()~="test" and brick.GetId()~="test2" then
brick.SetHp(0)
end
brick.Next()
end
BrickUnionConnect (id_union: string) – links all the bricks from the id_union union by a flexible connection. The bricks are linked in the order of their appearance in the object tree. To link the bricks by a flexible connection, make sure one of them has the “Motion and rotation” parameter enabled.
BrickUnionConnectFixed(id_union: string) – links the bricks in the id_union union by a fixed connection according to their order in the tree.
Example:
The script links the bricks from the “union1” union by a flexible connection.
BrickUnionConnect(“union1”)
Brick:
brick:IsExists() – check if a brick exists. If it does, it returns “true”; otherwise, it returns “false”.
brick:GetId() - returns the brick ID
brick:GetShape() – returns the shape of the current brick:
CBrick.ShapeRectangle - rectangular
CBrick.ShapeTriangle - triangular
CBrick.ShapeCircle - circular
brick:SetHp(hp: int) – sets the number of brick hitpoints (hp)
brick:GetHp() – returns the number of brick hitpoints
brick:SetScore(score:int) – sets the number of score points (score) for the brick
brick:GetScore() – returns the number of score points of the brick
brick:SetMass(mass: float) – sets the mass of the brick equal to mass
brick:GetMass() – returns the mass of the brick
brick:SetPos(pos_x :int, pos_y :int) – sets the X.Y coordinates of the brick equal to pos_x, pos_y
brick:GetPos() - returns the brick coordinates object with the following attributes:
b.GetPos().Y – Y coordinate
b.GetPos().X – X coordinate
brick:GetMaxHp() – returns the maximum possible number of lives of the brick
brick:SetSize(size_x :int, size_y :int) – sets the brick size
brick:GetSize() – returns the brick size object with the following coordinates:
b.GetSize().X – width
b.GetSize().Y – height
brick:SetAngle(angle :int) – sets the brick rotation angle to angle
brick:GetAngle() – returns the brick rotation angle
brick:GetColor() – returns the brick color object (Color) with the following attributes:
b. GetColor().Alpha – A
b. GetColor().Red – R
b. GetColor().Green – G
b. GetColor().Blue – B
brick:SetColor(alpha:int, red:int, green:int, blue:int) – sets the color by components:
alpha, red, green, blue
brick:SetColor(color:Color) – sets the brick color to color
brick:RaiseFlag(flag) - sets the flag flag
brick:ReadFlag(flag) - checks for the presence of the flag flag
brick:ClearFlag(flag) – clear the flag flag
flag can assume the following values:
CBrick.FlagNotNeedToWin – not required to complete the level
CBrick.FlagHaveHardSide – unbreakable from one side
CBrick.FlagImmortal – absolutely unbreakable
CBrick.FlagNotPhysicalObject – not a physical object
CBrick.FlagIgnoreOtherBricks – does not interact with other bricks
CBrick.FlagIgnoreBalls – does not interact with a ball
brick:SetPhysicalState(state) – sets the physical properties of the brick to state
Values that state can assume:
CBrick.PhysicalDynamic – can move and rotate
CBrick.PhysicalNoMovement – cannot move, but can rotate
CBrick.PhysicalNoRotation – can move, but cannot rotate
CBrick.PhysicalRestrainMovement – cannot rotate, motion restricted to vector
CBrick.PhysicalStatic – cannot move, cannot rotate
brick:GetPhysicalState() - returns the physical properties of the brick
brick:SetRestrainDirection(dir_x, dir_y) – sets the vector of brick’s motion to dir_x, dir_y (the PhysicalRestrainMovement option should be enabled)
brick:GetRestrainDirection() – returns the brick vector object with the following parameters:
b.GetRestrainDirection().X – X
b.GetRestrainDirection().Y – Y
brick:PlayAnimation() – plays the brick animation
brick:PauseAnimation() – pauses the brick animation
brick:StopAnimation() – stops the brick animation
brick:SetAnimationBehavior(behavior:string) – sets the animation playback type to behavior
Values of behavior:
CBrick.AnimOne – standard playback mode
CBrick.AnimLoop – looped animation playback
CBrick.AnimPingPong – ping-pong animation playback
CBrick.AnimInverse – inverse animation playback
brick:GetAnimationBehavior() – returns the current animation playback mode
brick:SetPath(path_id:string) – assigns the path_id path to the ID brick
brick:SetSnap(is_snap:boolean) – sets the path snapping option for the brick
brick:IsSnap() – returns the value defining whether the brick is snapped to the path. Returns true or false
brick:AddPhasing(phased_alpha, period, alpha_change_time, time_offset) – adds a phasing effect to the brick.
Parameters:
phased_alpha – alpha
period – effect frequency
alpha_change_time – time necessary for switching to transparency
time_offset – time for which the brick stays transparent
brick:RemovePhasing() – remove the phasing effect from the brick
brick:MoveTo(pos _x: int, pos_y: int, time: float) – moves the brick from the point with current coordinates to the point with new coordinates
pos _x - new X coordinate
pos_y - new Y coordinate
time – motion time (in milliseconds)
brick:MoveByDelta(dx: int, dy: int, time: float) – shifts the brick by dx, dy relative to the current position over time milliseconds
brick:IsMoving() – returns whether the brick is moving or not. Returns true or false.
brick:StopMoving() – stops the brick
brick:Rotate(pos_x: int, pos_y: int, angle, time: float , change_brick_angle:boolean) – brick rotation with the following parameters:
pos_x – X coordinate around which the brick will rotate
pos_y – X coordinate around which the brick will rotate
angle – rotation angle
time – rotation time (in milliseconds)
change_brick_angle – the flag responsible for changing the brick rotation angle. True by default.
brick:IsRotating() – the flag returns the brick rotation status. Returns true or false.
brick:StopRotating() – stops the brick rotation
brick:ApplyForceOverTime(force_x, force_y, time) – applies force to the brick with the following parameters:
force_x – X coordinate of the force vector
force_y – Y coordinate of the force vector
time – force application time (in milliseconds)
brick:IsApplyingForce() – the flag returns whether the force is being applied to the brick. Returns true or false.
brick:StopApplyingForce() – stops the force from being applied to the brick.
var dbclick = "page";
brick:ConnectFixed (brick_object: Brick) – links the current brick to the brick_object brick with a fixed connection.
brick:Connect (brick_object: Brick) – links the current brick to the brick_object brick with a flexible connection. In order to link two bricks with a flexible connection, make sure one of them has the “Can move and rotate” option enabled. As the flexible connection implies that bricks are linked with a visual element, it is recommended to leave some space between them (about 3 pixels)
Example:
The script links the bricks called brick1 and brick2 with a fixed connection and brick2 and brick3 with a flexible connection (Figure 31):

Figure 31 – Brick connections
local b1 = g_Level.GetBrick("brick1")
local b2 = g_Level.GetBrick("brick2")
local b3 = g_Level.GetBrick("brick2")
b2.ConnectFixed(b1)
b3.Connect(b2)
Example:
The script moves a brick which does not collide with other bricks and balls while moving:
local brick = g_Level.GetBrick("test")
brick.RaiseFlag( CBrick.FlagIgnoreOtherBricks)
brick.RaiseFlag( CBrick.FlagIgnoreBalls)
brick.MoveTo(100, 100, 1000)
Wait(1000)
if not g_Level.IsBrickExists(brick) then return end
brick.ClearFlag( CBrick.FlagIgnoreOtherBricks)
brick.ClearFlag( CBrick.FlagIgnoreBalls)
- Create or select the necessary campaign (standard campaigns cannot be edited; they are available for viewing only)
- Create or edit the necessary level. The levels the user hasn’t unlocked in the game cannot be viewed in the editor.
Configure the campaign (see 2.1.1. Campaign) and level (see 2.1.2. Levels) parameters.
- Create a new or select an existing layer in which to place your objects.
- The
tool should be selected for adding objects (bricks, textures, special objects, light sources) to the working area. - Use the
tool for managing bricks in the working area. - Choose the necessary templates (or create your own ones in the brick template editor) on the “Lib” tab and place them in the working area. (They will be added to the selected layer, or, if no layer is selected, to the top one.)
- If necessary, you can create object animation (see 6. Animation of objects), assign scripts to objects (see 7. Using scripts).
- To preview the created levels, press
on the main tab or press “F6”. - To save the changes, press
. - To exit the editor, press
or Esc