Explore 1.5M+ audiobooks & ebooks free for days

Only $12.99 CAD/month after trial. Cancel anytime.

Unity from Zero to Proficiency (Proficient): Unity from Zero to Proficiency, #5
Unity from Zero to Proficiency (Proficient): Unity from Zero to Proficiency, #5
Unity from Zero to Proficiency (Proficient): Unity from Zero to Proficiency, #5
Ebook445 pages2 hoursUnity from Zero to Proficiency

Unity from Zero to Proficiency (Proficient): Unity from Zero to Proficiency, #5

Rating: 5 out of 5 stars

5/5

()

Read preview

About this ebook

First Edition, Published in September 2019

In this book, the fifth book in the series, you will become comfortable with creating your own RPG. If you were ever interested in creating systems for your game to speed-up your coding and create and maintain levels easily, then this book is for you.

The book includes a list of the learning objectives at the start of each chapter, step-by-step activities, and quizzes to test your knowledge, and the content of each chapter is as follows:

  • Chapter 1 gives an introduction to the RPG genre. You will learn the design principles that will help you to speed-up your development process.
  • Chapter 2 helps you to create and animate your main 3D character, add a camera that will follow this character as well as a mini-map. You will also learn to use ProBuilder to create a village.
  • Chapter 3 explains how to create a dialogue system from an XML file, and how to integrate it seamlessly into your game.
  • Chapter 4 explains how you can create a simple inventory system and use it to collect, store, and use items that you will find in your quest.
  • Chapter 5 shows you how to create a shop where the player can buy items that will then be added to the inventory.
  • Chapter 6 explains how you can create different types of animated and intelligent NPCs that will challenge the player.
  • Chapter 7 explains how you can create a quest system based on an XML file to manage the objectives for each of your levels. You will learn to read, and use this file for your game.
  • Chapter 8 explains how you can create an XP attribution system where the player can use the Xps gained in the previous level to increase his/her skills (e.g., accuracy, power, etc.)
  • Chapter 9 shows you how you can create a maze randomly using a procedural method so that the maze is different every time the game is played.
  • Chapter 10 combines the skills that you have learned so far to create a final level where the player needs to eliminate guards, collect gold, and also defeat the boss.

After reading this book you will become a better game programmer, improve your knowledge of coding and unity, understand how to make a more complex product, learn some techniques to make an RPG game more modular, especially the quest system, use reusable code/assets that you can employ in your own game, create an inventory for your characters and much more...


If you want to get started with your first RPG in Unity and learn reusable systems for your other games, using a tried-and-tested method: download this book now!

LanguageEnglish
PublisherPatrick Felicia
Release dateSep 29, 2020
ISBN9781700125910
Unity from Zero to Proficiency (Proficient): Unity from Zero to Proficiency, #5
Author

Patrick Felicia

Patrick Felicia is a lecturer and researcher at Waterford Institute of Technology, where he teaches and supervises undergraduate and postgraduate students. He obtained his MSc in Multimedia Technology in 2003 and PhD in Computer Science in 2009 from University College Cork, Ireland. He has published several books and articles on the use of video games for educational purposes, including the Handbook of Research on Improving Learning and Motivation through Educational Games: Multidisciplinary Approaches (published by IGI), and Digital Games in Schools: a Handbook for Teachers, published by European Schoolnet. Patrick is also the Editor-in-chief of the International Journal of Game-Based Learning (IJGBL), and the Conference Director of the Irish Symposium on Game-Based Learning, a popular conference on games and learning organized throughout Ireland.

Other titles in Unity from Zero to Proficiency (Proficient) Series (5)

View More

Read more from Patrick Felicia

Related to Unity from Zero to Proficiency (Proficient)

Titles in the series (5)

View More

Related ebooks

Programming For You

View More

Reviews for Unity from Zero to Proficiency (Proficient)

Rating: 5 out of 5 stars
5/5

