问题
What do you think about xna and massive multiplayer? for example server and 100 clients? Is there any nice tutorial how to create client server application in xna?
回答1:
There certainly are tutorials on how to do it. Personally I use Lidgren for my online prototype. I've only tested it with 4 people total and the server running on a low resource ubuntu vps, running on Mono, so I can't tell you how it will scale up but I'm sure others could.
For quick reading check out the site, http://code.google.com/p/lidgren-network-gen3/, you can read the wiki posts and google groups to get an idea of what others think of it.
The wiki posts on the main site have some basic tutorial-like posts but nothing too detailed. Or you can check out this site even and get a more detailed tutorial http://dirkkok.wordpress.com/lets-make-a-multi-player-game/. But this won't necessarily make you good at programming networked games, but it will certainly get you started.
回答2:
There's a nice code sample at App Hub for managing the state of network games http://create.msdn.com/en-US/education/catalog/sample/network_game_state_management
回答3:
Rather than the network game state sample, I'd point you to the Client/Server sample:
http://create.msdn.com/en-US/education/catalog/sample/network_cs
However I have my doubts in how that would scale for a massive multiplayer game (which "100 clients" is not).
回答4:
You could try PlayerIO, They have a great multiplayer service, and for starters its FREE, unless you game grows bigger and you want more bandwidth, concurrent users,etc. Ive worked with them and they are great. It also has a built in Database system thats very easy to use so you can store level info, player option, whatever you want. Its got alot of cool stuff, I recommend you should check it out, playerio.com .
If you go with it I can show you examples for connecting and sending and such. And to answer for how many users can be online at once, their free plan allows 500 users online at once (but can have thousands of users overall) and you can get more users online with paid plans
来源:https://stackoverflow.com/questions/10033094/massive-multiplayer-in-xna