Which method/road should I take for my game?

Okay, I’ve been reading the forums and pouring through posts and trying to figure out exactly how I should go about setting up my game networking and I really have come up with a lot of different answers and I’m not really positive which one I should go with or what would work best… so I figured I would ask here.

Basically the game I want to create would require the following:

Players create accounts that are stored in a database. They can log in to the client and will then enter a game lobby. This lobby would basically be a chat room and a place where players could create “rooms” to play in. The chat room would need to allow hundreds of players to chat with eachother, though it could be broken into channels if necessary. (probably more convenient for players anyway since trying to talk when 1000 people are talking wouldn’t work too well) So let’s just assume 100 players per chat channel.

When a player creates a room, they are taken to a room lobby for that particular room, and other players can join that room (from the main lobby which would list the rooms). Once all players are ready in the room, they would then go to an instanced map and play the game with eachother there (totally isolated from people in the main lobby and from everyone else)

The server needs to be secure and would need to host the games. So the player who started the room isn’t actually hosting the game from their computer.

Each instance would need to only support 10 players maximum. The game is action based and requires speed and accuracy as well as some physics, so lag needs to be kept to a minimum, and too much lag would ruin the experience.

So I’m curious as to what sort of setup (server wise) that I would need… and what is the best method of getting all of this to work?

How many physical servers would I need in order to handle these little 10 player instances?

I would expect to have thousands of players playing simultaneously, but not all in the same instance. I would assume since each instance would only deal with 10 players, that it wouldn’t be anywhere as difficult to implement compared to having a “massive” world where hundreds or thousands of people can be in one area. Am I correct in this assumption?

If any more details about the game are needed, I’ll be happy to add them. Basically my game follows the trend of those Korean based “mmos” like Gunbound, Gunz, etc which allow players to create rooms to play with small groups of players, all from the server so that it’s secure and fast.

This is an interesting concept. You will most likely run in bandwidth issues while you host the games on the server.

It wont be a question if you’ll need more servers, its how many you WILL, need. I would have separate servers (totally different machines with enough bandwidth) for the Chat/Lobby and the Instanced rooms.

The lobby should be no problem, the game instance however will be tricky.

Just curious as to what your budget will be?

All that being said… This is why servers are left to the community in the case of many PC games…The sheer cost.

What you are describing isn’t much more than a run of the mill lobby system. It’s certainly doable. However at this time I wouldn’t quite use Unity’s networking to accomplish your goal. It’s apparently broken and will take some time to fix.

I’d look to some middleware, such as SFS or Neutron. They are perfectly tailored to what you want.

I wouldn’t know where to begin how to calculate how many 10-man instances of Unity you can run on x-y-z machine. You would be better off instead running multiple 10-man games off of a single Unity instance.

There’s financial costs to consider as well, beyond just the server machines. One of the more popular public Wow emulated servers pays around $15k a month for bandwidth charges for a few thousand concurrent users. Now consider just due to it’s very nature, your GunZ clone is going to use a hell of a lot more bandwidth than an MMO.

So far I’m looking at something like:

1 server for chat/lobby

1 database server

1 web server that can communicate with the database as well (to allow players to use login information on the site)

x amount of game servers that would communicate with the database server

Does this seem right?

As far as budget, it would scale up depending on revenue. So basically I intend to start out small and work my way up.

Are there any decent ways to prevent cheating while allowing players to host the instanced games themselves, or would this be next to impossible?

What your talking about is almost exactly what Multiplayer Baseball Online has with a couple of differences.

And MBO is open source. You can download the source from my link.

In MBO you register and talk to a mysql character server that is basically the same mysql server the mmobaseball.org website is using.

Then you join a game that is hosted on the master server called MBOlobbychat. Its hosted by a little batchmode server that runs in my taskbar right now and uses like 5% of one cpu.

There people can view the status of all the baseball games and chat which each other in a network environment. While they are connected together its just a chat implementation.

There they can view the myself tables called livegames that provides scores and stats for each game. If they then click on the game if its not in progress or locked they can join the game.

All people in a game that has not launched go to a room where they can chat set game options and launch the game.

The person that creates the game is the host. The rest of the them are clients. Then they play the baseball game and when they are done they quit back to the main lobby.

Version 0.2 has a couple bugs (that have since been solved) but it all pretty much works as advertised even in version 0.2 it mostly works.

Not quite what you wanted (there are no servers needed except the chat server included) but hey it doesnt require any servers except the one chat server.

BTW you can build said chat batchmode server from the project too.