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

2 of 397 comments (clear)

  1. Re:Follow the Rules of New Software Projects: by rbeattie · · Score: 0, Flamebait

    Everyone else seems to want to ignore the C# issue so I'll take the bait.

    If you program in C# you're limiting yourself to an untested, almost unportable language and to the Microsoft platform. I would think that if you were serious enough to waste all of Slashdot's time with this question, you would be serious enough to choose a real programming language, not some Microsoft marketing scheme.

    Use Java. If you don't know it already, I would suggest that it's much more valuable to learn than C#. If you already "know" Java, a challenging project like this will teach you a ton and give you a much better depth in the language which employers are really looking for these days. Every second you spend learning Java will be more money in your pocket. Every second you spend learning C# will be more money in Microsoft's. And hell, if you do it in C++, you'll be even more of a programming head and even more valuable.

    Just my thoughts. Follow the money, baby...

    -Russ

    --
    Me
  2. Learn from experience... use LINUX or UNIX equi. by pioneer · · Score: 3, Flamebait

    I'm not at liberty to say how I know this but this is what I know of Everquest (the most popural MMORPG):

    They used NT and C (Asm too?) to develop Everquest and they are paying for it dearly.

    Everquest has had up to 80,000 simultaneos users which were distributed over 200 NT servers.

    These servers are in two locations and they have two FULL TIME employees who walk around all day -- their sole job .... reseting crashed NT servers.... yes, that's right. full time server reset people...

    In addition, they've had nightmare situations with patching and keeping these systems up to date.

    And another thing I know is that their next game (forget the name) they have started nearly from scratch and are developing on a UNIX derivative (may be linux... not sure) mainly because the costs of running the game on NT are too great...

    learn from experience...