Setting up a bare-bones scene

The basic steps to creating a bare-bones Adventure Creator scene are:

  • Create a GameEngine prefab
  • Build the set
  • Define a default PlayerStart
  • Define a default Camera
  • Set up navigation and collision
  • Add game logic and interactive elements

Creating a GameEngine prefab

For an Adventure Creator scene to run, three prefabs are needed: the GameEngine, the PersistentEngine, and the Player. Only the GameEngine should be present when the scene begins, as it will create the other two automatically for you.

You can use the Scene Manager to create the necessary GameEngine prefab. This is done by organising your scene objects. Open the Scene Manager (from Adventure Creator -> Editors -> Game editor) and select the Scene tab. It is recommended to organise your scene with folders, as this reduces clutter in your Hierarchy.

Clicking this button will cause Adventure Creator to load in the GameEngine prefab, as well as a number of empty "folder" objects that are used to organise your game logic. Each folder's name begins with an underscore (_). Some folders, such as the _Logic folder, contain sub-folders as well.

The Scene Manager then changes to display a list of settings, and quick-buttons to logic prefabs.

Building the set

Your scene's set will either involve 3D models, 2D sprites, or a combination of the two, depending on your game's style. You can place these objects in your scene and light them just as you would any other Unity scene. Adventure Creator provides folders in your scene's hierarchy for you to place Lights and Set Geometry, but they are for convenience only and can be deleted.

Defining a default PlayerStart

The PlayerStart prefab marks the starting position of the Player when the scene begins. Different PlayerStarts can be used to mark different positions, based on which scene the Player previously travelled from. The default PlayerStart is used to place the player when the game beings from this scene, or no other appropriate PlayerStart is found.

A default PlayerStart will have been created for you when you organised the scene objects. It is listed as your Default PlayerStart in your Scene Manager.

The PlayerStart is represented by a blue arrow. Notice how it is automatically placed within the _PlayerStarts folder in the scene's _Navigation folder in the Hierarchy window. Position it and rotate it in your scene to mark correctly the point at which you want the Player to appear.

Defining a default Camera

Adventure Creator makes use of GameCamera prefabs to guide the MainCamera around the scene. GameCameras never actually render anything themselves: instead, the MainCamera "attaches" itself to a GameCamera and obeys whichever movement rules that GameCamera has been given.

To create a new GameCamera, double-click GameCamera in the Scene Manager's list of Scene prefabs. The actual camera prefab listed will vary based on the Settings Manager's Camera perspective (for example, a 2D game will allow you to create GameCamera2Ds), but their principles are similar.

Position the new GameCamera in 3D space to a viewpoint from where you can see the PlayerStart arrow. You can use the Camera Preview window in the corner to see through it's lens.

The GameCamera Inspector gives you the ability to control it's movement and rotation based on it's Target's position. Unchecking any of it's Lock checkboxes will let you control how that axis is affected, as well as which GameObject is to be it's Target (which is the Player by default).

We now need to assign this camera as the scene's default. Drag it (or click the small circle and select it) in the Scene Manager's Default Camera field.

When the scene begins, the Player will appear at the PlayerStart's position, and the MainCamera will be looking through the lens of the GameCamera.

Setting up navigation and collision

All Adventure Creator scenes generally require Collision and Navigation objects. Collision objects are used to prevent Characters from clipping or falling through the set, while Navigation objects are used to calculate pathfinding routes for Characters to take. Even if you are not making a Point and Click game, pathfinding is still used by NPCs to navigate a scene.

Because the Navigation and Collision requirements of scenes vary between 2D and 3D scenes, refer to the appropriate chapter further on for more.

Adventure Creator and this website are copyright Chris Burton, ICEBOX Studios

Go to top
Do NOT follow this link or you will be banned from the site!