0

I am new to php. I have a database of a turn based multiplayer game (game is made in unity 3d). Table GameTable stores the ids of two players ,their positions and a boolean to determine whose turn it is. 1 if player1's turn and 0 if player 2's turn.

I want that after every minute the position increments itself and the turn changes. I want this to happen automatically on the server side.

I am familiar with Cron jobs. But i don't want to create separate cron job for every entry in the table. Any ideas guys ?

Sameer Hussain
  • 2,421
  • 8
  • 23
  • 41
  • 3
    Use google for this, it's pretty basic stuff. Once you have some code and it's still not working, you can ask again. – SubliemeSiem Mar 22 '16 at 10:23
  • In unity use **Invoke()** to make timers and control your flow. it's extremely simple. google "unity3d Invoke" for a million examples. it's one of the most basic things. – Fattie Mar 22 '16 at 15:41
  • Possible duplicate of [Checking condition and calling continuous method with periods of delay unity](http://stackoverflow.com/questions/35807232/checking-condition-and-calling-continuous-method-with-periods-of-delay-unity) – Fattie Mar 22 '16 at 15:42
  • more examples .. http://stackoverflow.com/a/35970758/294884 – Fattie Mar 22 '16 at 15:42

0 Answers0