O'Reilly logo

Mastering Unity 2D Game Development - Second Edition by Simon Jackson, Ashley Godbold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4.  The Town View

With our main character in hand, let's give her a home and a place to walk around. In this chapter, we will cover the basics of creating immersive areas where players can walk around and interact, as well as some of the techniques used to manage those areas.

The following topics will be covered in this chapter:

  • Working with environments
  • Looking at sprite layers
  • Creating a script to move the camera with the player
  • Handling multiple resolutions

Backgrounds and layers

Now that we have our hero in play, it would be nice to give her a place to live and walk around, so let's set up the home town and decorate it.

First, we are going to need some more assets. So, from the asset pack you downloaded earlier, grab the following assets ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required