Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

There is a game server and people can play in game rooms of 2, 3 or 4. When a client connects to server he can send a request specifying a number of people or range he wants to play with. One of this value is valid: {2-4, 2-3, 3-4, 2, 3, 4}

So the server maintains 3 separate queues for game room with 2, 3 and 4 people. So we can denote queues as #2, #3 and #4.

It work the following way. If a client sends request, 3-4, then two separate request are added to queues #3 and #4. If queue #3 now have 3 requests from different people then game room with 3 players is created, and all other requests from those players are removed from all queues.

Right now not many people are online simultaneously, so they apply for a game wait for some time and quit because game does not start in a reasonable time. That's a simple bot for beginning has been developed.

So there is a need to patch server code to run a bot, if some one requests a game, but humans are not online.

Input: request from human {2-4, 2-3, 3-4, 2, 3, 4}

Output: number of bots to run and time to wait for each before connecting, depending on queues state. The problem is that I don't know how to manage bots properly at the server?

Example: #3 has 1 request and #4 has 1 request Request from user is {3,4} then server can add one bot to play game with 3 people or two bots to play game of 4.

Example: #3 has 1 request and #4 has 2 requests Request from user is {3,4} then in each case just one bot is needed so game with 4 players is more preferrable.

share|improve this question
I don't understand the question. What is "managing" exactly? – Anko Dec 10 '12 at 12:12
@Anko, once request from real human comes, I need to decide whether to add, if yes how many, to which queue and what timeout to specify before initiating a new bot. – Nikolay Kuznetsov Dec 10 '12 at 12:14
To be honest, all of the description is confusing. What do all the curly brackets mean? Could you maybe draw a picture to illustrate what you mean? – Anko Dec 10 '12 at 18:02
@Anko, curly brackets mean a set – Nikolay Kuznetsov Dec 11 '12 at 0:45

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.