Creating a remix
A prerequisite to remixing this world is that you have the Horizon Desktop Editor installed on your PC or Mac. If you do not have this installed please follow the instructions here - https://developers.meta.com/horizon-worlds/learn/documentation/get-started/install-desktop-editor
To install a version of Maze Runner - Remixable
, navigate in your web browser to - https://horizon.meta.com/world/731602313376671
Click on the drop down next to the 'Go' button and then select the Remix in Editor
option.
This will open the Desktop editor and create a version of the Maze Runner - Remixable
world for you to edit.
If you then also open the project in your code editor, you will find a README.md
. I recommend reading this first before proceeding further with this guide.
Changing the size of the maze
The default maze in this world is 9x9. You can change the size of the maze by navigating to the Maze
object under the GameArea
object in the Hierarchy panel.
In the properties panel you will see two properties width
and height
. You can change these values to any odd number. For example if you wanted a 15x15 maze you would set both the width and height to 15. Note that there are limits to how Large you can make the maze based on the assets used to create the maze. With the default assets you can make a maze up to 19x19. If you want to make a larger maze you will need to replace the wall assets and I will show you how to do this later in the guide.
After changing the width
and height
properties enter preview mode to see your new maze being generated.
Adding a third NPC
To add a third NPC to the game you will first need to add a new NPC gizmo to your world. You can do this via the Build
-> Gizmos
panel. Search for NPC
and drag the gizmo into your scene. Position the NPC in the Lobby area.
Next rename your new NPC to something different to the defaults in the game world. In my example I will rename the NPC to Fern
.
Customise the appearance of your NPC by clicking Edit Avatar
in the properties panel. This will open a new window where you can customise many aspects of your NPC's appearance. When you are done be sure to click Save
and then return to the desktop editor. Your avatar will now be updated in your scene.
Now create a new spawn point for the NPC. Go to the Build
-> Gizmos
panel and search for Spawn Point
. Drag the spawn point gizmo into your scene and position it in the Lobby area in the same position and rotation as your NPC. Rename the spawn point to FernSpawnPoint
(replacing Fern with the name of your Avatar).
Click back on your NPC and then in the properties panel attach either the RandomNPCRunner
or DirectNPCRunner
script to your NPC. The RandomNPCRunner
script will make your NPC run randomly through the maze, while the DirectNPCRunner
script will make your NPC run directly to the finish line. In my example I will use the RandomNPCRunner
script. Set the relevant properties for the script, ensuring you link correctly the gameSpawnPoint
and lobbySpawnPoint
properties.
The final step to keep the Hierarchy
panel tidy is to parent your new NPC objects and then add this new parent object to the Lobby
object. To do this select the NPC and the trigger, right click and select create parent object
. Rename this new parent object to the name of your NPC, in my example Fern
.
Then drag this new parent object into the Lobby
object in the Hierarchy
panel.
Now return to preview mode, start a round and you will see your new NPC running through the maze.
Replacing the maze wall assets
To customize the maze walls, you can swap out the default wall assets for your own. This guide will show you how to create a new asset and attach it to the maze. To use a low-vertex cube as the wall, start by adding a standard Horizon cube shape. Open the Build
-> Shapes
panel, search for Cube
, and drag it into your scene. Rename the cube to CustomMazeWall
. The position of the cube does not matter as we will later delete this object.
What is important is to set the properties scale
, our default wall assets are 4 wide and 10 high, this is configurable but for this guide we will keep these dimensions. Set the scale
property to 4, 10, 4
. Optionally set the Tint Color
, Tint Stength
and Brightness
properties.
Next ensure the cube is animated by changing the Motion
to Animated
.
Now select the asset in the Hierarchy
panel, right click and select create asset
.
With the new asset created you can now delete the CustomMazeWall
object from your scene.
Then select the Maze
object in the Hierarchy
panel, under the GameArea
object.
In the properties panel under the attached script you now need to set the wallDetailed
and wallSimple
properties to your new asset. Then we need to fix the rotation of the wall asset, set the wallDefaultRotation
to hz.Vec3(0,0,0)
and wallRotateOn
to Y
.
Run your game and you will see the maze walls are now using your new asset. With this asset you can increase the width and height without the vertex count limit, however you will hit animation
limites if you go too high. Below is an example of a 31x31 maze using this asset.
Top comments (0)