Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building an FPS Game with Unity

You're reading from  Building an FPS Game with Unity

Product type Book
Published in Oct 2015
Publisher
ISBN-13 9781782174806
Pages 326 pages
Edition 1st Edition
Languages

Table of Contents (18) Chapters

Building an FPS Game with Unity
Credits
Foreword
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started on an FPS 2. Building Custom Weapons 3. Prototyping Levels with Prototype 4. Creating Exterior Environments 5. Building Encounters 6. Breathing Life into Levels 7. Adding Polish with ProBuilder 8. Creating a Custom GUI 9. Finalizing Our Project Index

Chapter 9. Finalizing Our Project

Once you finish your game project, it's important to take the time to get your projects out in the correct way.

Here is the outline of our tasks:

  • Building the game in Unity

  • Building an installer for Windows

Prerequisites


Before you start, you need to have your project completed just the way that you want it to be when you send it out into the world.

Building the game in Unity


There are many times during development you may want to see how your game will appear if you build it outside the editor. It can give you a sense of accomplishment; I know, I felt that way the first time I pushed a build to a console development kit.

No matter what platform we wish to create out game for in order to build it we need to go to the Build Settings menu.

  1. In order to access Build Settings, we will need to go to File | Build Settings from the top menu (or by pressing Ctrl + Shift + B).

  2. Once you're ready, select Platform from the bottom-left menu. The Unity logo will show the one you're currently compiling for. We're going to compile for Windows now, so if it is currently not set to PC, Mac & Linux Standalone, select it and press the Switch Platform button.

  3. Once you have all of this set up, press the Build button. It will ask you for a name and a location to place the game. I'm going to name it FPSGame and put it in an Export folder located in the same...

Building an installer for Windows


Now that we know what happens by default, let's take some time to customize the project to make it look as nice as possible. PlayerSettings is where we can define different parameters for each platform that we want to put the game onto.

  1. To open PlayerSettings, you can either click on the PlayerSettings button from the Build Settings menu or go to Edit | Project Settings | Player.

    PlayerSettings is actually shown in Inspector. There are some key properties at the top that are cross-platform, which means that they will apply to all platforms (or rather will be the defaults you can override later).

  2. From the Project tab, create a new folder within the MyGame folder and name it Sprites.

  3. Now, in the Example Code folder, you'll find a cursor_hand image. Drag and drop it to the Assets/MyGame/Sprites folder of the Project browser. Once there, select the image and change Texture Type to Cursor.

    Note that, while the image I created works, you're more than welcome to create...

Building an installer for Windows


Like I mentioned previously, having a separate Data folder with .exe is somewhat of a pain. Rather than give people a .zip file and hope they extract it all and keep everything in the same folder, I'd let the process be automatic and give the person an opportunity to install it just like a professional game. With this in mind, I'm going to go over a free way to create a Windows installer.

  1. The first thing we need to do is to get our setup program. For our demonstration, I will be using Jordan Russell's Inno Setup installer. Go to http://jrsoftware.org/isinfo.php and click on the Download Inno Setup link.

  2. Click on the Stable Release button and select the isetup-5.5.6.exe file. Then, double-click on the executable to open it, click on the Run button if it shows a Security Warning dialog, and select Yes to allow changes.

  3. In the Select Setup Language window, leave the selected language to English and click on OK.

  4. Run through the installation, making sure that the...

Summary


We now have our game compiled and running on multiple platforms. Specifically, you learned how to build the game in Unity and build an installer for Windows.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Building an FPS Game with Unity
Published in: Oct 2015 Publisher: ISBN-13: 9781782174806
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}