Unity Game Development Blueprints

Book description

Explore the various enticing features of Unity and learn how to develop awesome games

In Detail

Unity 3D is a powerful and popular game development tool that has taken game developers by storm. It is a cross-platform game engine, enabling you to write your game once and then port it to PCs, consoles, and even the Web, making it a great choice for both indie and AAA developers. Unity combines serious power with a friendly, easy-to-use interface.

Unity Game Development Blueprints takes you on an exciting journey where you'll learn how to use Unity to its best by building a project in 2D, then a 3D game with 2D gameplay, and finally a 3D title.

An easy-to-follow guide with each project containing step-by-step explanations, diagrams, screenshots, and downloadable materials. Concepts in Unity and C# are explained.

What You Will Learn

  • Use Unity's new 2D tools to create a twin-stick shooter from scratch and learn what Unity has to offer
  • Explore both of the available GUI systems built into Unity (including the new one introduced in 4.6) to learn about their pros and cons while creating dynamic healthbars and building a menu system that can be used in all of your future projects
  • Create environments that are as realistic as possible, while maintaining peak performance and removing repetitiveness
  • Get tips and tricks on how to create environments using Terrain for outdoor areas and a modular workflow for interiors as well
  • Modify already existing code to fulfill your own game's unique mechanics
  • Craft AI that will move around the world and interact with players
  • Package your game for release, create an installer, and get your game out into the world

Table of contents

  1. Unity Game Development Blueprints
    1. Table of Contents
    2. Unity Game Development Blueprints
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. 2D Twin-stick Shooter
      1. Project overview
        1. Your objectives
        2. Prerequisites
      2. Setting up the project
      3. Creating our scene
        1. Scripting 101
      4. Implementing player movement
      5. Shooting behavior
      6. Creating enemies
      7. Adding GameController to spawn enemy waves
      8. Particle systems for enemy explosion
      9. Adding in sound effects/music
      10. Adding in points, score, and wave numbers
      11. Publishing the game
      12. Summary
      13. Challenges
    9. 2. Creating GUIs
      1. Project overview
        1. Your objectives
        2. Prerequisites
      2. Project setup
        1. The anatomy of a GUI control
          1. ControlType
          2. Position
          3. Content
        2. GUI.Button
        3. GUI.Label
      3. Customizing the GUI
      4. Pausing the game
        1. GUILayout
      5. Restarting the game
        1. More on the GUILayout class
      6. Creating an Options menu
      7. Summary
      8. Challenges
    10. 3. Side-scrolling Platformer
      1. Project overview
        1. Your objectives
        2. Prerequisites
      2. Setting up the project
      3. Tile-based level creation
        1. Working with arrays
      4. Creating our player
      5. Creating collectibles
      6. Keeping score
        1. Singletons
      7. Winning the game
      8. Summary
      9. Challenges
    11. 4. First Person Shooter Part 1 – Creating Exterior Environments
      1. Project overview
        1. Your objectives
        2. Prerequisites
      2. The project setup
        1. Level design 101 – planning
      3. Exterior environment – terrain
      4. Beautifying the environment – adding water, trees, and grass
      5. Creating our player
      6. Building the atmosphere
      7. Creating a flashlight
      8. Walking / flashlight bobbing animation
      9. Summary
      10. Challenges
    12. 5. First Person Shooter Part 2 – Creating Interior Environments
      1. Project overview
        1. Your objectives
      2. Project setup
        1. Creating architecture overview
          1. 3D modeling software
          2. Constructing geometry with brushes
          3. Modular tilesets
            1. Mix and match
      3. Importing assets
      4. Creating tiles
      5. Placing tiles with grid snapping
      6. Creating and placing props
      7. Lightmapping quickstart
      8. Summary
      9. Challenges
    13. 6. First Person Shooter Part 3 – Implementing Gameplay and AI
      1. Project overview
        1. Your objectives
      2. Setting up the project
      3. Creating the shooting behavior
      4. Creating an enemy
        1. State machines 101
      5. Enemy movement
        1. Advanced FSMs
      6. Damaging and killing enemies
      7. Using controller input
      8. Moving to other levels
      9. Summary
      10. Challenges
    14. 7. Creating Save Files in Unity
      1. Project overview
        1. Your objectives
      2. Saving a high score
        1. The PlayerPrefs class
          1. The Set functions
          2. The Get functions
      3. Level editor – introduction
        1. Lists
      4. Level editor – adding/removing walls at runtime
      5. Level editor – toggling editor, GUI, and selecting additional tiles
      6. Level editor – saving/loading levels to file
        1. FileStreams
        2. BinaryFormatter
      7. Summary
      8. Challenges
    15. 8. Finishing Touches
      1. Project overview
        1. Your objectives
      2. Setting up the build settings
      3. Customizing your exported project via the player settings
      4. Building an installer for Windows
      5. Summary
      6. Challenges
    16. 9. Creating GUIs Part 2 – Unity's New GUI System
      1. Project overview
        1. Your objectives
      2. Project setup
      3. Creating health bars
      4. Adding in text
      5. Working with buttons and anchors
      6. Summary
      7. Additional resources
      8. Challenges
    17. Index

Product information

  • Title: Unity Game Development Blueprints
  • Author(s): John P. Doran
  • Release date: November 2014
  • Publisher(s): Packt Publishing
  • ISBN: 9781783553655