Creating a map screen 1

Maps are a common part of adventure games, popularised by classics such as the Monkey Island series.

There are a few ways to go about creating such a mechanic in AC, but this tutorial will cover an approach that allows for location unlocking, animation, and player movement.

To start with, we'll need some artwork.

(Credit: Monkey Island 2: LeChuck's Revenge)

Import your given map art into Unity and set its Texture Type to Sprite (2D and UI). Create a new AC scene and add the sprite, positioning the camera so that it covers the screen.

Note: The same principles can be applied to 3D models if you're making a 3D game. If you're making a 3D game, but want the map screen to be 2D, you can check Override the default camera perspective? at the top of the Scene Manager.

Each AC scene has a default PlayerStart object, but we don't want to see the Player character during this scene. We can hide them just by moving the PlayerStart to the side, where it can't be seen by the camera.

For each location on the map, add a new Hotspot to the scene, and have its collider cover the shape of the location. This does not need to be the Hotspot's default Box Collider - you can replace this with a Polygon Collider 2D to better fit the location's shape:

Define a new "Use" interaction for the Hotspot, and view its Interaction ActionList. Use the Scene: Switch Action to cause clicking it to open up the desired scene:

It may be that we want certain locations to be inaccessable at times - for example, at the start of the game, only to be made available after completing part of the story.

To determine whether a location should be accessable, we can define a Global Variable. As an example, we can create a "Can visit mansion?" variable in the Variables Manager, and set its Type to Boolean:

We'll need to enable or disable the house's Hoptspot when the map screen starts, which we can do by creating an OnStart cutscene at the top of the Scene Manager. In this Cutscene, we can use the Variable: Check Action to either enable or disable the Hotspot:

To open this map screen, all we need to do is use another Scene: Switch Action when the Player leaves their current location:

Just be sure to add the map screen scene, and all the location scenes, to Unity's Build Settings, which can be accessed from the top toolbar under File -> Build Settings....