Sleep Pet

Concept

A virtual pet mobile game that aims to alleviate habits in individuals struggling with ADHD. The application has been specifically designed to help users improve their sleep patterns and overcome bad habits by utilizing a variety of cutting-edge techniques. This project was a graduation project for a client and went through the typical game development cycle that included research, conceptualization, prototyping, and evaluation phases.

Features include:

  • Non-intrusive Sleep Monitoring
  • Streaks System
  • Habit Builder
  • Sleep Feedback
  • Routine System
  • Sleep Metrics
  • Alarm System


Project Details

Team Size: 1

Year: 2023

Project Form: Graduation Project for a Client

Project Length 6 Months

Engine: Unity

Source Control: Plastic SCM

Notable Work

Overview

  • Successfully completed the entire game development cycle, covering every stage from research to completion
  • Applied comprehensive research methodologies, including desk research, literature studies, surveys with target audience, and analysis of best, good, and bad practices
  • Utilized a variety of ideation techniques during the conceptualization phase, such as generating 20 ideas, brainstorming, mind mapping, biomimicry, a weighted matrix, and competitive analysis
  • Engaged in multiple iterations and revisions during the prototyping stage, driven by evaluation results, including mockups and product research
  • Conducted thorough evaluations of the product across various stages, employing focused playtesting, post-test surveys, expert reviews, usability tests, think-aloud protocols, and observation to refine the final product
  • Worked with the Android Native Plugin for Unity, addressing existing plugin issues to enable key features for the project, including input monitoring and alarm functionality

  • The complete thesis is available for reference

Design Research

A significant portion of the early research for this project revolved around finding an approach to address sleep habits that would also be ADHD-friendly. This necessitated exploring what constitutes as being ADHD-friendly. The research phase offered valuable insights into the relationship between games and neurotypical individuals. Engaging with the target audience and consulting experts in both the gaming field and neurotypical sciences yielded excellent results, including a chart of best, good, and bad practices. This chart guided my conceptualization phase, helping me determine the optimal course of action for the project.


Noteworthy efforts during the research and conceptualization phases included:

  • Desk and literature studies conducted on the problem context.
  • Focus groups with the target audience, followed by various surveys.
  • Interviews with experts in various related fields.
  • Market research and competitive analysis of products in the habit and ADHD domains.
  • Compilation of a chart outlining best, good, and bad practices based on research outcomes.
  • Use of a Weighed Matrix for comparing conceptual ideas.

Best, Good & Bad Practices

Category Practice
Best Habit Change Provide player feedback as a response to features or mechanics. Positive reinforcement for user growth through rewards and affirmation can instill a sense of achievement and encourage continued personal development (Pramana et al., 2018).
Good Habit Change Allow for autonomy and flexibility for the user (Suleiman-Martos, Grcia-Lara, & Martos-Cabrera, 2021). Given that irregularities can arise at any time, enabling users to adjust their goals, progress, and results provides a way to address unpredictability in the product's design.
Bad Habit Change Restrictiveness in how the user can use the application can negatively impact user enjoyment and engagement. This is particularly crucial when the application is intended to assist the user (Schmidt-Kraepelin, Warsinsky, Thiebes, & Sunyaev, 2020).
For a more detailed chart, please refer to page 6 of the accompanying thesis.

Development

Following the conceptualization phase, the project transitioned into the development stage. Mockups were created and tested with the target audience. The product's objective was to address poor sleep habits through intrinsic motivation and inadvertent learning. Users engaged with a virtual pet representing their sleep hygiene and health.

The product underwent multiple iterations, exploring ideas like mini-games and cosmetics, which were later discarded. These features were considered due to their prevalence in gamification and virtual pet games. However, considering the project's focused scope and intent, the decision was made to prioritize features with more immediate potential and results. This clear focus paved the way for a more direct path to success in app development.

Noteworthy highlights of the development phase include:

  • Collaboration with Android's Native Plugin for Unity, enabling access to Android phone features like alarms and input monitoring.
  • Creation of a streak system similar to Duolingo's approach.
  • Implementation of a customizable habit system with savable user routines.
  • Integration of a user progression tracking system, offering tailored feedback based on results.
  • Design of a responsive UI to accommodate various resolutions and devices.
  • Development of a binary-formatter save system.
  • Inclusion of a tutorial for guiding new users through the application.
  • Utilization of SOLID principles in the project's architecture to ensure a smoother development experience.

Design Challenges

Sleep Monitoring

Sleep monitoring is a prevalent design concern whenever designing an application that wants to improve the users sleep. The conventional approaches often demand intrusive actions from users, such as utilizing third-party technologies or recording their sleep throughout the night. This inconvenience leads to a significant drop-off in user retention. In my design approach, I aimed to minimize intrusiveness and enhance user-friendliness.

