Deeplinks in Text Express

Strategies: Library, Field, Lab, Showroom, Workshop

Analysis:

Literature study, Available product analysis, Requirements prioritization, Literature study, Interview, Domain modeling, Task analysis

Current situation

Text Express doesn't have a system which the players or developers to use to advertise the game and invite their friends in the game. Tjien- the designer of the game, believes that such a feature is necessary and could be achieved by adding deep links functionality to the game. The following assignment was given to me with the view that if it is implemented, it will increase the organic growth of the game:

Graduation assignment

There were 3 requirements for this deep linking system, which the game designer of Text Express gave me:

Initial requirements for deeplinking system

After a discussion with the designer, I have summed up the requirements:

Clarifications

After internet research, it was found out that those deep links will be generated from a 3rd party service, which will have to support Unity integration.

What 3rd party services are other games from Gamehouse using for such a system?

I wanted to collect information from other game studios in Gamehouse about what service are they using for handling deep links in their game and why. Only 2 studios were using deeplinks and I contacted them: One studio was contacted via chat and the other via video call.

One of the studios asked about what deep links service are they using

In the end, from the information gathered, it was found out that both studios were using One Link from AppsFlyer for handling deep links.

What service to use for deep linking?

Although all studios I have asked were using OneLink from AppsFlyer, I wanted to see why and what other alternative there are (GetSocialarrow-up-right, Unity deep linksarrow-up-right, AppsFlyer- OneLinkarrow-up-right) and make a comparison:

Pros and Cons of the researched deep linking services

After information gathering, assessing and a discussion with my technical manager, I chose to use AppsFlyer-OneLinkarrow-up-right, for handling deep linking in Text Express, because Text Express is also already using AppsFlyer and it would be cheaper, easier and faster to implement it.

In order to implement OneLink fast and successfully, I have researched what has to be done and have created a plan to follow:

Plan on setting up deep links

When the latter steps are implemented successfully, the navigation to a specific section in the game will come after reading the custom JSON data and handling that data to send the user to the specific section in the game:

How will the friend invite system work?

After discussion with the game designer- Tjien, I managed to extract the requirements and the flow which is wanted from the friend invite system and created a user flow diagram which served as a plan for what I have to do:

User flow and plan on how the friend invite system will work

Design:

Brainstorming, Literature study, SWOT analysis

No particular design was needed for the navigation system, as it was pretty straight forward system to implement, if you have the OneLink system up and runnning.

Friend Invite System

From the plan I have created in the Analysis phase it was determined the following: When a friend installs and opens the game via "friend invite" deep link, a reward to the player who sends the invite link is sent.

This means that in the "friend invite" deep link there should be included data about the person who is distributing this deep link (in the latter image, the data should be for Player "A"). Always having a different data of the person who is sharing the deep link, means that the deep link, has to be dynamically constructed in the game, every time a friend invite is being shared.

To do that, I researched and found out how a deep link is storing and carrying data. This is done via the text in the link:

Disection of a deep link, showing how data is stored in the link

After understanding how a deep link stores its data, I can now dynamically modify deep link templates from the game, just by specifyinga key and a value at the end of the deep link.

Rewarding functionality

First plan:

During the analysis phase it was determined that after the user was invited to the game by a friend, at the start of the game, both friends will be presented with a reward.

Currently, in Text Express there is the "Title news" system: Whenever there is a global event in a country (Christmas, Easter, Halloween, etc), the game shows a pre-configured "Title news" screen and gives a reward to all players, who start the game during that day of the event:

Title news example

The "Title News" reward is given at the start of the game. As the reward for the friend referral has to be given at the start of the game as well, at first I wanted to extend the "Title news" functionality, by allowing it to work for one player only, rather than just have it always working for all players.

How "Title News" are working now
How I plan to extend the "Title News" functionality, so I use it for the friend referral system

First plan design:

When I started looking into how I can extend the "Title news" system, I started noticing that there are only 2 things, the "Title news" and the "Friend Referral" systems have in common, however a lot of differences.

Why it is not worth extending the "Title news" system

As there are more different than common functionalities, I decided to create a brand new feature, called "Personal notifications", which will serve in the "Friend referral" feature, but later on can be used for other features as well.

New feature "Personal Notifications" design:

Each feature which modifies the player data in Playfab, has to work in sync with the backend of the game. This is done so that the game is more secure from hackers (Development requirements). As this is a new feature and it will read and modify the Player data in Playfab, it had to be designed together with the backend developer:

Personal Notifications Feature in Text Expresschevron-right

Realization

Code review, Unit testing, Guideline conformity analysis, Design pattern research, Available product analysis, Static Code analysis

By following the steps, which I've set up during the Analysis phase, I've set up a OneLink deep link template by adding custom data for navigation to a specific section:

Setting custom data for navigation to the "shop"

After the deep link was set I had to set up the SDK in the client. This was done with the view to follow the Single responsibility principle (SRP) for the DeeplinkManager class, so that there is only one place in the code, which will handle deep links:

Instantiating the Deep link SDK in a specified class for all 3rd party services in TX

After the SDK is initialized successfully it will check if the game was opened via a deep link or not. If the game is being opened via a Text Express deep link, which I have pre-configured in the OneLink console, then onAppOpenAttribution (Deep links Image 1) will be called and it will handle the incoming data.

Deep links Image 1

I handle the incoming data as a JSON file. As you see in the image above, if I have a key "navigationPage", then I have to check the value and act on it

Deep links Image 2

Personal Notifications and "Friend Invite" System

I have managed to dynamically generate deep links from the game, which can carry the data of the person, who wants to invite their friends. An example link was:

Personal Notifications feature

Implementing the "Personal Notifications" feature, which handles the rewarding functionality for the friend referrals was smooth, as I followed the solid design document, prepared in the Design Phase. During the implementations, no major setbacks were encountered.

Rewarding function for "Personal Notifications"

After having the personal notifications data and architecture integrated, I had to create a function to calculate the reward which has to be granted for the notification:

Explanation on what the rewarding function should do.

For this function I created 2 different solutions. One short one, using only LINQ arrow-up-rightand a longer one using several "If" and "foreach" statements.

Both functions did the same thing and I wondered, which one should be the one I choose, as both had pros and cons:

LINQ vs. Explicit "for"s and "foreach"s

As it would take a lot of time to isolate the code and make a test for myself on how much overhead does LINQ adds compared to the "for" and "foreach" solution, I made research on the internet to find out (benchmarksarrow-up-right, forumsarrow-up-right). As conclusion, when using LINQ only a small % of the performance is influenced (around 10%), compared to using "for"s and "foreach"s. With all modern and high-end devices, nowadays, this percent will probably not make any difference to how the game feels. However, in the end, I chose the longer version, as it will be understandable for all programmers, no matter their skills and knowledge, and eventually modifying and introducing changes to this rewarding functionality will be easier.

Unit Testing (almost)

After the function was implemented, I wanted to test it. As it is very hard to implement unit testing on a big Unity project, which has never had unit tests, I had to find another way to test if the rewards are properly calculated:

One example of the several manual unit tests I have runned to check if the function is calculating correct.

Although, my manual tests worked and proved useful by finding issues in the code (which later on were tackled), I believe that it would have been way easier if Text Express had and was built around a framework which would allow proper unit tests.

Sharing Menu

After the system was working I only had to find a way that a player can send an "invite friend" link to friends. My experience with apps and games, which have such an inviting system, is that when you want to share an invite link, a native Android or IOS sharing menu comes up and you use it to select a sharing service (WhatsApp, Email, Messenger, etc) and to send it to whoever you want. I played and researched the "Gamehouse" games, to see if they have such a system. In the end, "Bed And Breakfast" has an invite system, which had a sharing menu, so I talked with one of its developers to see how they are handling this functionality.

Asking Bed and Breakfast developer on how the sharing menu works in their game

After research, it was determined that the plugin is free of charge and can be used without any contract.

The implementation of the "native sharing menuarrow-up-right" was described well and easy to follow. After testing and checking if it works, I've sent a "showoff" invite deep link to my colleagues to show them that it works:

Showcasing that the sharing menu works well and receiving appreciation

Evaluation

Root cause analysis, Brainstorming

What Text Express currently has in and working is deep links that can open different sections of the game such as the Shop Page, the Events page, or the Customization Page. With such links, the developers of TX can easily prompt the players to those sections and show them immediately what new stuff they have to offer. Such functionality definitely improves the communication between the community and the game/creators(Blue Giraffe).

Clicking navigation deep link, opens the store of the game at start

Friend Referral system

With deep links we now allow our players to invite their friends and reward them for doing so. By adding such functionality, we allowed the Text Express players to do "word-of-mouth" advertising, which will exponentially increase the organic growth of the game and save up money for User Acquisition.

Clicking a link send you to the Google Play store when you don't have the game
After clicking on a friend refer and installing the game for the first time a welcome reward is introduced

For the future:

I am not even sure if it is possible at this step in the development of Text Express or if it is worth the time, but it would be very good that the whole Text Express project takes a step back and tries to implement Zenjeckarrow-up-right. This tool allows to use Dependency Injection in a Unity project and then easily implement Unit tests. Unit tests will allow faster testing and therefore, faster build/updates/features deliveries.

Push Notifications in Text Expresschevron-right

Last updated