Welcome Guest, Not a member yet? Register   Sign In
Psuedo Code Needed...
#10

[eluser]troy_mccormick[/eluser]
[quote author="Nick Husher" date="1236842353"]The server stores the game state in a database or other persistent solution, and hands back updates to the game state to any registered requesting clients. Think about it like a double-blind game of Axis and Allies played over the phone.[/quote]

This is about exactly how I have it setup. The database stores the game_data and player_data in a table as a PHP serialized array along with a date/time when each was last updated. Right now I have the client side "pinging" the server for changes every three or so seconds. If there is an update, it pulls down a JSON response and updates the table view as needed.

However, I'm still left with the fact that I want to delay the update on the client side table view during the showdown stage of the hand. If I hold off to start a new hand after x seconds and start that new hand when a new ping comes in from any of the players, there could be a race situation in that the hand could be started multiple times by multiple players. Should a player close their browser window and not return, it then may be possible for the whole game to come to a hault, which would anger the rest of the players Tongue

Thank you for all the ideas though...keep 'em coming!!! Tongue


Messages In This Thread
Psuedo Code Needed... - by El Forum - 03-11-2009, 02:27 PM
Psuedo Code Needed... - by El Forum - 03-11-2009, 02:52 PM
Psuedo Code Needed... - by El Forum - 03-11-2009, 03:07 PM
Psuedo Code Needed... - by El Forum - 03-11-2009, 03:13 PM
Psuedo Code Needed... - by El Forum - 03-11-2009, 03:30 PM
Psuedo Code Needed... - by El Forum - 03-11-2009, 05:43 PM
Psuedo Code Needed... - by El Forum - 03-11-2009, 08:19 PM
Psuedo Code Needed... - by El Forum - 03-11-2009, 08:24 PM
Psuedo Code Needed... - by El Forum - 03-11-2009, 10:11 PM
Psuedo Code Needed... - by El Forum - 03-12-2009, 08:58 AM
Psuedo Code Needed... - by El Forum - 03-12-2009, 10:39 AM
Psuedo Code Needed... - by El Forum - 03-12-2009, 10:47 AM
Psuedo Code Needed... - by El Forum - 03-13-2009, 09:21 AM
Psuedo Code Needed... - by El Forum - 03-13-2009, 01:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB