Sign in to follow this  
signal_

New to MP - Need perspective on starting

Recommended Posts

I am in the initial planning phases for what I would like to do. So I have a few pre-planning questions that hopefully someone can shed some light on.

I read the FAQ and will probably be going back to it often as I learn this stuff better.

Since I am new to this and would like an easier solution, without reinventing the wheel, I am initially considering something like RakNet. Would an experienced expert consider this a good option?

Secondly, I am not thinking MMO scale. As far as I can tell, some MMOs support 1000+ players on a single server (not totally sure of the veracity of this, having only performed a cursory search). What is a scale that would work for someone who wants a small project and is new to this? Is 20 players too much? 50? I cannot see this project going over 100. What would be a ballpark estimate? The answer to this likely will tie into my last inquiry:

Lastly, I will briefly quote a section of the FAQ:
Quote:
Q20) I need a server that will stay up longer than my cable modem, but typical web hosts won't let me run my own server program. What are my options?
Assuming you don't have friends or a school that'll allow you to run your internet server process, you have four basic options:
1) Self-managed Hosting
2) Virtualized Hosting
3) Server Co-location
4) Roll Your Own


Having never run a server, the above FAQ question indicates that is possible to run one out of one's home via an always on cable modem connection. Regarding my second question above is this option viable for a MP game serving something like up to 20, 50, 100 players?

I read about options 3 & 4: too expensive. Option 2, in the FAQ, was regarded as suitable for turn based games so that's out.

So I am left with option 1, hosting it at my home. I would like to host it at my home to begin with and would look to option 1 at a later date. Is this viable?

FWIW, through my wireless router, speedtest.net says the following:
12.4 Mb/s download
3.5 Mb/s upload
ping 20 mS

I am in the planning stages so thanks for any input. I would build a prototype and test this myself, but that seems like a lot of work wasted, if someone could possibly answer this off the top of their head.

Thanks.

Share this post


Link to post
Share on other sites
When developing multiplayer games it is important to be able to debug what is happening for your object updates, either whilst playing a game or to be able to record it for later analysis. Imagine you have an early version of your game working with your object position, rotation and animations being update across the network. Typically these object updates use various algorithms (prediction, interpolation, delta compression etc) to reduce the data sent over the network. But in some situations the object updates can use more bandwidth than you've designed. If your chosen network API supports a visual data debugger then it can help you deduce what object updates are using bandwidth which you can target for. This ability to debug is important because it saves you time and also helps to lower bandwidth for each object, therefore meaning you can make a game with more interactive elements or more players. This is why I wrote the RNVisualDebugger that can be used to connect to a ReplicaNet game session: http://www.replicanet.com/assets/docs/Main/html/ReplicaNet.html


As for hosting at home, you can but what makes it easier is if your network API can traverse the NAT on your internet connection. It also helps if you can advertise your game session with a central server and have your application query this central server.
This is why I wrote the RNLobby API to allow users to advertise and query sessions with NAT traversal. http://www.replicanet.com/assets/docs/Main/html/RNLobby.html
It also handles things like user accounts, chat systems, statistics and tracking etc.

If you aim to host 16 players all running around being busy with a sensible bandwidth limit that is a good starting point.

As a quick test for your internet connection you can check if you're capable for hosting at home by registering here http://www.replicanet.com/contact.html , downloading the SDK with the RNProductUpdate utility and then running the Demo1\GameLobby.exe example. This will test hosting a game and allowing other people to join it with NAT traversal.

These APIs are free for non-commercial software to use as well.

Share this post


Link to post
Share on other sites
Do you want to create a gaming experience, or a gaming technology?
If you want to write your own technology, RakNet is fine middleware.
If you want to create a gaming experience, you probably want to go higher level and use existing tools/engines/platforms.
Consider developing a Source or Unreal engine mod, or something on top of Unity3D, for example.

There are a few limitations. Simulation requires CPU, for example. If you have a reasonably modern computer, and run a server without graphics, you'll be able to support 100 players on the CPU without too much effort, assuming you don't also have tons of walls-made-of-bricks to simulate or similar :-)

The amount of bandwidth per player depends entirely on your architecture and design. If you have a highly interactive environment with lots of physics, then you may very well end up needing a megabit per second per player (consider an update 10 times a second, with 32 bytes per physical entity, times a few hundred entities). If your environment consists largely of players moving about, and you prioritize players "nearby," with "far" players being updated only once a second, and are OK with quantizing slightly more, you can end up with 24 bytes per update, 90 far players and 10 near players, for a total of about 60 kilobit per second per player.

Even at 60 kilobit per player per second, your cable will max out at about 50 players, though, and if you also host patch/update/download services, that will also cut into bandwidth. You will also realize that cable internet is pretty unreliable once you start putting "real load" on it -- those numbers will fluctuate up and down by time of day and phase of the moon.

Finally, option 1) doesn't mean "run it in your closet" -- that's option 0. Option 1) means leasing a "root server" from some provider like serverbeach.com or interserver.net. (Interserver has a $39/month Atom-based server deal that's fairly price competetive)

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603
Do you want to create a gaming experience, or a gaming technology?

I have a pre-existing single player game written in c++ to which I'd like to add MP functionality. That's why I am looking to go the middleware route.

The game itself is a 2D slow-time strategy game. So no 3D, no complicated physics, no 'twitch' gameplay. So these factors, it seems, will be to my benefit, especially if running a server on a home network.
Quote:
Original post by hplus0603
There are a few limitations. ... those numbers will fluctuate up and down by time of day and phase of the moon.

Thank you for that; I found that very helpful.
Quote:
Original post by hplus0603
Finally, option 1) doesn't mean "run it in your closet" -- that's option 0. Option 1) means leasing a "root server" from some provider like serverbeach.com or interserver.net. (Interserver has a $39/month Atom-based server deal that's fairly price competetive)

Oops! That was a typo on my part. When I said, "So I am left with option 1, hosting it at my home," it should have read, "So I am left with option 1, OR hosting it at my home." So yeah, I checked out the Interserver thing and at 39/mo that might be doable.

In any case, I think I will try to start with using my home network as the location for the server, since while I was interested into up to 100 players the reality is if I get friends/family to test I may be looking at something like 5-20 players.

My feeling is that I can always expand if need be, that is, start with server on home network, and upgrade from there. Thanks again you answer was very helpful.


And, Martin, thanks for the other option regarding middleware. I am not to that step in the process, but I have checked out your website and will keep it in mind.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this