Slashdot Mirror


Designing Multiplayer Game Engines?

mikera asks: "I'm a pretty experienced programmer but I've just embarked on my first (massively?) multiplayer strategy game. To make things even more interesting, I've decided to write it in C# and pick up a new language at the same time. I've chosen a client-server architecture where the server holds the one 'true' state of the world. The only communication from clients would be commands to units, which is simple enough, but the server will have to propagate game state changes (events) to all clients. I would like to ask Slashdot readers if they have solved a problem like this before or can offer some opinions on the best way to implement a solution."

"Lag is not really critical, but I still want things to be responsive and it must scale up well with the number of clients. The size of the map data, the complexity of the objects and bandwidth constraints rule out sending the complete game state, so only incremental updates will work. The situation is further complicated by the need to limit updates to just the areas of the map that are visible to a given player/team - this is clearly necessary to prevent client-side hacks such as gaining full map knowledge.

I understand the theory well enough, but I'm interested in practical advice on how to implement a solid architecture. What should the object model look like? How do I propagate events that are only partly within a client's field of view? Are there any novel features in C# that might make my life easier? How can I make the networking code as transparent as possible so I don't have to write SendUpdate() after every assignment?"

Your comments, insights, hints and flames are eagerly awaited."

19 of 397 comments (clear)

  1. .NET will soon be the dominant GUI for Linux by Anonymous Coward · · Score: -1, Offtopic

    At least if the Gnome guys have their way :) MSIL support is pretty much a necessity for that, so we should see C# being portable pretty soon.

    1. Re:.NET will soon be the dominant GUI for Linux by WildBeast · · Score: 0, Offtopic

      Wakeup, most people are using KDE

    2. Re:.NET will soon be the dominant GUI for Linux by Anonymous Coward · · Score: -1, Offtopic

      wake up
      most people are using windows.

    3. Re:.NET will soon be the dominant GUI for Linux by peripatetic_bum · · Score: 0, Offtopic

      see, you were making some good points until you came to the Troll part, I take you think anyone who doesnt share your point of view is a troll?

      how very sad

      --

      Sigs are dangerous coy things

    4. Re:.NET will soon be the dominant GUI for Linux by sheldon · · Score: 1, Offtopic

      Well at least you don't disagree with my characterization of your post as FUD.

    5. Re:.NET will soon be the dominant GUI for Linux by peripatetic_bum · · Score: 0, Offtopic

      Christ, your an ass.

      --

      Sigs are dangerous coy things

  2. I recommend Beowulf clustering... by Anonymous Coward · · Score: -1, Offtopic

    see subject, thanks.

  3. Slashdot -- GAYS AHOY!! by Anonymous Coward · · Score: -1, Offtopic

    Let's examine this "Linux" thing very carefully. An OS made by a man who likes to rape people with his MONOLITHIC KERNEL, and other such sick devices such as his MODPROBE. Linus Torvalds should be lynched. And don't forget his partners, of course -- ANAL COX, a man whose very name obviates his deviant sexuallity! Then, there's Eric S. Raymond, a man who has a GUN FETISH to make up for his LACK OF COCK, who goes around shoving guns up people's asses for fun and profit. Finally, there's old Richard M. Stallman himself, who's been known to rape Windows users in truck stops for not submitting to his GNU/Fellatio. Then Slashdot reports on this as if it's news! Fucking SLOP is what it is!!

    Disgusting bunch of LINUX FAGS is what they are!

    . . . Stop me before I post again!
    (BANNED for bad moderation.)

  4. portable code by Anonymous Coward · · Score: -1, Offtopic

    Slashdot folk will respect you if you make it linux-compatible, and heckle you if you use C#. You should have known that beforehand.

  5. ATTACK! by Anonymous Coward · · Score: -1, Offtopic

    Quick, everybody attack this guy and his choice because it's from Microsoft.

    HURRY!

  6. Best way? by Anonymous Coward · · Score: -1, Offtopic

    Start by not using C#...

  7. Will C# limit the game to Windows? by Anonymous Coward · · Score: -1, Offtopic

    I'm no programmer, and I hardly know diddle about C#, other than that it's a Microsoft creation.

    The question is genuine.

  8. It's About Karma... by cybrpnk · · Score: 0, Offtopic

    Hey, let's give karma points to a logged-in poster, not an AC...

    1. Re:It's About Karma... by Anonymous Coward · · Score: -1, Offtopic

      God, what a whiner. Give karma to people who have something important to say, how about that? You know, instead of giving it to people that spout out "mod this up to +5!!!!!!!!" just to be heard.

    2. Re:It's About Karma... by Anonymous Coward · · Score: -1, Offtopic


      Hey, let's give karma points to a logged-in poster, not an AC...


      thnx for the reminder, but we already knew that slashdot is not about useful content and not supposed to serve a purpose, but about satisfying karma-whoring homos. Even Alan_Thicke is less redundant than you. BTW, according to CmdrQueer's logic, your OT. SOMEBODY PLEASE MOD THAT SHIT DOWN!

  9. +1 Wholey Sh$t : by Anonymous Coward · · Score: -1, Offtopic

    Don't use C#.

  10. The article is a Troll by Anonymous Coward · · Score: -1, Offtopic

    Surely this Article is a troll, you want to write a game in C# and your asking on /. ? Try the MSDN!!!

  11. Mod this up +3 or +4!!!!!!!! by Anonymous Coward · · Score: -1, Offtopic

    THIS WAS A REALY INSITFUL COMENT!!!!!!11111111111111111111111111111111111111 111

  12. Re:OOOH CECILLLLIAAA by SweetAndSourJesus · · Score: -1, Offtopic

    Jesus was way cool
    Everybody liked Jesus
    Everybody wanted to hang out with him
    Anything he wanted to do, he did
    He turned water into wine
    And if he wanted to
    He could have turned wheat into marijuana
    Or sugar into cocaine
    Or vitamin pills into amphetamines

    He walked on the water
    And swam on the land
    He would tell these stories
    And people would listen
    He was really cool

    If you were blind or lame
    You just went to Jesus
    And he would put his hands on you
    And you would be healed
    That's so cool

    He could've played guitar better than Hendrix
    He could've told the future
    He could've baked the most delicious cake in the world
    He could've scored more goals than Wayne Gretzky
    He could've danced better than Barishnikov
    Jesus could have been funnier than any comedian you can think of
    Jesus was way cool

    He told people to eat his body and drink his blood
    That's so cool
    Jesus was so cool
    But then some people got jealous of how cool he was
    So they killed him
    But then he rose from the dead
    He rose from the dead, danced around
    Then went up to heaven
    I mean, that's so cool
    Jesus was way cool

    No wonder there are so many Christians

    --

    --
    the strongest word is still the word "free"