Monday, May 1, 2017

Building an Achievement engine with Azure Service Fabric - 01

First if you don't know what Azure Service Fabric is, go here to learn more.  I have been playing around with Azure Service Fabric and I felt that the virtual actor pattern used in Azure Service Fabric would be a good fit for building an achievement system.  For this series I will be basing the achievement engine off of the Nike Fuel trophies system.  I will not be implementing all the trophies just the ones I have grouped and referenced at the end of this post.

What is Nike Fuel?
Nike fuel is a proprietary unit of measurement for tracking fitness activity developed by Nike.  The algorithm is the same for everyone, so everyone is on an even playing field.

How to get Nike Fuel?
All products under the brand allow the user to earn Nike Fuel. Products include the Nike+ FuelBand accelerometer wristband; other wristbands such as SportWatch and SportBand; etc...

Most of the products that generate Nike Fuel allow the user to set a goal.  Example; reach 5,000 Nike Fuel in a day.

What is Going Green?
Going green means you completed your goal.  Example; earning 5,000 Nike Fuel in a single day would complete the goal referenced above.

Nike Fuel Trophies (Achievements)
It was difficult to get accurate information about the different trophies provided by Nike.  That being said I found several sources on the internet not affiliated with Nike that referenced information about the different Nike trophies that are available.  The trophy information below while it may not be 100% accurate is good enough to use as an example for this blog series.

Daily Goal Trophies

Water Beat Daily goal by 50%
Ice Double your daily goal
Fire Beat daily goal by 150%
Rainbow Triple your daily goal
Supernova Quadruple your daily goal

Daily Fuel Trophies

8k day Earn 8,000 fuel in a day
10k day Earn 10,000 fuel in a day
15k day Earn 15,000 fuel in a day
20k day Earn 20,000 fuel in a day

Total Fuel Trophies

5k Earned 5k fuel total
10k Earned 10k fuel total
25k Earned 25k fuel total
50k Earned 50k fuel total
75k Earned 75k fuel total
100k Earned 100k fuel total
150k Earned 150k fuel total
200k Earned 200k fuel total
300k Earned 300k fuel total
400k Earned 400k fuel total
500k Earned 500k fuel total
600k Earned 600k fuel total
700k Earned 700k fuel total
800k Earned 800k fuel total
900k Earned 900k fuel total
1M Earned 1M fuel total
1.15m Earned 1.15M fuel total
1.2M Earned 1.2M fuel total
1.5M Earned 1.5M fuel total
2M Earned 2M fuel total

Streak Trophies

7 days Get to green 7 days in a row
14 days Get to green 14 days in a row
30 days Get to green 30 days in a row
50 days Get to green 50 days in a row
100 days Get to green 100 days in a row
365 days Get to green 365 days in a row

Date Based Trophies

Jack O Lantern Get to green on Halloween
Uncle Sam Get to green on the 4th of July
Chocolate Heart Get to green on Valentine's Day
La Fiesta Get to green on Cinco de Mayo
Resolution Get to green on New Years Day

The plan for code
As part of this series I will be sharing the code in my GitHub account.  I am planning on making a branch for each blog post.  This way you will be able to follow along from post to post.  Also you should be able to access new branches before the corresponding blog post as I am writing the code over the coming months.

Next Achievement Post

No comments:

Post a Comment