Skip to content

Specification V1

Jinghan Wang edited this page Oct 3, 2016 · 26 revisions

Mi Data

  1. Data model - Attributes [Date Scale: A-B-C-D-E-F-Today]
    • HP:
      • computed from other property in the past one week.
      • When health goes to zero, Mi go die.
      • This attribute also represents the max health in battle.
    • CP:
      • computed from XP and Level.
      • Higher CP means higher attack.
    • Strength:
      • computed from human.steps (Goal is calculated from the average step counts of past 7 days.
      • If data is not there (e.g. new iPhone), use the default value of 5000.)
      • Speed should decrease based on time
      • Strength = (A + B + C + D) * 4 / 1000 steps + E * 6 / 1000 steps + F * 8 / 1000 steps + Today * 10 / 1000 steps
    • Stamina:
      • computed from distance (Goal is calculated from the average walking+running distance of past 7 days.
      • If data is not there (e.g. new iPhone), use the default value of 2km)
      • Stamina = (A + B + C + D) * 4 / 1000 meters + E * 6 / 1000 meters + F * 8 / 1000 meters + Today * 10 / 1000 meters
    • Agility:
      • computed from flights climbed (Goal is calculated from the average flight climbed of past 7 days.
      • If data is not there (e.g. new iPhone), use the default value of 5)
      • Agility should decrease based on time
      • Agility = (A + B + C + D) * 2 / 1 floor + E * 3 / 1 floor + F * 4 / 1 floor + Today * 5 / 1 floor
    • Mood:
      • Min 50 to Max 100
      • computed from interaction
      • Each petting interaction contributes to 10 points, only 2 petting interaction is allowed every hour
      • Mood will decrease automatically every hour
    • XP
      • You receive 4.00 XP for each second you are active the exercise
      • You will receive a bonus 250 XP reward upon finishing 1 goal
    • Level
        1   ----  1500
        2   ----  3000
        3   ----  4500
        4   ----  6000
        5   ----  7500
        6   ----  8500
        7   ----  9500
        8   ----  10500
        9   ----  11500
        10  ----  12500
        11  ----  13500
        12  ----  14500
        13  ----  15500
        14  ----  16500
        15  ----  17500
        16  ----  18500
        17  ----  19000
        18  ----  19500
        19  ----  20000
        20  ----  20500
        21  ----  21000
        22  ----  21500
        23+ ----  22000
  1. How to store and what to store?

    • Realm for iOS local database
    • Exercise start time, end time, current mood
  2. Computed properties' formula?

Mi Name

  1. Name generation
  2. User input names

Basic Sprite(Mi) Actions

  1. Running
  2. Playing
  3. Staring Roof

Status Snapshot

  1. Timestamp
  2. Mi data
    • Mood

Exercise

  1. What to display in exercise view

    • Human Calories
    • Steps
    • Distance
    • Sports Mode
    • Flights
    • Mi reactions (you run I run)
    • Changes in attribute bars
  2. How to handle offline exercise data and its update

    • Store a status snapshot when app goes to background.
    • When use comes back, take the snapshot, calculate base on the time ecllapsed
      • Calculation of mood
      • Process data between last and current checkins
        • data is calculated in the interval of 1 day
        • update HP based on the data for each day
        • calculation for offline data doesn't consider the mood of component in version 1

Statistic Page (Mi Only, Human refer to Health.app)

  1. Show latest data for today in a separate section
  2. Show the recent 7 days in charts (only organised by summary of the day for now)
  3. Older data are shown in tables (similar to Health.app)
  4. Exercise records

Future work

  • Achievements
  • Battle
  • Mi Items
Clone this wiki locally