php - IOS Game - Life Regeneration -


i have ios / cocos2d game php/mysql server user given 5 lives @ start. users can connect on device play via facebook account.

each time play game, 1 life used up. lives regenerate once every 10 minutes, regardless of whether app active, resigned or terminated.

i understand can use nstimer or ccdelaytime "regenerate" lives while app active, how can persist while app minimized or closed? should implement on server side?

should implement on server side?

i think should handle on server side 2 main reasons:

  1. you app can played more 1 device. number of remaining lives should same whatever device playing needs kept in unique place.

  2. also keeping number of lives on server side prevent users trying hack app changing locally number of remaining lives.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -