Building an FPS Game with Unity

Book description

Create a high-quality first person shooter game using the Unity game engine and the popular UFPS and Probuilder frameworks

About This Book

  • Learn how to use Unity in conjunction with UFPS and ProBuilder to create a high-quality game quickly
  • Create both interior and exterior environments
  • A step-by step guide to building a project with clear examples and instructions to create a number of interesting scenarios

Who This Book Is For

This book is for those who want to create an FPS game in Unity and gain knowledge on how to customize it to be their very own. If you are familiar with the basics of Unity, you will have an easier time, but it should make it possible for someone with no prior experience to learn Unity at an accelerated pace.

What You Will Learn

  • Use UFPS to build custom weapons with custom meshes and behaviors
  • Explore level design as you prototype levels, making use of Prototype to build levels out quickly
  • Build environments that are realistic as possible while keeping peak performance and repetitiveness down
  • Review tips and tricks on how to create environments using both terrain for outdoor areas and a modular workflow for interiors
  • Develop a number of different encounters that your players can fight against, from a simple turret enemy to complex AI characters from Shooter AI
  • Discover how to create unique objects such as exploding barrels and objects you can interact with
  • Create a custom GUI to help your game stand out from the crowd
  • Package your game for release, create an installer, and get your game out into the world

In Detail

Unity, available in free and pro versions, is one of the most popular third-party game engines available. It is a cross-platform game engine, making it easy to write your game once and then port it to PC, consoles, and even the web, making it a great choice for both indie and AAA developers.

Building an FPS Game in Unity takes readers on an exploration of how to use Unity to create a 3D first person shooter (FPS) title, leveraging the powerful UFPS framework by VisionPunk and Prototype/ProBuilder 2.0 by ProCore3D.

After some setting up, you will start by learning how to create custom weapons, prototype levels, create exterior and interior environments, and breathe life into our levels. We will then add polish to the levels. Finally, we will create a custom GUI and menus for our title to create a complete package.

Style and approach

An easy-to-follow guide with each project containing step-by-step explanations, diagrams, screenshots, and downloadable material. Concepts in Unity and C# are explained as they are used and for the more inquisitive, there are more details on the concepts used with additional external resources to learn from.

Table of contents

  1. Building an FPS Game with Unity
    1. Table of Contents
    2. Building an FPS Game with Unity
    3. Credits
    4. Foreword
    5. About the Author
    6. Acknowledgment
    7. About the Reviewers
    8. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    9. 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
    10. 1. Getting Started on an FPS
      1. Prerequisites
      2. Project creation
      3. Getting started with the Asset Store
        1. Installing UFPS
      4. Installing Prototype
      5. File organization
      6. Customizing Unity's layout
      7. Summary
    11. 2. Building Custom Weapons
      1. Prerequisites
      2. Setting up a testbed
      3. Getting models/sounds for weapons
      4. Building our weapon – the mesh
      5. Creating a UnitBank
      6. Creating the weapon
      7. Customizing our weapon's properties
      8. Summary
    12. 3. Prototyping Levels with Prototype
      1. Prerequisites
        1. Level design 101 – planning
        2. Creating the architectural overview
          1. 3D modeling software
          2. Constructing geometry with brushes
          3. Modular tilesets
            1. Mix and match
      2. Creating geometry
      3. Building a doorway
      4. Duplicating rooms / creating a hallway
      5. Preventing falls - collision
      6. Adding stairways
      7. Coloring your world
      8. Summary
    13. 4. Creating Exterior Environments
      1. Prerequisites
      2. Introduction to Terrain
        1. Height maps
        2. Hand sculpting
      3. Creating the Terrain
      4. Adding color to our Terrain – textures
      5. Adding water
      6. Adding trees
      7. Adding details – grass
      8. Building the atmosphere – Skyboxes and Fog
      9. Summary
    14. 5. Building Encounters
      1. Prerequisites
      2. Adding a simple turret enemy
      3. Integrating an AI system – RAIN
      4. Integrating an AI system – Shooter AI
      5. Spawning enemies with the help of a trigger
      6. Spawning multiple enemies at once
      7. Cleaning up dead AI
      8. Placing healthpacks/ammo
      9. Summary
    15. 6. Breathing Life into Levels
      1. Prerequisites
      2. Building an explosive barrel
      3. Using triggers for doors
      4. Creating an elevator
      5. Summary
    16. 7. Adding Polish with ProBuilder
      1. Prerequisites
      2. Upgrading from Prototype to ProBuilder
      3. Creating material
      4. Working with ProBuilder – placing materials
      5. Meshing your levels
      6. Summary
    17. 8. Creating a Custom GUI
      1. Prerequisites
      2. Creating a main menu: part 1 – adding text
      3. Creating a main menu: part 2 – adding buttons
      4. Creating a main menu: part 3 – button functionality
      5. Replacing the default UFPS HUD
      6. Summary
    18. 9. Finalizing Our Project
      1. Prerequisites
      2. Building the game in Unity
      3. Building an installer for Windows
      4. Building an installer for Windows
      5. Summary
    19. Index

Product information

  • Title: Building an FPS Game with Unity
  • Author(s): John P. Doran
  • Release date: October 2015
  • Publisher(s): Packt Publishing
  • ISBN: 9781782174806