swift - Creating an online game feature without Server Side logic? -
so im developing simple game. using swift + firebase.
users can login in game , click button fight "boss". other users can fight same boss "instance".
on firebase db there reference "instance" of "boss" amount of "life","dmg players per second", "# of players fighting it".
i use realtime database update "boss's life" , "# of players fighting it" on each user's viewcontroller
.
my question since "boss instance" "damage per second" how can make sure thats running when users put game in background?
i can put nstimer in viewwillappear()
but want player damaged in background , if player's life reaches 0 -> save in db , note "player has died" in db well. when come run check , tell them have died , boot them main view controller
.
hope makes sense!
iv been trying figure out weeks , im @ point cant skip it!