Join Jesse Freeman for an in-depth discussion in this video Building a pixel-perfect orthographic camera, part of Unity 5: 2D Essential Training (2015).
- So in the previous video,…in order for us to see our artwork,…we had to change the main camera scale.…By default, it was set to five.…Now, if we were to move something closer to the camera,…you'll see that it's incredibly large.…And again, remember, this because all of our artwork…is a one for one ratio to units in Unity.…So each one of these units is now a pixel.…Well, at different resolutions on different devices,…we're not gonna be able to maintain…a consistent look and feel.…
So, in order to fix that,…we're gonna create a script that will allow us…to automatically resize the camera…based on the height of the screen that it's being played on.…To do this,…we're gonna create a new folder to store our scripts.…Then, inside of this,…we're gonna create a new C# script.…And we're gonna call it…PixelPerfectCamera.…Now, let's open up this script inside of MonoDevelop.…Now, if you're new to writing scripts in Unity,…every time you create a new script…this is the basic layout.…
What you'll see is that we have classes…that we're importing from the Mono framework.…
Super Zombie Runner riffs off the popular endless runner genre: a one-button casual game that's not only fun to play but exciting to build. The focus of the work is a reusable code base that you can extend and make your own, while learning the basics of object pooling, supporting multiple screen resolutions, tracking scoring, and multi-platform publishing. Along the way, Jesse covers key Unity features, such as working with sprites, creating animations, and leveraging the UI components.
- Working with sprites and animation
- Creating the player
- Spawning GameObjects
- Adding obstacles and collisions
- Building the game objects and logic
- Managing game state
- Creating pixel-perfect cameras
- Designing for multiple screen resolutions
- Adding scores
- Optimizing performance
- Publishing to desktop, web, and mobile platforms
Skill Level Intermediate
1. Working with Sprites
2. Creating Repeating Textures
3. Creating Obstacles
4. Object Pooling
5. Creating the Player
6. Setting Up the Game
7. Adding UI
8. Creating More Obstacles
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.