Announcement

Collapse
No announcement yet.

[Help] How to create an energy refilling in realtime systme on Android

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Help] How to create an energy refilling in realtime systme on Android

    I want to create one of those systems where the player has only so much energy to play each level, and playing one losses one point, and can't play a level without energy.

    Then, say, every hour, the player regenerates 1 energy point.

    My current idea is, when the player opens the level select menu, find the difference between the current time and the last time they left this UI and calculate this difference.

    This seems fairly simple to implement, but I'd like to hear any other ideas for this system, because maybe there is an even easier way.

    #2
    Yeah if you do it locally that will be the way. Candy Crash work that way. You can check it because if you change clock settings you then get lives.

    Or you can use something like this,https://github.com/PlayFab/PlayFab-S...ratingCurrency, and do the calculation at Playfab, or something similar on you servers. Of course it requires more work.
    Last edited by Makis; 02-03-2017, 03:22 PM.
    Pandora Entertainment
    github.com/PandoraEntertainment
    [PLUGIN][FREE] AdColony, AppLovin, Chartboost, UnityAds, Vungle, Sharing, OneSignal, Facebook, Everyplay.

    Comment


      #3
      Okay, great! And I don't have any servers, so I'll just stick to this way.

      Comment

      Working...
      X