2 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Unity from Zero to Proficiency (Proficient) - Patrick Felicia

    Patrick Felicia

    ​Unity from Zero to Proficiency (Proficient)

    Copyright © 2019 Patrick Felicia

    All rights reserved. No part of this book may be reproduced, stored in retrieval systems, or transmitted in any form or by any means, without the prior written permission of the publisher (Patrick Felicia), except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either expressed or implied. Neither the author and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

    First published: September 2019.

    Published by Patrick Felicia

    ​Credits

    Author: Patrick Felicia

    ​About the Author

    Patrick Felicia is a lecturer and researcher at Waterford Institute of Technology, where he teaches and supervises undergraduate and postgraduate students. He obtained his MSc in Multimedia Technology in 2003 and Ph.D. in Computer Science in 2009 from University College Cork, Ireland. He has published several books and articles on the use of video games for educational purposes, including the Handbook of Research on Improving Learning and Motivation through Educational Games: Multidisciplinary Approaches (published by IGI), and Digital Games in Schools: A Handbook for Teachers, published by European Schoolnet. Patrick is also the Editor-in-chief of the International Journal of Game-Based Learning (IJGBL), and the Conference Director of the Irish Symposium on Game-Based Learning, a popular conference on games and learning organized throughout Ireland.

    ​Support and Resources for this Book

    To complete the activities presented in this book you need to download the startup pack on the companion website; it consists of free resources that you will need to complete your projects, including bonus material that will help you along the way (e.g., cheat sheets, introductory videos, code samples, and much more).

    These resources also include the final completed project so that you can see how your project should look like in the end.

    Amongst other things, the resources for this book include:

    Cheat sheets for Unity (e.g., keyboards).

    Cheat sheets to summarize common processes (creating terrains, texturing, etc.).

    Free video tutorials to get you started with the first chapters.

    To download these resources, please do the following:

    Open the following link: http://learntocreategames.com/books/.

    Select this book ("Unity from Zero to Proficiency (Proficient)").

    On the new page, click on the link labeled "Book Files", or scroll down to the bottom of the page.

    In the section called "Download your Free Resource Pack, enter your email address and your first name, and click on the button labeled Yes, I want to receive my bonus pack".

    After a few seconds, you should receive a confirmation email to activate your account.

    If you are using Gmail and you don't see the email, please check your Spam and Promotions folders.

    Once you have clicked to confirm your account then a link to your free start-up pack should arrive shortly after.

    When you receive the link, you can download all the resources to your computer.

    When you receive the email, and if you are using Gmail, please do the following to be able to receive subsequent updates:

    Add my address to your contact list.

    Drag the message to your Primary Tab.

    Frequently check the Promotions tab.

    This book is dedicated to Mathis & Helena

    Table of Contents

    1 Introduction to the RPG Genre, Key Features and Design Concepts

    RPG games

    RPG features in the game that you will create

    The design philosophy behind this book

    2 Creating and Animating the Main Character

    Creating your character

    Controlling the character from a script

    Adding a camera

    Modifying the environment

    Creating a mini-map

    Level roundup

    3 Creating a Dialogue System

    Introduction

    Importing the xml file for the dialogues

    Reading the dialogue file

    Processing the user's answers

    Building a user interface

    Linking the code and the xml file to the user interface

    Triggering the dialogue when we are near the npc

    Making it possible to re-activate a conversation

    Adding a 3D character for the NPC

    Animating the NPC

    Level roundup

    4 Creating an Inventory System

    Introduction

    Creating classes to store information on the items to be collected

    Creating a user interface for the inventory system

    Displaying and updating the inventory from the code

    Creating objects to be collected for the inventory

    Allowing the player to choose the objects to collect

    Using an item from the current inventory to increase the players' health

    Creating a health bar

    Level roundup

    5 Creating a Shop and a Buying System

    Creating a shop

    Creating the interface

    Creating the user interface for each item available in the shop

    Creating scripts to add or remove items

    Creating a prefab for each item to be sold

    Adding items to the shop

    Updating the total and the amount of money left

    Linking the shop to the players' number of gold coins

    Saving the items bought to the player's inventory

    Level roundup

    6 Adding Weapons and Protagonists

    Adding a weapon

    Drawing and sheathing the weapon

    Performing an attack against a stationary target

    Adding a flash when the target is hit

    Creating intelligent NPCs

    Getting the NPC to inflict damage to the player

    Level roundup

    7 Adding a Quest System

    Creating a quest system

    Saving quest information in an XML file

    Creating the game manager

    Creating a quest manager

    Displaying quest information to the user

    Checking the actions performed by the player

    Adding a notification system to check achievements

    Displaying the XPs on screen

    Checking that the player has completed all the tasks and saving data to the game manager

    Level roundup

    8 Creating an XP Attribution System

    Introduction

    Creating the interface for the XP attribution system

    Level roundup

    9 Creating A Maze Procedurally

    The plan

    Creating the structure of the walls

    Creating the maze from the code

    Adding the player and other objects to the maze

    Inspecting the maze with a bespoke controller

    Adding NPCs

    Integrating the scene into the game

    Adding a close-range camera

    Displaying the maze in the mini-map

    Using skills to improve gameplay

    Level roundup

    10 Creating The Final Level

    Setting-up the level

    Fixing navigation issues

    Adding the ability for NPCs to change behaviour at run-time

    Adding the ability for NPCs to fight back after an attack

    Adding the ability for each NPC under attack to alert the other NPCs

    Finishing up

    Level roundup

    11 Your Next Steps

    12 Thank you

    ​Preface

    After teaching Unity for over 6 years, I always thought it could be great to find a book that could get my students started on Unity in a few hours and that showed them how to master the core functionalities offered by this fantastic software.

    Many of the books that I found were too short and did not provide enough details on the why behind the actions recommended and taken. Other books were highly theoretical, and I found that they lacked practicality and that they would not get my students’ full attention. In addition, I often found that game development may be preferred by those with a programming background but that those with an Arts background, even if they wanted to get to know how to create games, often had to face the issue of learning to code for the first time.

    As a result, I started to consider a format that would cover both: be approachable (even to the students with no programming background), keep students highly motivated and involved using an interesting project, cover the core functionalities available in Unity to get started on game programming, provide answers to common questions, and also provide, if need be, a considerable amount of details for some topics.

    This book series entitled Unity From Zero to Proficiency does just this. In this book series, you have the opportunity to play around with Unity’s core features, and essentially those that will make it possible to create an interesting 3D game rapidly. After reading this book series, you should find it easier to use Unity and its core functionalities.

    This book series assumes no prior knowledge on the part of the reader, and it will get you started on Unity so that you quickly master all the wonderful features that this software provides by going through an easy learning curve. By completing each chapter, and by following step-by-step instructions, you will progressively improve your skills, become more proficient in Unity, and create a survival game using Unity’s core features in terms of programming (i.e., C#), game design, and drag and drop features.

    In addition to understanding and being able to master Unity’s core features, you will also create a game that includes many of the common techniques found in video games, including: level design, object creation, textures, collision detection, lights, weapon creation, character animations, particles, artificial intelligence, and menus.

    Throughout this book series, you will create a game that includes both indoor and outdoor environments where the player needs to finds its way out of the former through tunnels, escalators, traps, and other challenges, avoid or eliminate enemies using weapons (i.e., gun or grenades), and drive a car or pilot an aircraft.

    You will learn how to create customized menus and simple user interfaces using Unity’s UI system, and animate and give (artificial) intelligence to Non-Player Characters (NPCs) that will be able to follow your character using Mecanim and NavMesh navigation.

    Finally, you will also get to export your game for the web at the different stages of the books, so that you can share it with friends and obtain some feedback on your game too.

    ​Content Covered by this Book

    Chapter 1, Introduction to the RPG Genre, Key Features and Design Concepts, provides general information about RPGs and the key features that can be found in this type of games. It also explains the features that you will be creating in this book, along with the philosophy behind the code covered.

    Chapter 2, Creating and Animating the Main Character, explains how you can create and animate your main 3D character, add a camera that will follow this character as well as a mini-map. You will also learn to use ProBuilder to create the 3D environment for your quest.

    Chapter 3, Creating a Dialogue System, explain how to create a dialogue system from an XML file, and how to integrate it seamlessly into your game.

    Chapter 4, Creating an Inventory System, explains how you can create a simple inventory system and use it to collect, store, and use items that you will find in your quest. You will also learn to create a health bar.

    Chapter 5, Creating a Shop and a Buying System, shows you how to create a shop where the player can buy items that will then be added to the inventory.

    Chapter 6, Adding Weapons and Protagonists, explains how you can create different types of animated and intelligent NPCs that will challenge the player.

    Chapter 7, Adding a Quest System, explains how you can create a quest system based on an XML file to manage the objectives for each of your levels.

    Chapter 8, Creating an XP Attribution System, explains how you can create user interface through which the player can use their XPs to increase their skills.

    Chapter 9, Creating A Maze Procedurally, explains how you can generate a maze procedurally from code and add objects and NPCs to it.

    Chapter 10, Creating The Final Level, explains some interesting features that you can use to increase your game play.

    Chapter 11 provides tips on how to extend your RPGs.

    Chapter 12 summarizes the topics covered in this book and also provides useful information if you would like to progress further with this book series.

    What you Need to Use this Book

    To complete the project presented in this book, you only need Unity 2018 (or a more recent version) and to also ensure that your computer and its operating system comply with Unity’s requirements. Unity can be downloaded from the official website (http://www.unity3d.com/download), and before downloading, you can check that your computer fulfills the requirements for Unity on the following page: http://www.unity3d.com/unity/system-requirements. At the time of writing this book, the following operating systems are supported by Unity for development: Windows XP (i.e., SP2+, 7 SP1+), Windows 8, and Mac OS X 10.6+. In terms of graphics card, most cards produced after 2004 should be suitable.

    In terms of computer skills, all knowledge introduced in this book will assume no prior programming experience from the reader. This book does not include any programming, as this will be introduced in the second book in the series. So for now, you only need to be able to perform common computer tasks such as downloading files, opening and saving files, be comfortable with dragging and dropping items and typing.

    Who this Book is for

    If you can answer yes to all these questions, then this book is for you:

    Are you a total beginner in RPG?

    Would you like to become proficient in the core functionalities offered by Unity?

    Would you like to teach students or help your child to understand how to create games?

    Would you like to start creating great RPG games?

    Although you may have had some prior exposure to Unity, would you like to delve more into Unity and understand its core functionalities in more detail?

    Who this Book is not for

    If you can answer yes to all these questions, then this book is not for you:

    Can you already easily create a 3D RPG with Unity?

    Are you looking for a reference book on Unity programming?

    Are you an experienced (or at least advanced) RPG developer?

    If you can answer yes to all three questions, you may instead look for the next books in the series. To see the content and topics covered by these books, you can check the official website (www.learntocreategames.com/books/).

    How you will Learn from this Book

    Because all students learn differently and have different expectations of a course, this book is designed to ensure that all readers find a learning mode that suits them. Therefore, it includes the following:

    A list of the learning objectives at the start of each chapter so that readers have a snapshot of the skills that will be covered.

    Each section includes an overview of the activities covered.

    Many of the activities are step-by-step, and learners are also given the opportunity to

    Enjoying the preview?
    Page 1 of 1