Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Gamification with Unity 5.x

You're reading from  Gamification with Unity 5.x

Product type Book
Published in Nov 2016
Publisher Packt
ISBN-13 9781786463487
Pages 328 pages
Edition 1st Edition
Languages
Concepts

Table of Contents (16) Chapters

Gamification with Unity 5.x
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. The Anatomy of Games 2. Who or What Am I? Understanding the Player 3. An Engaged Player is a Happy Player 4. Organized Chaos - Getting Ideas Out of Your Head and on to Paper 5. Sculpting the Conceptual Beast 6. Breathing Life into Your First Creation - Creating and Importing Assets for Your Application 7. Get Your Motor Running 8. Break, Destroy, and Rebuild - the Art of Playtesting and Iteration 9. Graduating Your Project to Completion 10. Being the Best That You Can Be!

Chapter 3. An Engaged Player is a Happy Player

Life is better when it's interesting than when it is dull and mundane. It is likely that you have a nice memory of a time when you were playing a game and felt completely immersed and enjoyed the experience; it is also equally likely that you recall when this was not the case. Ideally, as designers, we want anyone that plays our games or uses our gamified applications to have pleasant memories and experiences, and even better to bring others into our worlds of fantasy and enjoyment. Therefore, in this chapter, we will look at the following topics so that we can create an enjoyable experience for your users:

  • To begin, Keeping 'em engaged will look at ways to provide feedback, reinforcement, as well as track the progress of the player during their engagement with the application. In addition, it will describe ways to engage players throughout the experience.

  • Next, How am I doing? discusses how gaming experiences report feedback. Whether you provide...

Keeping 'em engaged


Take a moment to think about your gaming experiences. What is it about them that you like? Are you a fan of progression, or do you like to be acknowledged for your efforts? In this section, we will focus on providing feedback to players, and how to keep them motivated and engaged. We will look at different examples of player feedback, such as progress bars, and how can we implement them into Unity.

Feedback can be both positive and negative, and can be provided to the user in more than one way. You can provide encouragement for eliminating multiple enemies with onscreen popups saying things such as Fantastic or Multi-kill! You can also achieve this by having positive sounds, usually sounds that are pleasant to the ear (such as a chime). In contrast, when a player does something wrong, you can display onscreen messages such as Fail or Incorrect and, just like positive sounds, you can have negative ones such as a loud horn and so forth. However, just like someone nagging...

How am I doing?


There are many ways that we can provide feedback to a player. Just like being in school, if you did a test, you were given feedback such as a mark or a Fantastic written next to your result. In other cases, if you did something wrong, you will have probably heard your name being called out by the teacher. In this example, you will learn how to create two types of feedback: visual and audio. In addition, feedback can be given in real-time or can be given at the end of an event. When, where, and how the player gets their feedback, depends on what you as a designer are trying (to get the player) to achieve.

Keeping it visual

To create visual feedback within Unity, we need to display a screen to the player. It can contain both a congratulations screen or a retry one. Whatever your feedback is, the way to implement it within Unity is always the same.

Let's start by creating a new image in Unity. Right-click on the Hierarchy panel and then UI | Image. We can rename it Visual Feedback...

Someone call a doctor!


When you're fighting against an enemy, it is imperative that you know how much life you have left, especially if you have the ability to heal yourself during a high-intensity shoot-out, or when you're the last man standing defending your team's title! In gamified applications, health can also be a way to provide players with a limited number of opportunities to fail, before having a cool down period and resuming the experience or prompting them to start again. In either case, health can be displayed in many different ways. You can have a series of hearts, a green bar, or you might have something such as a percentage next to an icon. For the purpose of this chapter, we will create a health counter like the one in the following screenshot. You will also learn the basic skills that you will need to know in order to transform it into any of the types mentioned previously. All these icons can be found at www.player26.com:

Different health bars in games

Circular health bar...

On point!


Points can come in various ways. A player can obtain points by defeating an enemy, doing the right thing, or even working cooperatively with other players. Now we have worked on a lot of images, this section shows us how to use the text component to implement a Point System.

