Browser Based.. Updating turn times?
Alright guys,
Im going to have a go at making a new browser based game.
I will not use socket servers or anything.
What i really want to know is how the users "money" "turns" will update without a socket server?
If only one user is browing the site, and the turn time goes into the next turn, how will all the other players money update?
Would i need to update the entire database?
Any help on this would be helpful.
P.s im using mysql, php. Cheers.
Im going to have a go at making a new browser based game.
I will not use socket servers or anything.
What i really want to know is how the users "money" "turns" will update without a socket server?
If only one user is browing the site, and the turn time goes into the next turn, how will all the other players money update?
Would i need to update the entire database?
Any help on this would be helpful.
P.s im using mysql, php. Cheers.
Record the last time the user was given their turns/money, store that somewhere for each player, and within your login code you could check if enough time has passed to give them more money. If I remember you can subtract dates/times in php to give you how many hours/minutes has passed, then divide the hours by 24, giving you the days (you would have to round this down of course).
Or you could call a php script to give them their turns/money yourself, but doing something yourself is not allowed in today's world; it's amazing how far we will go to be lazy =]
Tobs
Or you could call a php script to give them their turns/money yourself, but doing something yourself is not allowed in today's world; it's amazing how far we will go to be lazy =]
Tobs
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| updating to ios5 recorder doesn't work anymore | sefiroths | 3 | 3,240 |
Nov 21, 2011 03:56 AM Last Post: sefiroths |
|
| Best Engine/Framework For iPhone Turn Based Strategy? | Brawnydt | 6 | 5,543 |
Oct 11, 2010 06:47 PM Last Post: MattDiamond |
|
| About object creation, updating, interactions, Unity | Najdorf | 26 | 7,751 |
Jan 12, 2010 04:40 PM Last Post: AnotherJake |
|
| Updating Map Annotations - coordinates | PHANTOMIAS | 0 | 2,188 |
Dec 8, 2009 08:39 AM Last Post: PHANTOMIAS |
|
| turn int to NSString? | Phate | 3 | 4,775 |
Dec 18, 2002 05:47 PM Last Post: Phate |
|

