Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm am looking to add multiplayer into my game (2D Platformer in XNA C#) My worlds are quite large (Up to 30 Million tiles max, Average 20 million maybe. 2000x10000). You could say the game is quite like Terraria.

I have been using Player.IO, It has everything I could need, Except for the fact that I will easily run out of bandwidth with such large worlds.

So I have been experimenting with the Lidgren Networking Library, Its okay, But not having to port forward for users would be nice, But Minecraft and terraria still get away with it.

So if I have serverside Code figured out (Lidgren). Now I just Need unique usernames, and possibly a Database for them (as player.io has PlayerObjects), a way to make a server list would also be a plus.

Almost something such as The way minecraft does it would be fine, Players have accounts, but they also have to make a server.

So how should I go about adding,

  • Unique Usernames (Login and registration)
  • Database for players acheivements and stats
  • A way to easily intergrate it with a server ran by players (Unless the service includes this)

By the way, We are Indie, So if we can do users through SQl and a site it would be cheap, or a cheaper multiplayer service would be cool

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted
  1. Let your central server (CS) do only 'lightweight' things:

    • Manage the authentication,
    • Store the achievements.
    • Store some basic stats of the available player-owned servers.
  2. Let player-owned servers (POS) store the tiles and manage the game states.

  3. The game client (GC) should only communicate with the CS when logging in, and when the player is looking at the POS list.

  4. POS's should regularly communicate with the CS, to:

    • Send a notification when a player fulfilled the requirements of getting a new achievement,
    • Send pings every x seconds, so that the CS can create and update a POS list.
    • Send some other data of the game state (number of players logged in, etc.) to show some statistics in the POS list lobby.

This is similar to what Minecraft does. The main advantage is that you can support millions of players with relatively cheap back-end, yet force players to have a valid account (making piracy a bit more difficult).

share|improve this answer
    
Sounds good (Ill mark it as accepted if no one else responds). However, What do I need to make a central server? –  Cyral Jul 31 '12 at 13:50
    
Thanks. What do you mean, what do you need? You need to develop a server application, which handles all the stuff I wrote in the first point. –  Marton Jul 31 '12 at 17:49
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.