Let's start by creating a text component. To do this, right-click on the Hierarchy panel and then select UI | Text. We can rename it Point System. Feel free to customize it as you want by changing the font, size, and so on. It doesn't matter what text you put in it, because it will be replaced by our script, but we can use anything as a placeholder. In this case, we can write Points: 100. Once we have done all of this, we should have something that looks the following screenshot, in the Scene view:

The points system in Unity

Now, let's add a script and name it PointSystemScript. Since we are going to use UI components, let's import the library by adding the following line at the beginning of our script:

using...

You've come this far, keep going


This section will discuss ways to monitor an individual's progress, as well as display it.

We will be populating it with various icons, which can be downloaded from www.player26.com, and can be seen in the following screenshot. These icons are available in six different colors (magenta, yellow, blue, green, orange, and red) and three different styles (flat, glossy, and colored). These icons will represent basic things within the game, such as lives, achievements, events, unlockables, and mystery items. However, feel free to add or even change their association to suit the kind of game or app that you are creating:

Different icons to choose from

Making progress

As humans, after we commit a certain amount of time and effort to something, we want to see our progress. Progress bars are excellent ways of demonstrating this. They can be designed in many different ways, for example, they can be segmented, where each segment represents a part of the overall progress...

Showing off how awesome you are


What's the point of having achievements without showing them off? Maybe you want to feel like you have accomplished something after a long day of work, or maybe you just want to show off your shiny new badges to your friends. That is why we will be creating a profile page with our achievements included. The basic screen that we will have after this section looks like the following screenshot:

The Achievement page

Badges, badges, badges

Now it is time to implement some badges that are based on the player's achievements. An example of what the finished product will look like can be seen in the following screenshot. For now, we will be using the icons from www.player26.com, but feel free to use any other images that you may have:

Completed badge part of the application, featuring (left) the unlocked version and (right) the locked version

Achievement unlocked!

Items that are locked can create a mystery about what they actually contain. Do they have some rare item...

Taking in the view with dashboards


Overviews, summaries, and simplicity make life easier. Dashboards are a great way to keep a lot of information relatively concise and contained, without being too overwhelming to a player. Of course, if the player wants to obtain more detailed information, perhaps statistics about their accuracy since they began, they have the ability to do so.

So, what exactly is a dashboard? A dashboard is a central hub to view all of your progress, achievements, points, and rewards. If we have a look at the following screenshots, we can get a rough idea of the kind of information that they display. The image on the left is the dashboard for Memrise and displays current language courses, in this case German, the player's achievements, streak, and progress that he or she is making in the course. On the right is the dashboard for DuoLingo. Similar to Memrise, it also features information about daily streaks, amount of time committed, and the strength of each category learned...

There is no I in team


Working on our own can be good, but sometimes working with others can be better! But the problem with working in a team is that we're all not equal. Some of us are driven by the project, with the aim of getting the best possible outcome. Others are driven by fame, reward, money, and the list goes on. If you have ever worked on a group project, then you know exactly what it's like. Agile gamification is, to put simply, getting teams working better together.

Often, large complex projects encounter a wide range of problems, from keeping on top of schedules, different perspectives, undefined roles, and a lack of overall motivation. Agile frameworks in this context are associated with the term Scrum. This describes an overall framework used to formalize software development projects. The scrum process works like this:

  1. The owner of the product creates a wish list known as the product backlog.

  2. Once the sprint planning begins, members of the team (between 3-9 people) take sections...

Summary


This chapter has covered topics in Unity for keeping the player engaged and looked at different ways to approach this. Next, we looked at how we can encourage the player and indicate their progress with different types of feedback, both in visual and audio ways, to indicate to the player right and wrong actions. Then, we learned how to implement various game elements in Unity, such as health indicators (a circular health bar and a lives counter), progress bars, badges, and points. After this, we looked at gamification dashboards, their design, and their overall objective. Lastly, we discussed what it means to work with agile gamification and keeping a team motivated.

Overall, in this chapter, we have seen how to create different game elements that can be reused (and we will reuse them in the next chapters). We have also used some of the knowledge acquired from the first two chapters to better understand and create these game elements.

In the next chapter (Chapter 4, Organized Chaos...

lock icon The rest of the chapter is locked
You have been reading a chapter from
Gamification with Unity 5.x
Published in: Nov 2016 Publisher: Packt ISBN-13: 9781786463487
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}