My strategy involved exploring ways to monitor sleep duration using the device's internal clock, a less intrusive method. While the internal clock can be unreliable in accurately gauging sleep duration, I devised a solution. The application would estimate sleep length by tracking the time of app closure and subsequent reopening. However, this approach had limitations, considering users might not immediately fall asleep after closing the app, nor would they open it immediately upon waking. To address these challenges, I developed a system that leverages user-provided data. The application initially offers sleep time estimates based on app usage patterns but allows users to manually correct these estimations. Although granting users editing control might raise concerns about accuracy, the design prioritized user empowerment and trust. By refining sleep duration estimations through user input, the application continually enhances its accuracy, resulting in a non-intrusive sleep monitoring system that encourages users to focus on their sleep habits rather than minutiae.

The design went over incredibly well in testing with the target audience and client. The applications new found method of sleep monitoring boosted engagement as it became a less intrusive feature.

Brand Integration

Seamlessly integrating a client's brand into a product can significantly enhance both the product and the client's brand. However, it can have adverse effects if not executed thoughtfully. Initially, I opted for a conservative approach, incorporating elements like similar color palettes, targeting the same audience, and incorporating client logos. Despite these efforts, I felt the connection was lacking.

The client is known for an online serialized comic series. Recognizing the potential, I proposed a non-intrusive integration of the client's work into the application. Collaborating with the client, we devised a system to reward users with chapters from the comic series, focusing on ADHD-related themes. These rewards were tied to the streaks system, incentivizing users to improve their sleep habits by unlocking new comic chapters. The characters from the game were seamlessly woven into the comic, establishing a genuine and organic connection, resulting in increased engagement with the client's other products and exciting rewards for users.

Android Native Plugin

One of the more challenging aspects during development was working with Android's Native Plugin. This plugin was poorly documented for Unity and lacked online support for certain features, such as alarm settings. This necessitated a deeper dive into the plugin and solving persistent issues. Below is an excerpt of the code written in Unity to handle alarms. Certain challenges arose from C# lacking access to ArrayLists, requiring the creation of custom solutions using Android's Native Plugin.

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class Alarm : MonoBehaviour
{   
	//https://developer.android.com/guide/components/intents-common#Clock
	private const string ACTION_SET_ALARM = "android.intent.action.SET_ALARM";
	private const string EXTRA_HOUR = "android.intent.extra.alarm.HOUR";
	private const string EXTRA_MINUTES = "android.intent.extra.alarm.MINUTES";
	private const string EXTRA_MESSAGE = "android.intent.extra.alarm.MESSAGE";
	private const string EXTRA_VIBRATE = "android.intent.extra.alarm.VIBRATE";
	private const string EXTRA_DAYS = "android.intent.extra.alarm.DAYS";

	// Create an alarm using provided settings
	public void OnClick(AlarmSettings settings)
	{
	string finalName = settings.Name();
	if(finalName == string.Empty) finalName = "Sleep Pet";
	CreateAlarm(finalName, settings.Hour, settings.Minute, settings.Vibrate(), settings.Days());
	}

	// Configure and initiate alarm creation
	private void CreateAlarm(string message, int hour, int minutes, bool vibrate, List m_Days)
	{
	// Prepare the Android Intent for alarm creation
	var intentAJO = new AndroidJavaObject("android.content.Intent", ACTION_SET_ALARM);
	intentAJO
		.Call("putExtra", EXTRA_MESSAGE, message)
		.Call("putExtra", EXTRA_HOUR, hour)
		.Call("putExtra", EXTRA_MINUTES, minutes)
		.Call("putExtra", EXTRA_VIBRATE, vibrate);

	// Custom ArrayList int
	if(m_Days != null && m_Days.Count > 0){ // if days should repeat

		// get an instance of a Java ArrayList
		AndroidJavaObject arrayList = new AndroidJavaObject("java.util.ArrayList");

		// get an instance of java Integer class : 
		// ArrayLists use generics, so a type doesnt need to be assigned to them on creation
		// Java's generics try to match C#'s int against Java data types - in this case int does not exist
		// Thus in order to get a suitable match we need to create an instance of an unsigned Integer
		AndroidJavaClass integerClass = new AndroidJavaClass("java.lang.Integer"); 

		// Loop through a list of int's that correspond with key's for the Java Calender classes enum for Days
		for(int i = 0;i < m_Days.Count;i++){
		// using CallStatic over Call lets us access the static method to interpret non-native data types in Java
		// This lets us convert the C#/C/C++ implementation of int to Java's Integer type
		AndroidJavaObject intToInteger = integerClass.CallStatic("valueOf", m_Days[i]);

		// Now that the type is native to Java, it's possible to access the ArrayList like intended
		arrayList.Call("add", intToInteger);
		}

		// Add the list to the EXTRA_DAYS android intents
		intentAJO.Call("putExtra", EXTRA_DAYS, arrayList);
	}
		
	GetUnityActivity().Call("startActivity", intentAJO);
	}

	AndroidJavaObject GetUnityActivity()
	{
	using (var unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
	{
		return unityPlayer.GetStatic("currentActivity");
	}
	}
}
																					
									

This browser does not support PDFs.



Links