Join Jesse Freeman for an in-depth discussion in this video Recycling the player game object, part of Unity 5: 2D Essential Training (2015).
- Now before we move on to actually putting…the whole game together,…we want to clean up the last few things on the player.…The first thing we'll do, is we're going to turn the player…into prefab by dragging him from the scene…into our Prefab's folder.…With our Player Prefab selected,…let's go in and add two more components.…The first component we're going to want to create…is the Destroy Offscreen.…The other component we're going to want to create…is the RECYCLED GAME OBJECT.…We spent a lot of time building the basic foundation…for all of this to work…and it took a while for us to get here.…
But now you can see, in order for us to create…recyclable game objects that take advantage…of our object pool and can also be destroyed…when they're offscreen, and are smart enough…to know whether the game object needs…to be recycled or not,…we simply just need to start adding these little behaviors…onto our component.…Because all of our code is incredibly modular…and self-sufficient we're able to now make this reusable…throughout the rest of our project,…
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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.