Challenges & Achievements
Design Challenge
This devlog contributes to the design challenge: "Build upon an existing game made for diabetes patients with new features, so that the patient can get a more personalised experience whilst playing the game."
Context
Currently, SugarVita lacks replay-ability and is therefore less fun for the player. To give the player more to work towards and discover more lifestyles to coop with diabetes, I want to implement a challenge system to add different types of challenges to. To start off, I added challenges which can be tracked by the platforms "Play apps". These kinds of challenges are personal to each individual. This system would also need to keep in mind GameBus (against friends) will be added in the future and should co-exist alongside the achievement challenges.
How to create and implement a challenge system which cooperates with the achievement systems on target devices?
Methods
Library - Literature Study & Available Product Analysis
First, I tried doing some research online on how other games implement these sorts of systems. The first thing I found out was that "Challenges in Unity" doesn't yield useful search results. The closest keyword to "Challenges" I found was "Quest". A lot of similar concepts are used in a quest system, which I experimented with during the prototyping stage.
The next step is to learn how to implement achievements from Google Play Games and the Apple equivalent. To achieve this, I watched some tutorials on YouTube and used the official documentation on achievements, which all can be found in the sources section of this devlog. One handy tool I found is called "CloudOnce". This Unity package handles both Google and Apple achievements very easily using a single keyword.

Workshop - Brainstorm
Challenges in a game like SugarVita should encourage discovering other lifestyles to coop with diabetes. To support this, these challenges need to cover different activities and specific events. While brainstorming, I came up with x types of challenges.
- Glucose: Glucose challenges are designed to make the player more aware of glucose changes after certain actions. To complete one of these challenges, the player needs to make sure their glucose values are between certain values during the entire game.
- Score: Score challenges will of course be based on the amount of score a player gets during their play-through. Score will be (in the future) a way to determine how much risk the player has taken while still managing their glucose levels.
- Activities: Activity challenges are based on how many and which activities and events the player encounters during their play-through. They are designed to really challenge the lifestyle of the player and let them explore.
- Fun: Fun challenges are designed to explore the game itself and have fun along the way. These can range from beating a virtual opponent to go for a walk for the first time. There will also be playtime challenges in this category.
I discussed these ideas with my co-intern and he helped me adding more challenge ideas. He liked the clear divide in types of challenges and sees the possibilities of challenging people's lifestyle.
Workshop - Prototyping
For the prototype, I created a user interface and some code to be able to use scriptable-objects as challenges. I also implemented a proof of concept with "CloudOnce". It turns out adding achievements to the external achievement services is final which means they cannot be removed when added. This made me reluctant adding these to the external services. Also, because the game is currently very much in a creative development stage and concepts like score and activities are subject to change. Therefore, the system is ready to be used and filled with challenges, but it won't be live until later in the development cycle.



Result & Validation
The result was a very basic challenge system where one can simply add challenges in the form of scriptable-objects and can easily check if a challenge has been completed with the structure shown above. I showed my co-intern this proof of concept and he likes the way the code is set up. However, he didn't like the design of the popup which is easily adjustable and will be changed in the future. Because this feature is still a proof of concept, it cannot yet be tested with actual end users.

Next step
With the basic functionality of the challenges system in place, I can now focus on improving it and adding GameBus challenges to it.
Sources
- QUESTING SYSTEM in Unity! (2019, February 10). [Video]. YouTube. https://www.youtube.com/watch?v=e7VEe_qW4oE
- Unity Achievement Tutorial in 15 Minutes (Android & IOS). (2019, January 16). [Video]. YouTube. https://www.youtube.com/watch?v=v-ITInk5HLY
- Achievements | Play Games Services |. (2022, February 16). Google Developers. Retrieved 18 May 2022, from https://developers.google.com/games/services/common/concepts/achievements#:%7E:text=To%20create%20an%20achievement%20for,information%20required%20for%20this%20achievement.
- [RELEASED] CloudOnce | Unified Game Services API. (2014, June 22). Unity Forum. Retrieved 18 May 2022, from https://forum.unity.com/threads/released-cloudonce-unified-game-services-api.324084/
C. (2022, February 7). GitHub - CloudOnce/CloudOnce: Unified Game Services API for Unity. GitHub. Retrieved 18 May 2022, from https://github.com/CloudOnce/CloudOnce