P
P
paleniy2016-02-10 23:23:12
Android
paleniy, 2016-02-10 23:23:12

How to implement in-game energy on Android?

Good day/night everyone!
I tried to find how to implement energy in games on Android, but I did not find anything either among Russian sources or in foreign ones - everywhere "battery saving" or "bluetooth energy".
Actually, the question is how to implement energy in an android game? You can describe it simply in words or throw off useful links
PS I am writing the first game in android studio with zero experience in development

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nicholas, 2016-02-11
@palenyy

Everything is simple! Make an expense for finding a battle, etc.
and the function of restoring on the server by time 10 energy per hour (just as an example) and check by timestamp who how much to add (for those who were offline, we accrue energy at the time of entering the game)

L
lomikman, 2016-02-11
@lomikman

if you mean buying in-game currency/energy/health, then use
developer.android.com/intl/ru/google/play/billing/...
if you mean saving some characteristics so that when you restart the game, the value returns to you can still use SharedPreferences
developer.android.com/intl/en/training/basics/data...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question