Roblox Battle Royale features a building system that lets players build their own structures to reach higher ground for a better shooting angle, or to provide cover during battle. Using a menu, the player can select from a number of different tile types and place them in the world.
To maintain an orderly and structured system:
- Each tile must be connected to another existing tile or to the ground.
- All building tiles are placed within a grid mapped to the game world so that tiles connect properly and do not overlap.
In order for players to build new tiles quickly and easily, the building system needs to understand what tiles are connected to each other and where new tiles can be placed on the grid:
|Occupancy||A bitmask which represents the physical space the tile type takes up within a cell. Each building system tile/object can occupy any number of faces of a grid cell (front, left, back, right, top, and bottom) and any number of octants in a grid cell. A building system object can only be placed in a cell if all the faces and octants that the object occupies are available in that cell. Occupancy for a building system object is defined as follows:
A bitmask which represents what portions of the cell's faces/edges the tile type touches. A building system tile/object's connectivity is represented by a series of bits representing connection points on the surface of a cell. They are arranged in the following way on the faces of the cell:
A building system object is considered connected to another building system object in the grid if they share at least 2 connectivity points on the surface of a cell.
Creating New Tile Types
To create a new tile type:
- Place the asset in ReplicatedStorage/BuildingSystem/Assets. Remember that it must contain ObjectType and StartingRotation children as defined above.
- Define the Occupancy and Connectivity for your new tile type in ReplicatedStorage/BuildingSystem/Libraries/Grid/ObjectTypeConfigurations:
Working With Terrain
If you would like to create a map with free-form
articles/Intro To Terrain|terrain that lines up perfectly with the building system, we recommend that you use the heightmap import system as outlined in
/articles/importing terrain data/index.html|Importing Terrain Data and that you observe the following details:
- Terrain in Roblox is represented by a three dimensional array of voxels, each of which occupies a cube of 4×4×4 studs in the world. Because of this, Roblox Battle Royale uses a grid cell size of 20×16×20 studs, with wall tiles that are 20×16×1 studs and floor/ceiling tiles that are 20×1×20 studs in size. This allows building tiles and terrain to line up properly.
- Each pixel in your heightmap image should represent one terrain voxel in the X/Z plane, so a 5×5 area in pixels represents one building system grid cell that occupies a 20×20 stud area.
- In your heightmap image, make sure the red channel or grey channel value for each pixel is divisible by the height of your building system grid cell so that the floor tiles sit nicely on top of the terrain.
- When you import your heightmap, set:
Position (X, Y, Z) = 0, 0, 0Size (X, Y, Z) = heightmap_width × 4, 256, heightmap_length × 4
Previous Pickup System Next Minimap System