简体   繁体   中英

Server Implementation of a web based silverlight card game

I have to develop an in-browser card game using silverlight. The game requires exactly four players to play. Now what i have read online, is that i have to implement that game logic on aa server and handle game event via sending webservice requests to that server.
My question is, how can we implement a server, which can handle multiple instances of game [loop]. I have no idea how will the server handle separate instance of the game for groups of 4 people. I want all the people to connect to the server and and then be able to run an instance of the game after selecting the other 3 players. A sucky paint diagram is attached for more clarification. So how can i achieve that ? 在此处输入图片说明

Well, there's a bunch of stuff to think over: persistence, concurrency, security, parallel game sessions possibility, player synchronization logic, etc.

But in general, your server should somehow keep track of all game sessions and assign unique identifiers to them. It also should assign identifiers to all active clients. Each client then uses its own identifier and a session identifier to request other player's moves or post its own. All moves must be timestamped so that clients may get updates.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM