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."

6 of 397 comments (clear)

  1. th1rd p0st by Anonymous Coward · · Score: -1, Troll

    th1rd p0st homiez, wazzzzzzzup

    haha i am trolling how funny i usually dont and my karma is 50

  2. My predictions by Anonymous Coward · · Score: -1, Troll

    My predictions for 2002:

    1) Transbeta will declare bankruptcy, a huge SEC investigation will
    find no evidence of wrongdoing. Linus T. will be seen kicking
    an aluminum can down the street.

    2) Linux will be discovered by non-quer people. Up until now only
    gay homosexuals would use linux, that is about to change.

    3) Wipo Troll will be successfully sued for libel. The resulting
    debt that he will face leads him to rob a liquor store. When
    he is jailed, he's placed on suicide watch after trying to hang
    himself with his underwear.

    4) 900 mebibytes of gay child port will be found on the work pc
    of a high-ranking slashdot staffer, earning him a place on the
    sexual offenders registry.

    5) Ashcroft successfully embeds a version of Magic Lantern into
    the linux source tree. When this is discovered, Ashcroft will
    win an award for his coding skills, and will be named kernel
    hacker of the year for 2002.

    6) People will finally realize that slashdot is a place only for trolls,
    no respectable person would ever visit slashdot.org
    unless its to troll about, and libel celebrities.

  3. Re:Slashdot -- GAYS AHOY!! by Heretic2 · · Score: 0, Troll

    I only wonder if you know the difference between a monolithic kernel and a microkernel.

  4. This is important by Anonymous Coward · · Score: -1, Troll

    All mexicans are losers. They are rude and do nothing but commit crimes! Deport all them beaners!

  5. But... by Anonymous Coward · · Score: -1, Troll

    What does this have to do with ANAL COX and the cocks he likes to shove in people's anuses? C'mon! Inquiring Slashdot readers want to know!

    . . . Stop me before I post again!
    (Already BANNED for trolling!)

  6. Loser? by mnmn · · Score: -1, Troll

    Two points to make you a loser:

    1) You use C#,

    2) You claim youre an experienced programmer. No good programmer would lose his language to C#. C++, maybe, not C#.

    --
    "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky