Numbers in parenthesis represent the keyboard shortcut.
Select (1)
Click on objects to select them.
Shift-click to select multiple objects.
Click and drag to select multiple objects.
Click and drag on segments to curve them.
Click and drag on selected objects to move them around.
To move segment, first click on it to select it, then
drag its vertices.
Rotate (2)
Click to place the center of rotation.
Click and drag to rotate the selected objects.
Scale (3)
Click to place the center of transformation.
Click and drag to scale or flip the selected objects.
Some types of objects do not scale well. Ideally,
discs and curved segments become oval-shaped when scaled
vertically or horizontally. Haxball does not support
ovals, so their image needs to be approximated.
A scaled disc will have the same area as it's ideal oval.
A curved segment will keep the same tangent on it's first point.
Segments, vertices, planes and goals scale perfectly.
Segment (4) -
A segment connects two vertices. They can be used as decorations or as walls.
Click and drag to create segments.
Click on existing vertices to connect segments to them.
Vertex (5) -
A vertex is a point on the stadium that can have special properties.
Click to place a new vertex.
Disc (6) -
Discs are the only object apart from
the puck and the players that can be made to
move. They can be used as decorations or be allowed to
collide with other objects.
Click to create normal-sized discs.
Click and drag to create custom-sized discs.
Goal (7) -
When the puck crosses a goal, the opposite team scores a point.
Click and drag to place a goal.
Left side goals will start out red, right side goals will start out blue.
Blue players score in the red goal, and vice-versa.
Plane (8) -
Planes are invisible walls of infinite length.
Click to place a plane. The plane will face the center of the stadium.
Property Editor
When objects are selected, their common properties
are listed in the properties tab on the bottom left.
When one of these properties is changed, it will be applied to all the selected objects.
When a new object is created, the properties will be applied to it.
Properties
bCoef - How much bounce an object
has. Officially, this is a number between 0 and 1. Values below 0
and above 1 can also be used with care (and haxketball nets).
cMask - A list of groups that the object
collides with. The ball and the players have a cMask of
["ball","red","blue","wall"]. During kick-off, blue
players have an additional cMask of "blueKO" and red
players have an additional cMask of "redKO".
cGroup - The groups that an object belongs to.
ball - the puck
red - red players
blue - blue players
wall - walls
redKO - kick-off barriers for red
blueKO - kick-off barriers for blue
all - all of the above
trait - A named set of properties common to many objects.
x - The horizontal position of a vertex.
y - The vertical position of a vertex.
curve - The angle (in degrees) at which a
segment curves. Possible values are between -340 and 340.
vis - true or false. Is this object visible?
color - The color of segments and discs. Specified as a 6-character hexidecimal string.
normal - The direction faced by a plane.
dist - The distance of a plane from the center of the stadium.
radius - The size of a disc.
invMass - The inverse mass of an disc. 0
means that the disc doesn't move. The higher the
invMass, the lighter the disc. Values below 0 are
possible but must be used with care (and bobsleds).
pos - The x and y coordinates of the center of a disc.
p0 - The coordinates of one end of a goal.
p1 - The coordinates of the other end of a goal.
team - The team whose goal it is, either blue or red.
Editing Actions
Undo the last action. (Z or U)
Cancel the undo. (R)
Remove the selected objects. (Delete)
Select All (A)
Select None
Invert Selection
Cut (X)
Copy (C)
Paste (V)
Duplicate (D)
Keyboard Shortcuts
Some browser plugins are not compatible with keyboard shortcuts.
Importing and exporting
Importing and exporting is done from the Edit Source panel.
To import a stadium, paste its source into the
editor and click on Import. The source code of a HBS
file can be obtained by opening the HBS file with a text
editor such as notepad.
To export a stadium, copy its source from the
editor. Copy the source into a text file, and load that
file into haxball.
Text Mode
The text editor is simpler than notepad in some ways, but has some HBS-specific features.
The code is formatted for easy editing.
Vertexes are annotated with their index number.
Objects selected in the visual editor are marked in the code.
The Import button lets you instantly preview your stadium in the visual editor.
Stadium Properties
Spawn Distance - How far to the right and left of the center should the players start?
Height and Width - The size of the stadium.
Requirements
This editor works on Google Chrome and possibly other modern browsers.
HaxBall
HaxBall is an online multiplayer game created by basro.
HBS
HaxBall players can create new stadiums by
writing HaxBall Stadium (HBS) files directlty or using an editor
like this one. basro wrote
a small tutorial on how
to write raw HBS files.
HBR
HaxBall Recordings are not yet supported by
Nn's HBS Editor. Partial information such as reconstructed
stadiums (in HBS format) can be extracted from HBR files
using HBRDUMP (2Mb zip file).