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

397 comments

  1. SendUpdate() Solutions by thecarson · · Score: 3, Informative

    Holy Mac has the transparent networking architecture in a C# framework. It should work well for what you're trying.

  2. Have you looked at world forge? by Anonymous Coward · · Score: 3, Informative
    1. Re:Have you looked at world forge? by Anonymous Coward · · Score: 0

      I can't say I'm too impressed.... I'll admit I didn't do much digging, and could just be the front page out of date, but here are the LATEST 2 news topics:

      2002/01/11 Project Status by: Demitar

      Bryce has gathered and compiled a status report for January 2001. This has also been translated into swedish by Demitar.

      "Overall, the team is making slow but sure progress on many fronts. The project's core focus right now is development of the game Mason, and many of the development areas revolve around that central effort. Mason is..."

      2001/12/25 Merry Christmas by: Mithro

      Merry Christmas and a Happy New Year (and for those who don't celebrate Christmas, a Happy Holidays!) from all the people who are part of the Worldforge project.

    2. Re:Have you looked at world forge? by Van+Halen · · Score: 1
      Look fairly interesting, but I couldn't tell that they're terribly far along at this point.

      For a truly extensible network game development environment, my money's on BYOND. Great object oriented language, and it's not just for RPGs (but certainly slanted in that direction).

    3. Re:Have you looked at world forge? by cduffy · · Score: 1

      so? They have actual code. Network protocols. Art. A very active IRC channel for developers. The presence (or lack) of news articles Just Ain't That Important.

  3. Not doing two things at once by peripatetic_bum · · Score: 5, Insightful

    Having been on the dev-team of a popular MMPOG, I have to say that while your ideas are fundamentally correct, but now is not the time to learn c#, just to add another language to your CV. In addition, C# is too OS limited as it stands and you need to be thinking outside the box.

    Thanks

    --

    Sigs are dangerous coy things

    1. Re:Not doing two things at once by FFFish · · Score: 5, Informative

      Especially considering that, say, Python already has MP libraries. A research paper from UO, another fellow who's trod this path before, several MUD/MOO/MP libraries and games, Merchant Empire, Twisted, Eve, and so on.

      Using Python would allow this fellow to achieve his goal of learning a new language, fast. He can then properly focus on the important things: program structure and gameplay.

      --

      --
      Don't like it? Respond with words, not karma.
    2. Re:Not doing two things at once by Anonymous Coward · · Score: 2, Interesting

      Who cares if it's OS Limited? He wants to use C# and target the usual 90% of the market.

      Use the BEST tools available for the project you are designing. Anyone who tries to tell you otherwise has no concept of proper development.

    3. Re:Not doing two things at once by peripatetic_bum · · Score: 1

      Ah but, but point is that, I think even MS knows that charing gamers, twice to play (ie one for the OS, which will players will continue to have to pay to use) and the game itself, may start to become a real liability.

      however, im not going to dispute the fact windows is the defacto gaming platform, but it starting to build up dis-advantages

      Thanks!

      --

      Sigs are dangerous coy things

    4. Re:Not doing two things at once by Anonymous Coward · · Score: 0

      In addition, C# is too OS limited

      Ya. He will only reach 95% of the market.

    5. Re:Not doing two things at once by JasonAsbahr · · Score: 5, Interesting

      Hey, thanks for the plug. Here's an open letter to developers about my new project, Netsu. It uses Python, the Nebula Device, *and* Twisted...

      Greetings,

      I'm a professional game developer who has committed a large portion of his adult life working on virtual worlds of one sort of another. Recently, I worked on Ultima Online 2, which some of you may have been looking forward to playing. I know I was! :-)

      I'd like to talk to you a bit about my current project, 'Netsu', which is the culmination of many years of background work. "Netsu", Japanese for "heat" and "fever", is an anime-inspired world which incorporates multiple perspectives of play and a reputation network for players to self-organize. It's going to be fun.

      Currently, I'm working on combining a number of existing open source technologies to build the new virtual world system. These include the 'Nebula Device' 3D engine from Radon Labs on the client side, the Twisted framework for server-side and client-server communication, and (as the project moves forward) the OpenCyc knowledge base as server-side archetype repository and artificial intelligence server.

      As I develop use cases and other design documentation for Netsu, I intend to keep them as portable as possible between gaming systems, so that they can benefit the most people. I anticipate this work feeding back into Twisted, expanding it to be a more general simulation framework, and into Nebula, adding network support and in-game world editing tools.

      So where did this project come from?

      The genesis of the project began with my work on virtual reality systems in the early 90's. I developed virtual building walkthroughs for architects, VR games, and created the first hardware accelerated PC-based virtual actor system for Compaq.

      This work was all done with C and C++, and it was during this period that I ran up against the need for a dynamic and interactive way to "reach inside" the simulation and manipulate the code and data directly. And that's how I first became acquainted with the language Python.

      The next major phase was to build a 3D client engine with Python embedded as a control language. The fruits of that effort are described in the paper I presented at Python 7, "Beyond: A Portable Virtual World Simulation Framework". (This was also the first mention of 'Netsu'.)

      In 1998, the path of development took a turn when I was recruited into Origin Systems to work on developing the Python foundation for the Ultima Online 2 project. The focus during the period was on innovation on the server side and on client-server communication. The results of that labor are described in another paper presented at Python 9, "Python for Massively Multiplayer Virtual Worlds".

      Both papers are here.

      However, to this point, all the software developed for these projects was closed source. The desire for an open source virtual world system was lurking in my head, but it wasn't until the O'Reilly Open Source conference in 2000 that my plan for the open source virtual world crystallized.

      At the 2001 O'Reilly conference, while presenting on the UO2 design work, I took the opportunity to discuss my plans for the future open source virtual world system. The response was extremely positive.

      So what are next steps to realizing this goal?

      Glyph (the originator of the Twisted project and a fellow ex-Origin colleague) and I have been meeting periodically over the last few months to discuss these issues, which intersect nicely with his long term plans for gaming in Twisted. I've also been meeting with the Cycorp folks (who happen to office just down the road from me) to discuss integrating Cyc and driving Python class generation from Cyc.

      I recently integrated Python into the Nebula Device, which allowed me to easily integrate the PB remote object communication protocol and made Nebula the first 3D clients for Twisted. Over the next six months, several major components will come online, including character creation, character motion, the GUI system, basic terrain management, character inventory, and combat.

      As I wrap up my current consulting project (porting Python to the Playstation 2 and developing a GUI for designers to build Python logic), I'm devoting 100% of my time to Netsu and open source development.

      It is my hope that this collaborative approach for virtual world development grows, spreading outward and providing a foundation to help other developers build their own virtual worlds and enable the sharing of code and art resources between worlds..

      If you are interesting in finding out more about the project, drop me a line via email and tell me a bit about your interests and background.

      Cheers,

      Jason Asbahr
      jason@asbahr.com

    6. Re:Not doing two things at once by Wakko+Warner · · Score: 3

      Use the BEST tools available for the project you are designing.

      That's not the reason he's using C# though. He appears to be going with it because it's the latest buzzword.

      - A.P.

      --
      "Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
    7. Re:Not doing two things at once by Kerg · · Score: 3, Insightful
      Since a major development effort for a game of this type is on the server side, I wouldn't go as far as saying C# is the best tool available. It certainly has nothing to do with the 90% client side share of Microsoft Windows.

      I would definitely advice against using anything Win32 specific on the server side. It's just plain common sense to avoid limiting yourself to Wintel servers.

    8. Re:Not doing two things at once by Anonymous Coward · · Score: 0

      yep, and will be able to support a whopping 100 concurrent users because he is stuck on a Windows server that doesn't scale.

    9. Re:Not doing two things at once by Anonymous Coward · · Score: 0

      Pardon if I am too lame not to notice this reading the papers, but I don't clearly see what was the decision to use Python instead of C++, I don't know what Python has that C++ hasn't. Furthermore, what's the advantage of porting and using Python when C++ was already in use?

    10. Re:Not doing two things at once by Xanthos28 · · Score: 1

      While I am not a game programmer, I'd like to make a plea for parallel programming. Looking at the power of chips currently available, we can see that while the speed is still increasing, we are not taking advantage of the full power of the chip, whether it is from bottlenecks in the memory architecture, in the bus speed or size, or simply in the manner in which the application was programmed.

      The answer to the performance issue is not to keep ramping chips faster, but to make more of the chip, or rather more than one chip, available in a single instance. Common parallel programming, whether using posix threads, winthreads, or some home grown version, such as SGI's sprocs, make programming difficult, especially between platforms. Which is why the OpenMP standard was developed. This standard, available at http://www.openmp.org/, uses directives in C/C++ and Fortran to harness multiple processors in for, while, and do loops, as well as other worksharing constructs.

      The company I used to work for, Kuck and Associates, had one of the premier OpenMP compilers, called the KAI Guide compiler. KAI was purchased a few years ago by Intel, and their technology is being transfered into the Intel compilers. You can find the compiler at http://www.kai.com. The OpenMP standard is very powerful, used by the largest labs, major corporations, and several educational facilities.

      Also, if multiple-computer clusters are your thing, check out cluster computing at http://www.mpich.com.

      Peter
      Intel C/C++ programmer

    11. Re:Not doing two things at once by cduffy · · Score: 1

      Python can frequently be used to do the same things as C/C++ in 1/5-1/7 the code. It has introspection and dynamic typing capabilities that are simply unmatched elsewhere. For instance, one time writing some Jython code I loaded the list of classes under java.awt.Color, looked at them to see which ones were actually colors, and then added all those that were to a drop box listing available options. If any new colors are added to a new version of the standard library, they'll instantly show up in my app's menu -- and it took only three lines, and was extremely readable! This could have been done in Java with far more work (and far less prettily), but doing it in C/C++ would have meant parsing the header files at runtime, and otherwise would have been damn near impossible.

      Python has much better exception handling than C++ (no, C++'s exception handling isn't bad when it's used right -- but Python's is better), is easier to write cross-platform code with (some 3rd-party modules are platform-specific, but as long as one is marginally careful everything Just Works on all supported platforms).

      Another example of Python's introspective capabilities is provided by the cmd class in the standard library -- a simple command-line interpreter. If you extend the class and add a new function "do_foo()" and add a string at the beginning of the function saying "bar", typing "foo" at the prompt of this new interpreter will run the function, and typing "help foo" will result in "bar". Further, the list of available functions provided when the user just types "help" will include "foo" as an option. All this requires no extra language support -- it's all implemented through Python's extrordinary powerful introspection.

      Building complex data structures in Python is almost completely transparent. Things that require calls to extra libraries or use of STL in C/C++ are utterly transparent in Python. Dictionaries, lists, tuples, iterators... these are built into the language, but further built in in such a way as to make their usage natural and transparent.

      Python is really an Insanely Great language. I still use C frequently when writing low-level code, or Java when called for on occasion -- but in most cases, Python lets me get my work done faster, and with a more portable and maintainable product when done -- and furthermore, I have more fun writing it! Give it a shot -- you won't regret it. (Incidentally, writing C extensions for Python, and calling Python from C, is very straightforward -- the only easier extension language I know is Scheme, and Python is easier to work with for folks who don't think in LISP).

    12. Re:Not doing two things at once by Anonymous Coward · · Score: 0

      No offense, but this sounds like what Be said six years ago.

    13. Re:Not doing two things at once by Anonymous Coward · · Score: 0

      Sorry but I don't buy it. C++ has dynamic typing at runtime. I know it might be harder to use than Python, but I don't think Python is better than C++ for this.

    14. Re:Not doing two things at once by cduffy · · Score: 1
      "Dynamic typing" is one thing. Full introspection is another.

      Can your C++ code look at a class and see what its member functions are? Can you add new functions and variables to a class as-needed at runtime?

      For that matter, while we're talking about things that are easy in Python and hard-to-impossible in C++, can you grab a copy of your call stack and trace back it to see if your function is recursing? (I've done this in an output handler -- damn useful, and entirely trivial to code). How about writing your call stack to a log file and then continuing operation on hitting an error?

      Can you analyse an input file and build a new class/struct based on it? (I've done this, writing a library to analyse the input.h kernel header and building a structure, including a set of enums, to store the requisite data. Barring any major structural changes to this header, this code will continue to work with future kernel versions).

      Further, you shouldn't discount the ease-of-use difference. If it takes much more code to do something in C++, that's all the more places where bugs can creep in, and every additional character typed makes your code that much less readable.


      Not all the things I mentioned above may have some immediatly obvious application to this game, but someone familiar enough with Python can and will use them as appropriate to simplify his/her code and the surrounding design.

      As for things with an immediate and obvious application, look at Stackless Python, and particularly its microthreads. Microthreads are extremely lightweight, such that an individual flow of control can be given to each actor in the game. Constructs like coroutines based on Stackless's continuations (Knuth describes all these better than I can; read TAOCP for more on them) can be used to provide an even faster (and much more predictable) means of maintaining separate flows of control.

      Finally, games really do benefit from having a good extension language making it easy to script the actors in the game (and the surrounding world). Python is an excellent extension language, having been used in some similar pursuits. Even if one *does* decide to write the core libraries in C++, having the in-game objects be controlled through Python has some distinct advantages -- like being able to easily modify and reload their control code at runtime, having excellent exception handling (so that, when used right, it's utterly impossible for a bug in any object to bring down the game -- and allowing better reporting of bugs in objects than would be possible in C++ without halting the entire server), &c. Python also has provisions for sandboxing, so you can even let players upload scripts for what their characters should do while they're logged off and be assured that this code can't do anything malicious (well, nothing the player couldn't do themselves when they were logged on, at least).

      In short, Python kicks ass. Try it -- you'll like it. :)

  4. mod parent up +1, funny!! by Anonymous Coward · · Score: 0
    C#??? Seriously?????
    Hahaha! What a funny portrayal of a clueless slashdot reader! Good thing you are joking.
  5. WorldForge by Shiny+Metal+S. · · Score: 4, Redundant

    Take a look at The WorldForge Project. You probably won't learn more anywhere else.

    --

    ~shiny
    WILL HACK FOR $$$

    1. Re:WorldForge by Anonymous Coward · · Score: 0

      Please mod the parent down as "Redundant". I already mentioned WorldForge here.

    2. Re:WorldForge by nehril · · Score: 5, Insightful

      there is an old (1999 ish) article at www.gamasutra.com/features/19990903/lincroft_01.ht m (free reg required) that talks about all the net play problems that the Xwing vs Tie Fighter team faced.

      I remember reading it a while ago before you had to register, it had alot of insights as to saving game states, lag, updates, and "late joiners" to a game.

    3. Re:WorldForge by Anonymous Coward · · Score: 0

      I can't be the only one who thought the original poster mikera is a real dumb shit. But /. editors are even dumber for posting this to their front page. What a useless waste of my time, and to top it off, I'm ACTUALLY RESPONDING in some form to this horrible excuse for an article.

      HINT TO SLASHDOT EDITORS:
      IF A SIMPLE SEARCH ON GOOGLE WITH KEYWORDS FROM THE ARTICLE COMES UP WITH AN ANSWER, DON'T BOTHER POSTING THE QUESTION!!!

    4. Re:WorldForge by Shiny+Metal+S. · · Score: 5, Informative
      Mod me however you feel like. The truth is that I usually read at +1 so I don't see AC posts until they're modded up. But that's not important.

      The important thing is that I really like the The WorldForge Project (in fact, it's one of my favourite projects (if not the favourite project), promoting the idea of free software to broader audience.

      They're doing amazing work and I simply can't imagine what will they achieve in few years, but I'm sure all of current proprietary games won't even compare with those developed as a part of The WorldForge Project

      So yes, I think promoring WorldForge is worth losing all of my karma.

      Now back on topic...

      You may want to announce your plans on the cpptraining at worldforge.org mailing list. It's originally meant to learn C++, not C#, but it's read by people who want to learn how to write MMORPGs, and those who want to and really can learn, like Bryce Harrington, so it's a good place to find people who can help with your project.

      Also check out the other WorldForge mailing lists, especially Protocols, Server, Client and General.

      Read the Development Area on WWW. Read about servers and clients. Use WorldForge protocols and libraries. Download games and read the source. You'll find there everything you need.

      --

      ~shiny
      WILL HACK FOR $$$

    5. Re:WorldForge by Znork · · Score: 4, Insightful

      Um, if you're working on a commercial project, be careful if you look at worldforge beyond architecture documentation, without at least talking to your legal department (or lawyer) first. WF is GPL and you are no more safe against copyright infringement suits if you copy GPL code than you would be if you got your hands on the code to EverQuest, Anarchy Online, or any other MMORPG.

      Looking at code is tricky buisness. You can do it in some ways, and you're probably safe as long as you're not creating a direct competitor with a commercial product, or a work-alike of something. If you do a clean-room implementation of something there cannot be even a chance that you've seen the competitors code. If you're doing your own thing, and just glance at the code to get a basic feel for how they've done things, then write your own, different code, you can probably consider it fair use. Maybe. But it's tricky territory.

    6. Re:WorldForge by Shiny+Metal+S. · · Score: 3, Informative
      [cpptraining is] read by people who want to learn how to write MMORPGs, and those who want to and really can learn, like Bryce Harrington...
      I mean, those who can teach, of course... Sorry, Bryce! :)
      --

      ~shiny
      WILL HACK FOR $$$

    7. Re:WorldForge by hughk · · Score: 2
      I disagree. The need for cleanroom techniques is restricted to where you are seeking interoperability but need to prove that your code is different.

      Looking at just one game may be dangerous, but looking at several would surely do no harm. I firmly believe that unles algorithms used are patented, reading and learning from source code is good for anyone.

      I started coding long before before OpenSource but after Unix was restricted. Many other programs were still available as source code and it was always interesting learning about the trade-offs involved in building large programs.

      --
      See my journal, I write things there
  6. Follow the Rules of New Software Projects: by EraseEraseMe · · Score: 4, Insightful

    First: Ignore the nay-sayers who say "Don't do it in C#"
    An argument over the language it's programmed in will only make you lose time on what is truly important, the project itself.

    Second: Ignore the nay-sayers who say it's too big of a project.
    By the time they give you a full, thought-out reason why you can't do it, you'll be half-done.

    Third: Do listen to people who have done it before.
    Browse programming newsgroups, MMORPG newsgroups, hopefully one of the coders will connect and you'll be able to pick their brains.

    Fourth: Don't get dragged into the open source/closed source fiasco.
    You should be programming for just yourself, unless you have a team, then it's a free-for-all

    Fifth: Cut yourself off from all human contact and work on it.
    Stop showering, stop feeding the cat, forget the wife/kids/work. Finish it as soon as possible because I want to see what you're working on :)

    --
    "Anybody who tells me I can't use a program because it's not open source, go suck on rms. I'm not interested." (LT 2004)
    1. Re:Follow the Rules of New Software Projects: by Anonymous Coward · · Score: 0

      It's important to pick the right language. What you don't want to do is wasting months on a project and realizing you have the wrong tool for the job.

      That's what learning to program really means, it's not mastering a couple of languages: a real programmer can do it in any language after picking up a reference manual - the important thing is that he knows which language is the best for the problem at hand...

    2. Re:Follow the Rules of New Software Projects: by Lumpy · · Score: 3, Funny

      the scary part is that the parent post is modded +5 because of this line....
      Fifth: Cut yourself off from all human contact and work on it.
      Stop showering, stop feeding the cat, forget the wife/kids/work. Finish it as soon as possible because I want to see what you're working on :)


      come on you all know it's true!

      --
      Do not look at laser with remaining good eye.
    3. 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
    4. Re:Follow the Rules of New Software Projects: by dietz · · Score: 1

      And hell, if you do it in C++, you'll be even more of a programming head and even more valuable.

      Yeah, but you'd be stuck programming that lame hack of a language known as C++ for the rest of your life.

      *shiver*

      That's not something I'd like to think about.

    5. Re:Follow the Rules of New Software Projects: by Anonymous Coward · · Score: 0

      I'm really glad someone here has some sense.

      You said exactly what I would have said.

      (The exception about C++ [even though, that's where the market is, because of HR].. C would probably be even a better choice if you really wanted to go multi-platform)

      Java might be okay for the front end for this game, but if this ever does grow up to be a real MMPORG, you will probably need some non-bytecode driven server app. (Even though there are some really kickass Java VMs around) Just a thought.

    6. Re:Follow the Rules of New Software Projects: by Courageous · · Score: 2

      Follow the money, baby...

      MSFT: Market capitalization: $337B

      SUNW: Market capitalization: $33B

      That's a factor of 10.

      C//

    7. Re:Follow the Rules of New Software Projects: by Anonymous Coward · · Score: 1, Interesting

      How crap like this get's modded up at all is beyond me.

      If you program in C# you're limiting yourself to an untested, almost unportable language and to the Microsoft platform.

      I thought this was "news for nerds". You know, people who are generally scientific. First, even C++ is not "portable" in the sense that many of the libraries that make any project worth working on are not cross-platform by any means. Second, your belief that Microsoft Is Bad(tm) is Offtopic to this discussion. Third, the .NET platform - although new - is extremely robust. Of course, in order to find this out you would have to do research and gather actual scientific data. Remember Boycott Adobe? Well the entire e-commerce portion (for buying T-Shirts, etc.) was run off of a BETA version of .NET. Verizon powers 80%+ of their "Trouble Ticket and Project Management" intranet tools for thousands of users on their Intranet using .NET. They launched on the Beta2 platform in September. Microsoft has converted many of it's internal and external sites over the past year. For example, shopping.msn.com runs on .NET. You may not like MS, but you can't argue the fact that they generate the most traffic on the Internet second to AOL/TW. When MS uses a technology for their systems, it's a powerful case stude in and of itself.

    8. Re:Follow the Rules of New Software Projects: by spongebob · · Score: 1

      Make sure that you follow the first rule of game programming! Have Fun! Just go with it. Don't ever let people tell you that something can't be done. This is what the /. readership is all about. Learn something great along the way and make sure that you watch out for those common mistakes.

    9. Re:Follow the Rules of New Software Projects: by rjkimble · · Score: 4, Insightful

      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.

      I don't think this is particularly true. For one thing, Ximian/Mono are developing their own C# compiler. They're also developing their own runtime.

      Another point is that Microsoft's operating systems own 90%+ (probably more than 95%) of the home computer game market, so it hardly seems to be a limiting choice, even if the Mono project fails. And no matter how much you dislike Microsoft, I think you have to admit that their notion of a "common language runtime," which makes it rather trivial to integrate components from all the supported programming languages, is a brilliant concept. It may take Microsoft to a whole new level of domination, but that hardly makes the idea some sort of evil.

      For the record, before you label me as some sort of Microsoft shill, I'd like to point out that I'm composing this response using Galeon running under Mandrake 8.1, and my company bases all its software development and web hosting on Linux, Apache, Tomcat, and Java. I'm one who believes that the main reason that Microsoft is where they are today is because they actually respond to their customers and most of their competitors behave like morons. Ever try to use Solaris without installing all the GNU versions of the standard utilities? The Sun versions are generally inferior and an outright PITA to use. Microsoft doesn't force that on Sun -- hell, they could just use the GNU versions.

      --

      Guns don't kill people -- people kill people.
      But the guns seem to help a bit. (apologies to Eddie Izzard)
    10. Re:Follow the Rules of New Software Projects: by cakoose · · Score: 1
      ...if you were serious enough to waste all of Slashdot's time with this question...

      Is that even possible? Only those who deem the question useless and then proceed to respond to it are wasting their time. It is a voluntary thing. I don't think people who have read this far down this thread are constrained by a tight schedule.

    11. Re:Follow the Rules of New Software Projects: by Anonymous Coward · · Score: 0

      An argument over the language it's programmed in will only make you lose time on what is truly important, the project itself.

      This is truly ignorant. Can I assume that you've never taken a programming languages course? Note that this is different from taking a "programming" course. In the former, you learn to differentiate between the problem domains that particular languages should be used for. In the latter, you just learn the basics of language X so that you can bang on a keyboard to get a dead end job as a codemonkey in language X.

      If you treat every problem like it was a nail, then you're just going to whack your thumb with that hammer in the long run.

    12. Re:Follow the Rules of New Software Projects: by Anonymous Coward · · Score: 0

      Hahahahaahaha.

      Ok, seriously. That is the first time I've ever heard someone use the argument "follow the money" against using Microsoft software. I mean, there are some decent reasons for avoiding Microsoft, but are you kidding me? They OWN the market.. they ARE the money!

    13. Re:Follow the Rules of New Software Projects: by Ian+Bicking · · Score: 4, Insightful
      I mostly agree, except this one:
      Second: Ignore the nay-sayers who say it's too big of a project.
      By the time they give you a full, thought-out reason why you can't do it, you'll be half-done.
      The nay-sayers are probably right here, and if you research to people who've done it before (rule 3), you'll notice the vast majority of such projects fail.

      You must break a project like this into smaller pieces. You must have a forseeable point when you can release something. You can't forsee the end of a project as big as this, so you have to design intermediate points into it where you have something that is at least interesting to other developers, but much preferably is of some interest to gamers (even if only forgiving gamers).

      Open Source ideals aside, it's very hard to maintain dedicated to something that only you have ever seen. Also, incremental development is just more likely to be successful.

    14. Re:Follow the Rules of New Software Projects: by Kalani · · Score: 1

      Ridiculous ... good programmers understand how to attack problems in general. After that, the solution can be described in any programming language.

      --
      ___
      The ends are ape-chosen, only the means are man's. -- Aldous Huxley
    15. Re:Follow the Rules of New Software Projects: by rbeattie · · Score: 1

      You're right, of course. I have no idea what I was thinking. Hyperbole I guess.

      ;-)

      The post got tagged as flamebait anyways, oh well.

      -Russ

      --
      Me
    16. Re:Follow the Rules of New Software Projects: by DrXym · · Score: 2
      The important word here is developing. Ximian are developing their own C# compiler, but that doesn't mean it's finished (far from it) or that it will ever catch up with Microsoft.


      The best they can hope for is a runtime, that is reasonably fast and implements a reasonable subset of classes in a cross-platform manner. It is doubtful that it will ever be as fast or complete enough to compete with the the MS offering, simply because MS have the $$$ to keep moving the goalposts.

    17. Re:Follow the Rules of New Software Projects: by Anonymous Coward · · Score: 0

      yep

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

    Wakeup, most people are using KDE

  8. (Article by Anonymous Coward · · Score: 0

    nt

  9. Mud-DEV mailing List by Oriumpor · · Score: 4, Informative

    the mudd developer mailing list is an excellent source of information on exactly this sort of topic... although not specifically regarding the STRATEGY portion of online gaming... most of the issues you have spoken of have already been resolved... take a look at the archives publicly available at https://www.kanga.nu/lists/listinfo/mud-dev

  10. Re:Why the hell? by duren686 · · Score: 1

    Java's really slow. Point?

    --
    Y2K Compliant since the late 1890s
  11. Mod This Up To +5!!! by cybrpnk · · Score: 1, Redundant

    WorldForge is the first thing that should be considered in a discussion on this topic...

  12. Re:i worked on a similar project by Anonymous Coward · · Score: 0

    I think there is a problem with the first link in your post. I clicked on it, and I was presented with an image of a giant, well-lubricated anus.

  13. There.com does that by Anonymous Coward · · Score: 1, Informative

    This is why there are companies like There.com. Their job is to create multiplayer game engines solving such networking issues. They do not create the graphics or the game logic, just the multiplayer/networking part that you can then use as a drop-in solution to your game or other application.

  14. You should check out WorldForge... by Adrian+Voinea · · Score: 1, Redundant

    The WorldForge project is a very interesting site. They have all the sources to their clients/servers available. You should find some useful information there.

  15. Might check out WorldForge by sparrow_hawk · · Score: 0, Redundant

    Check out WorldForge, an open-source MMORPG project. Nothing like seeing the principles in action!

  16. huh? by -padre- · · Score: 0

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

    Call me weird (or a troll if you must), but I always thought the fun of programming was figuring out the problems yourself.

    --
    "hey man got a light?"
  17. one-to-many by japes · · Score: 1

    If your chosen programming language can send commands over UDP, why not have the game hold the necessary maps and rules client side. When logging in, it can download and changes or mods from the last time. When sending commands and what not to the client, you could send just small packets of information that would then produce the map changes at the client.
    This would support active real-time events over large client populations.

    1. Re:one-to-many by oregon · · Score: 4, Interesting

      Because the more information there is at the client then the easier it is to cheat.

      For example
      1) If the maps are client side, I can look at them and see things my opponent and the server don't think i can see.
      2) If the rules are client side, I can subvert them. "Hello server, I'm now moving at 100mph and I have 3,000,000 ammo."

      --

      ---
      Oregon
    2. Re:one-to-many by Anonymous Coward · · Score: 0

      why not have the game hold the necessary maps and rules client side

      Because he's smart enough to learn from the fiasco that is Diablo?

    3. Re:one-to-many by buckrogers · · Score: 3, Interesting

      This is actually very interesting to me...

      You could basically write a game that put a display up on multiple X terminals. This would have multiple views into the same world and allow multiple keyboard and mouse inputs to that world. The server system and network would have to be very fast to support this game. It is practically impossible to cheat with this setup too.

      The other end of the spectrum would have the game distributed onto each machine, with all updates from every machine being multicast to every other client at the same time. This would allow each client system to distribute part of the load of the game and its display across the network. You would need a very fast network for this.

      In between these two extremes is a central server that has clients connect to the server. The best way to distribute the work on this system is to look at what needs to be done. The local system will render the view and play the sounds. It will need to send it's mouse and control movements to the central server. The central server will look at all the inputs and send back update information to all the clients.

      It can also be slowly uploading the information it will need for the next level while you are playing the current level. You may also have an encrypted CD at each client that can only read the information when the server gives it a valid key. The key is not cached. You may also want to authenticate that the client is valid by performing a checksum on some portion of the system in memory and returning that to the server.

      This way the rules are all on the server, so cheating will be at a minimum. But they will have all the map data, so a hacked client may give them more info than the other players have.

      The next step is to also download the rules to the clients at game time and let the clients decide what is happening for themselves, then send an update to the main server which just distributes the info to the other clients on a need to know basis. This would eliminate all mouse and keyboard data uploads.

      But having modified clients that allow cheating could be bad. You can minimize this by providing stripped binaries that authenticate to the server, but a determined cracker can get around that.

      --
      -- Never make a general statement.
    4. Re:one-to-many by Guignol · · Score: 1

      I'd see another (more complicated) solution:
      Having a central server resposible for synchronization, but leting clients do most of the job.
      That could involve some cheating, but not that much if you don't let them do just anything.
      The map is something they can have localy. it doesn't mean they can change it, if there is a change they have to be synced about it from the server. if they want to make a change (using a spell or something) than the server validates it and propagates the changes to all the clients.
      But to have a very good performance, you really need to let some cheating capabilities to the client.
      ie. letting them handle some of the gameplay. You could however make it very dificult using a kind of p2p system.
      The idea is, the server knows about all the world changes etc. but only let clients know about it whenever necesary. each clients encounter happens "localy only" and is handled by those clients. the clients handle it by putting one of them as the temporary server for the encounter.
      The election of who is the local server (which is not a complete server as it is a reporting slave from the main one and cannot do aboslutely everything itself) would eb with an algo. that involves calculating best computing capacity+best average relative pings+some random maybe.
      So there could be some cheating, but this would require a handful of co-cheaters working together on a previously agreed encounter.
      The global effects of their cheating can be greatly disminished if the local server has no spawning ability (things like that, which means, when the control is transfered form the central to the local server, some variables, like XP etc.. have a precalculated max. so they cannot tell the server "hey now I have x ammo or x xpoints etc...)
      so if it involves unimportant NPCs, they can be handled by the local server, if they are important NPC, the central server is involved in the equation and is then the chosen local server.
      The only cheating that can be done there is (I think) that the chosen local server has power to destroy its oponents. Still, at reporting time,from the clients and the local server, anomalies can be detected.
      But the reports can be transfered to a sub-server that analyzes the outcomes with the known variables, to determine if there is sure or probable cheating. (it can takes its time, after all the actions will be taken in due time). if there is only probablñe cheating instead of sure cheating (ie. the server was just an unlikely good player or extremely lucky on random dices) than it can be "marked" as probable cheater. and be tracked. f a patron of him being extremely good when server and just average or bellow when client, than we have a smart cheater.

  18. Consider Java RMI, maybe a fit for your game by hallorant · · Score: 1

    You may want to consider Java using RMI, Java is more road tested for distributed applications than C# and the RMI library would help raise the abstraction level for the network programming. Bruce Eckel puts out a good intro book (also on-line) for Java if you don't know Java and O'Reilly puts out a decent RMI book.

    Also consider that Java would allow instant support to all Windows, Mac, Linux, and Unix platforms--a real benifit I think.

    Good Luck

    1. Re:Consider Java RMI, maybe a fit for your game by Anonymous Coward · · Score: 1, Informative

      Having used and tested the performance of RMI I would immediately vote against it. It would definitely make your life easier, as it simplifies interface development. It also reduces the work load of interface modification. However, and this is a big however for a multiplayer game, the delays are generaly 50-100% longer than with pure sockets. Considering that you're using a centralized server, which slows the process down even further. I would say that RMI is a plausible but not practical solution.

    2. Re:Consider Java RMI, maybe a fit for your game by hallorant · · Score: 1

      Yes, RMI introduces lag overhead, have you had any experience with Java using the basic socket libraries? Do they have the same problem?

      Java use may introduce some lag, but you probably will have your system up and running faster and on many platforms -- you can find the bottlenecks and work out reasonable solutions.

  19. Mod This Up To +5!!!! by cybrpnk · · Score: 1, Redundant

    WorldForge is the first thing that should be considered on this topic...

  20. FreeCiv by RedWizzard · · Score: 5, Insightful

    Sounds like the architecture you're planning is quite close to FreeCiv's. You might want to take a look at that.

  21. Re:.NET will soon be the dominant GUI for Linux by peripatetic_bum · · Score: 4, Interesting

    This is true, but from an anlysis our group did,
    we did find one interesting factor that could actually make make the windows-based platform not viable anymore.

    The fact is that up to now, hardware, the OS software and, for the most part, games have been a pay-once/play forever deal.

    With XP, this model is trying to be changed, so not only do you have to keep paying to use XP, but you can think of it as an additional cost to playing your games.

    If you dont beleive, think about the Xbox. Now where does MS suggest that you will need to pay to continue to use the Xbox(for now), and that is their games development platform, thus they wisely avoided trying to charge gamers for the OS they are playing on, thus I do think that Linux does have a chance of being a gameing platform, but this is not an advantage that linux only shares, because right now, we dont pay for OS's for any gaming platform ( I mean, PS2, gamexube, etc...) we just pay for the games,

    So what I am trying to say is the C# really isnt a good choce because the OS it is to written, now comes with more Costs than any other OS.

    Thanks!

    --

    Sigs are dangerous coy things

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

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

  23. Multi player bugbear by ackthpt · · Score: 1

    Multi player has always been a bugbear, but I'd recommend setting up a merc or diku (if you really want to learn important lessons :) mud and cut your teeth there. Take the advantage of learning to manage other coders who pitch in and checkin/checkout code. FWIW I'd start in c and skip c++ unless I was convinced I needed it.

    --

    A feeling of having made the same mistake before: Deja Foobar
  24. Re:Why the hell? by Anonymous Coward · · Score: 0

    Can someone please explain to me what this post was supposed to mean?

  25. Yes I Have by Anonymous Coward · · Score: 3, Funny

    Back in '97 I did the exact same thing in Perl. It was actually a multiuser accounting package, but the principals are the same.

    By blasting debits, the accountants could increase the net value of the company. If they missed, the debit's could rip through the balance sheet of the company...rendering it's offshore shields useless. If that happened a few two many time, it could spin the whole company into bankrupcy and court-ordered liquidation.

    I found that the biggest problem was latency. I worked on some time compensation algo's, but I didn't get a chance before I was right-sized by the company.

  26. Security Reasons by hattig · · Score: 4, Interesting
    Having the client be more than a dumb interface to the world will introduce areas where the client can be modified for cheating purposes. Security in this sense is so very important. You don't want your world to have a player who locally edits the map to have a bridge over the "chasm of death" so he can reach the "amulet of light" without fighting the "hordes of minos" do you?

    In Java, I have played Dusk (dusk.wesowin.org) which is a basic graphical MUD style environment but seems to be okay and contain a reasonable amount of the basics. And Java is like C# in many areas except supporting reflection and other good ideas, unlike C#. I should mention WorldForge as well.

    1. Re:Security Reasons by TummyX · · Score: 2, Informative


      And Java is like C# in many areas except supporting reflection and other good ideas, unlike C#.


      I don't quite understand your sentence, but if you're implying that C# doesn't support reflection then you're wrong. C# has FULL reflection support and goes beyond java (like C# attributes).

      Look for the reflection classes under the System.Reflection namespace.

  27. freeciv! by jdavidb · · Score: 3, Interesting

    Yes, it's been done before, by freeciv


    I never miss a chance to plug freeciv, because it's my favorite game, and a prime example of what good can come from programming free software.


    freeciv takes the same client/server approach you're advocating, and, as near as I can tell, scales somewhat. Now, if you've got a lot of graphics going from client to server, it might not work the same. So I recommend freeciv just as a starting point.


    Have fun!

  28. Some Advice by Shelrem · · Score: 5, Interesting

    I'll avoid most of my comments about your choice of language because most of it is of a political nature, rather than practical one; however, I really wouldn't suggest trying to make a massively multiplayer game with a language you're unfamiliar with. It's quite an undertaking even with a language you know. I know; i'm working on one.

    As for the networking code transparency, this one seems fairly obvious to me.. Just keep a datastructure containing all the changed or "tainted" objects as you go. Make mutator functions of your classes set objects as tainted. Then, just do the networking updates once or twice every time through the main loop (assuming it's in the same thread. Otherwise, you can implement something that might end up being a little more efficient).

    As for updating only what the player needs to be updated on, this seems like a question of algorithm efficiency. I don't know the specifics of your game, but with most massively multiplater games, transmitting the entire world state, or even the entire list of changes to every client, every cycle would be insane. So, you have to only update the section of the world that the player can see. How to do this well depends on the internal structure of the world, and what sort of stuff the player can "see". If the game is room-based, then this is easy. If the player can always just see a specific size circle or rectangle around him, this is also easy (each event can check distance to all players in its regeon). If it works like most RTS with arbitrary viewing areas, then you might have to be a little more clever. Whether this is even much of a concern is really a question of the number of people supported, and the expected hardware this'll be running on.

    Hope that helps,
    ben.c

    1. Re:Some Advice by peripatetic_bum · · Score: 1

      how good are you at doing end-user interfaces over a medical databse?
      Thanks

      --

      Sigs are dangerous coy things

    2. Re:Some Advice by tshak · · Score: 2

      I'll avoid most of my comments about your choice of language because most of it is of a political nature, rather than practical one; however, I really wouldn't suggest trying to make a massively multiplayer game with a language you're unfamiliar with.

      This is very good insight. However, I think C# is a great choice and an exception for this situation. If you have a C++ or Java background, learning C# is extremely trivial. Plus, the networking libraries of the .NET Framework are very intuitive.

      --

      There is no longer anything that can be done with computers that is nontrivial and clearly legal. -- Paul Phillips
  29. Re:Slashdot -- GAYS AHOY!! by Heretic2 · · Score: 0, Troll

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

  30. Try AOP (Aspect Oriented Programming) by hieronymous72 · · Score: 5, Interesting

    AOP might be a great way to handle the problem of dealing with the update issue. You can program as though they are on the same box and code your aspects to deal with what to send and when. It's not an easy thing to learn (think when you went from procedural to OOP) but it can pay huge dividends.

    I use AspectJ (www.aspectj.org) but that's for Java...I don't know of any AOP toolkits available for C# since it's such a new language.

    Good luck.

    --
    "All I ask is for a chance to prove that money can't make me happy."
  31. Anti-WebWasher by Mwongozi · · Score: 2

    What an annoying site. Won't display anything if you're using WebWasher to block banner ads, it just says "WebWasher not allowed".

    Just FYI if you're using WebWasher, in the "Proxy Engine" section of the options, turn on "No identification as WebWasher with server", and you'll be let straight in.

    What's the sense in blocking WebWasher? If you block people, people aren't going to see your ads anyway, the people blocking them are exactly the people who aren't going to click on them anyway. And especially as WebWasher has an option to hide itself!

    1. Re:Anti-WebWasher by Courageous · · Score: 2


      *shrug*.

      You do know, don't you, that in the long run a lot of services will probably go over to micropayments, right? Bandwidth costs _money_. Someone has to _pay_. If it's not consumers via advertising influence, it will just be someone else.

      C//

    2. Re:Anti-WebWasher by RevAaron · · Score: 2
      What's the sense in blocking WebWasher? If you block people, people aren't going to see your ads anyway, the people blocking them are exactly the people who aren't going to click on them anyway. And especially as WebWasher has an option to hide itself!


      The logic is that you don't get the content that those ads are paying for. Sure, it has the option of hiding itself, but this is better than nothing. It seems that this option isn't turned on by default, or I would think that you wouldn't have run into the problem.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    3. Re:Anti-WebWasher by mcelrath · · Score: 2
      Why would WebWasher make itself identifiable on the outside? That's just silly, and asking for trouble. FilterProxy seems to get right through, and I don't see any ads on the page either.

      --Bob

      --
      1^2=1; (-1)^2=1; 1^2=(-1)^2; 1=-1; 1=0.
    4. Re:Anti-WebWasher by OmicronTheta · · Score: 2, Informative

      Actually, our site doesn't even have ads. Webwasher is blocked because an earlier version of it sent thousands of requests with every pageview, DOSing the server.

      --Elefth

      --
      Cuiusvis hominis est errare, nullius nisi insipientis in errore perseverare
  32. Re:Why the hell? by Anonymous Coward · · Score: 0

    C# is slower

  33. Re:ATTACK! by ackthpt · · Score: 1, Funny
    Microsoft massacres you to small fragments with its capital investment.
    Microsoft massacres you to small fragments with its EULA.
    Microsoft massacres you to small fragments with its Memory Exception error.
    Microsoft massacres you to small fragments with its BSOD.

    Your server is DEAD!!

    <

    --

    A feeling of having made the same mistake before: Deja Foobar
  34. Re:Why the hell? by gluteus · · Score: 0

    Java is slow as a GUI, but the networking and all the other plumbing you'd need for that game would be fast enough. Java's standard API is incredible, and if I was going to write a big honking game program, I know what I'd write it in.

    Do the server in Java, do a client in Java, and let some other sucker do a native client if they want one.

  35. Some advice... by powerlinekid · · Score: 3, Insightful

    If you want to maximize your users, why not use java instead of c#. The syntax is really similar and the performance difference is negilable. On top of that, your users can run the app is solaris, linux, and windows. Along with that, you can build a client java app, so that users can just use IE, Mozilla or Netscape to play the game. My experience with network clients and users, is that they like to use what they're accustomed to. By embedding something into a browser you're cutting down some tech support and installation problems. The other deal is c# is not too tested and requireds special installations for Win 9x and 2000 because they don't come with it. Everybody doesn't have XP yet. I've implemented some stuff like this in java before and it works very nicely due to java's nice network libraries.

    --

    can't sleep slashdot will eat me
    1. Re:Some advice... by Courageous · · Score: 1, Insightful

      If you want to maximize your users, why not use java instead of c#.

      Even as a release candidate C# is faster than the best Java has to offer after a half decade of development or more.

      C//

    2. Re:Some advice... by Peaker · · Score: 1
      Java never seems to run very well on any given platform.

      It always looks and feels awkward, and never 'fits in' the platform it runs on.

      It doesn't seem to really be that 'portable' in the sense that Java programs often seem to work in unexpected ways on different platforms

      He can probably compile C# down to any platform he wants to, as Linux seems to have C# compilation support, and other platforms will probably have this soon.

      If Linux is for dorks, who is Java for?

    3. Re:Some advice... by HerbieStone · · Score: 1
      By embedding something into a browser you're cutting down some tech support and installation problems.

      I'd like to know where you get this from. From my work-experience, programming Java is nice thing to do... EXCEPT if you have to programm Applets, then Java-programming is a bitch. You can be sure that the different implementations in each browser will bite you in the ass if you don't do any thorough unit-testing on every browser. Even if you don't go into using the latest cutting-edge libraries it's difficult to get things running smoothly.

      I say, ship the programm as a Java-application, with a nice "Setup.exe" for Windows users which will install the Application + JRE and for the rest of us the jar-File will be sufficent.

    4. Re:Some advice... by RevAaron · · Score: 2
      If Linux is for dorks, who is Java for?


      Linux is for suits. Or sell-out geeks. Or geeks which really want a language like Smalltalk or Common Lisp, but either are ignorant of their existence and maturity, or are programmed to immediately dismiss all languages with a non-BCPL-derived syntax.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    5. Re:Some advice... by Anonymous Coward · · Score: 0
      You're full of shit.

      Give us an example of any non trivial application that have been shown to run faster in C# than in Java.

    6. Re:Some advice... by Kerg · · Score: 4, Interesting
      Java never seems to run very well on any given platform.

      It runs just fine on my Windows.

      It always looks and feels awkward, and never 'fits in' the platform it runs on.

      Eh? What are you talking about?

      * It doesn't seem to really be that 'portable' in the sense that Java programs often seem to work in unexpected ways on different platforms

      Having written server software in Java for the past 3 years can't say I've really seen this. I'm still amazed by the fact that I can drop my binaries on the occasional Linux or Solaris box and it just works. It's definately more portable than anything else I've worked with. Most often portability comes down to the experience of the programmer. Java doesn't prevent a newbie from being stupid and screw up portability.

      * He can probably compile C# down to any platform he wants to, as Linux seems to have C# compilation support, and other platforms will probably have this soon.

      It's not the language thats important, its the libraries. Java has them, C# doesn't have them outside the Win32 platform.

    7. Re:Some advice... by curunir · · Score: 5, Informative

      Not exactly true.

      Java has a lot of overhead. But that overhead is there for a reason. Java code gets faster over time as it runs (both due to optimizations done at run-time and the fact that class loading is still an expensive operation). However, in the case of a massively multiplayer environment, Java may be (and probably is) the best choice for the server environment. In a controlled environment where the application is expected to run for a significant amount of time, Java can actually perform as well or better than natively compiled code.

      The "Java is slow" argument is soooo tired. Sure, there are many instances where Java is slower than other languages (even C#). But if you're going to knock Java's performance, explain why or shut the f@#* up.

      --
      "Don't blame me, I voted for Kodos!"
    8. Re:Some advice... by Anonymous Coward · · Score: 0

      Curnir.

      I'll tell you one thing. Every time I hit a java applet it takes ages. Every time I use a C++ applet the IT dept wrote it takes microseconds to start. The endless Bulls**t of idiots like you who claim java compares is simply sun brainwashing, and thankfully plenty of folks know first hand just how slow java is. Before BSing further, check out about half the early Java claims when it was released. I keep them handy as a sort of BS meter. I suspect you havn't read what sun had to say or tried out the first release of java.

      You ever look at the memory footprint of your server-side java apps, and checked out how they compare with a C++ app? Then think, I need to support 5,000 concurrent instances of this, and laugh the java idiot off the property.

      Now try out the first release of C# (which has got far less hype behind it) and you will be pleasantly suprised.

    9. Re:Some advice... by jsse · · Score: 3, Interesting

      It always looks and feels awkward, and never 'fits in' the platform it runs on.

      What you are talking about 'Looks and Feels' is the auto-rearrangement of GUI widgets with some 'Layout' supports. The 'Layout' support is designed from the ground up for cross-platform, such that the GUI widget adjust themselves for different constraints like windows and screen sizes.

      Few other language offers such a cross-platform convenient. You can place the widgets pixel-by-pixel in java if you like, but it hurts the portability.

      I studied C# a great deal before giving comments on the comparison. My observation is that C# almost has one-to-one mapping of the syntax of Java, some are so un-innovative that adding an 'i' before the keywords. It seems to me another 'embrace and extend' practice.

      Of course, I didn't mean C# is a bad language. Doing something based on existing successes would at least yield something good, so I always keep an eye on C#.

    10. Re:Some advice... by Anonymous Coward · · Score: 0

      Why don't you try to understand what the guys trying to achieve its a server app and how many Java server apps have you really worked on , on the server Java will be kicking C# ass for a while to come!

    11. Re:Some advice... by Ian+Bicking · · Score: 2
      But if you're going to knock Java's performance, explain why or shut the f@#* up.
      Okay, Java will be a much worse performer than C, because in C you can design your own object model (without the overhead of one object model layered over another -- which is a massive overhead). In an environment like this it could really make sense.

      There are real performance issues here, to the point (if you want to do it right) you need to think of it as systems programming. You'll have non-systems programming as well, which doesn't have to be in straight C, but I think there would be wisdom in a C-based foundation.

      The typical place where Java is used as a server would be web pages, but there really isn't a big need to perform well there. Obviously, since people even use Tcl for that. A multiplayer game can't be batched in the way web requests are, so it's a very different performance situation.

    12. Re:Some advice... by rutledjw · · Score: 1
      curunir has an excellent point. Java can run VERY fast with the run-time optimizations AND through using object reuse. By building an object store for each object you create and intend on re-using, you can drastically speed up your execution time.

      Yeah, building such a store can be a slight pain in the ass, but where I've used it, the speed up is VERY noticable.

      It seems as though the greatest overhead here (at least using the Sun JRE, which isn't the fastest anyway) is object creation and garbage collection.

      --

      Computer Science is Applied Philosophy
    13. Re:Some advice... by Courageous · · Score: 2

      I don't believe "Java is slow" (except for Swing, which is very slow), I just believe that C# is faster, that's all. And that's because it is. Sorry if that gets your gourd. You can get the Release Candidate and try it yourself if you like.

      C//

    14. Re:Some advice... by Courageous · · Score: 2

      You haven't done any C# development, so stop making stuff up.

      C//

    15. Re:Some advice... by curunir · · Score: 2

      Hmmm...once again you simply say "x is faster than y" with no justification whatsoever. I will concede that in your application, "hello world!", Java will probably run quite a bit slower since the VM still has to come up, however a blanket statement like C# is faster is just plain wrong. Like it or not, there *are* instances in which Java is faster.

      It is a "right tool for the project" situation. So once again, come up with something half-way sentient, or shut the F#%* up.

      --
      "Don't blame me, I voted for Kodos!"
    16. Re:Some advice... by Peaker · · Score: 1

      I was being sarcastic about his love of Java and his use of his sig to spread his hate of Linux. I was not trying to link languages to OS's.

      I really like Linux, as the best implementation of *nix I know - what other *nix has such a complete and powerful distribution as Debian? :) Debian *BSD I am not sure about, but I I dislike BSD's for other reasons.

      Anyhow, despite this liking of Linux, I recognize *nix is a crappy design (although the least crappy currently common), and I love Smalltalk and Python, and am rather neutral about Common Lisp (which is cool in many ways, but crappy in others, imho).

      It was really not about what it seemed to be the way I put it :)

    17. Re:Some advice... by Peaker · · Score: 2

      It runs just fine on my Windows.

      So do EXE files. Its less common OS's where more problems show up.

      Eh? What are you talking about?

      I'm talking about the Swing toolkit, drawing widgets on its own and not using the native platform widgets, which is fine, except those widgets look nothing like the platform's.

      This makes Java client-side apps to stand out from the crowd and have their own look & feel. If you use a Gtk+, Qt, Tk, desktop where different looks and feels exist at the same time it'll seem okay. But in a 'purer' Windows, Gnome, or KDE desktop, where all widgets look the same, this is rather ugly.

      Having written server software in Java for the past 3 years can't say I've really seen this. I'm still amazed by the fact that I can drop my binaries on the occasional Linux or Solaris box and it just works. It's definately more portable than anything else I've worked with. Most often portability comes down to the experience of the programmer. Java doesn't prevent a newbie from being stupid and screw up portability.

      Well, just as an example, www.topcoder.com is a Sun-funded site and based mostly on Java. I'd suppose they write good Java code, not Newbie'ish, and yet their applet works in very awkward ways on different platforms. Fine on Windows, yet quite problematic on some Linuxes, throwing Null exceptions, and fine on others.
      I can say I had better experience with Qt C++ code.

      It's not the language thats important, its the libraries. Java has them, C# doesn't have them outside the Win32 platform.

      This I can agree with. I suppose the C# port will come with the runtime and its libraries, and if not you are completely right. However, as an extension of what you say, you can view Qt as a great alternative to Java because its quite portable to most interesting platforms, and as you say, its the library that counts.

    18. Re:Some advice... by RevAaron · · Score: 2

      Heh! Freudian slip! I mean Java, not Linux. ;P

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    19. Re:Some advice... by cduffy · · Score: 1

      Yes, Java takes longer to start up. That's rather irrelevant in a discussion of runtime speed for a long-running server.

    20. Re:Some advice... by Courageous · · Score: 2

      ...with no justification whatsoever.

      Two words: unsafe code.

      Thank you for playing.

      C//

    21. Re:Some advice... by Kerg · · Score: 2
      So do EXE files. Its less common OS's where more problems show up.

      And why is this? As an exmaple, look at all that IBM has done with Java -- they're running it pretty much across their whole server hardware, ranging from modern operating systems to old legacy mainframes. The fact is that "less common" OS's can have a good Java support. If you don't see it, it is hardly the fault of Java the language or runtime but the quality of the implementation of the virtual machine and the expertise of the people who implemented it.

      I'm talking about the Swing toolkit

      Nothing in Java forces you to use Swing. The native widget peers still exist in AWT, and for example IBM has built new widget library (SWT) that uses native widgets only.

      Again, it is the choice a developer makes. I have built Java GUI applications in pre-Swing times using AWT, and I still remember the pain of trying to get it to work consistently across both Windows and Linux. I will not go back to that and will keep using Swing as it is truly a portable GUI framework. However, if a developer wishes to take an advantage of native widget peers, it's possible and it is being done by some projects (see Eclipse for example).

      and yet their applet works in very awkward ways on different platforms

      Applets have always had their problems and probably always will, but again this has very very little to do with Java as most Java development is not in applets today. The problem with applets is the piss poor and mostly outdated JVM's embedded in the browsers. Java Plug-in may have helped the problem, I don't know, but I think its only available for IE and Netscape. Anyway, I think more modern browser have learnt the lesson and use a JRE from third parties that do actually work and are compatible.

      Fine on Windows, yet quite problematic on some Linuxes, throwing Null exceptions, and fine on others.

      Like I said, a problem of the browser having incompatible JVM and runtime libraries, most likely. Moving Java binaries from Windows to Linux has rarely been a problem to me when using a JRE ( except Linux JVMs being sometimes rather quick to Seg Fault because of inmature implementations).

      In my experience Java works very reliably across platforms as long as you use mature and compatible virtual machines.

      I suppose the C# port will come with the runtime and its libraries, and if not you are completely right

      Many applications will need for example some kind of database connectivity. Developing C# on Win32 platform using Microsoft tools this is achieved using ADO+. Microsoft has no intention of opening ADO or standardizing it, so how will that application work on a Linux system? It won't. That's why the whole C# approach seems very uninteresting to me. You will get Win32 C# apps and Linux C# apps but you cannot move these application across platforms without a significant porting effort.

  36. C# ??? by NSupremo · · Score: 1

    I'll be looking forward to the Mac version.

    --
    http://en.wikipedia.org/wiki/2004_U.S._Election_co ntroversies_and_irregularities
    1. Re:C# ??? by Anonymous Coward · · Score: 0

      Why I even both posting is a mystery.

      Mono will operate on a mac under a nix platform.

      Bye now.

  37. Re:Slashdot -- GAYS AHOY!! by Anonymous Coward · · Score: 0

    Of course I do. Richard Stallman uses his tiny, withered MICROKERNEL in that failed TURD project of his. Linus is the one who likes to muck everything up by poking his MONOLITHIC KERNEL in people's faces when they least expect it.

    . . . Stop me before I post again!
    (Still BANNED.)

  38. You already decided on your model but... by nusuth · · Score: 1

    If your game will be deterministic, why don't you handle visible sub-world state changing events on clients? Then the server has to supply states of the world only when a new player starts to interact a new sub-world.

    --

    Gentlemen, you can't fight in here, this is the War Room!

    1. Re:You already decided on your model but... by quintessent · · Score: 1

      Dr. Strangelove lives!

  39. Map/Update idea... by powerlinekid · · Score: 3, Interesting

    Divide the map up into areas where you want all users to access the same things. Use a broadcast message to send mass updates to this. This cuts down individual client updates. Say there is an earthquake or something in the game. Broadcast this data to all those that affected in one big message. Java has features for this although I'm sure c# does also.

    --

    can't sleep slashdot will eat me
    1. Re:Map/Update idea... by Peaker · · Score: 2

      Broadcasts would 'hardcode' his game to only work on LANs.
      Or how is he supposed to 'broadcast' to multiple addresses?
      I believe IPv6 may have something for this, but nothing I know of in IPv4

      Besides, are the clients supposed to ack this information to the server? If so, you have per-client overhead, and at best saving around half of the overhead of sending it to all clients separately.

      -- Flamebaits in sigs: The best way to spread stupidity

    2. Re:Map/Update idea... by j1mmy · · Score: 2, Informative

      He's using broadcast in the more generic sense, not the literal techincal sense.

  40. Quality of Responses: by Anonymous Coward · · Score: 0

    Dear Reader,

    You will likely recieve a bewildering variety of responses to your question on this forum, and nearly all of them will be completely worthless.

    Thankyou.

  41. WARNING: ORALSE.CX LINK IN PARENT! by Anonymous Coward · · Score: 0

    goatsex is less offensive

  42. I hope you just plan to code... by Utopia · · Score: 1

    ...the server part in C# and not the client UI in C#.
    If so, look at the terrarium code (slated for public release in mid Feb. 2002). Terrarium is basically a multiplayer peer to peer game which showcases .NETs network technolgies. Exactly what you need.

    1. Re:I hope you just plan to code... by Utopia · · Score: 2, Informative

      Here is the website Terrarium

  43. Thoughts by Joe+Rumsey · · Score: 5, Interesting

    If you've never written a client-server game at all, you might check out Netrek for some basic ideas. It isn't massive, but it is client-server, and it's where I learned most of the important things I know about network programming in general (and I do, in fact, get paid to write network code for games now.) Quake or Quake 2 source are probably also good things to look at, though I haven't seen their code personally.

    None of those solve the major problems you're really asking about though: how to decide who gets to know about what. Worldforge is the only open source project I can think of to point you to in that area. Perhaps some MUDs might be useful as well, but they tend to be based on rooms, not areas, which doesn't translate well at all to most other games.

    Probably the biggest problem is avoiding N^2 operations as much as possible. At some level, there's no way around it: N players in an area generate events that have to be propagated back out to N (or at least N-1) players. This obiously makes scaling to arbitrarily large populations difficult. On the other hand, if you can guarantee a set maximum number of players in an area/server/whatever, you can target that maximum and not worry about it a whole lot.

    A slashdot post isn't really the right medium to answer this question. There aren't any quick and easy answers, you need to figure out what makes sense for your game on your own. I've spent a large portion of the last year thinking about these problems myself, and I wish you the best of luck on it. I'm having a blast myself, but it's also the most challenging work I've ever done.

    I am interested in hearing your reasons for using C#. That's actually somewhat shocking, but maybe it's just ignorance on my part. I can't imagine why you'd want to bet the farm on such an immature system, regardless of the strengths you've perceived in it. What does it do for you that C++ doesn't, and is it really worth it?

    1. Re:Thoughts by tshak · · Score: 1

      This is a bit Off Topic but there are some major advantages to going with C#. First, think of the advantages of using a GC'd platform like Java. Second, think about not using pointers unless it's absolutely necessary. Third, think about an incredibley intuitive and powerfull class library that allows you to focus less on the "plumbing" and more on the creation of cool software.

      Yes, some of us love being plumbers (tweaking malloc calls or fine tuning a large loop in ASM), but for projects like this I think it is more appropriate to use a higher level language.

      I can't imagine why you'd want to bet the farm on such an immature system.

      It may be immature on the client machine, but it is a very mature platform. My company is currently running it's ecommerce site for it's flagship product line on the Beta 2 (!) .NET platform (using C#, of course). Next week we are launching our next generation Customer Management Tools for the call center which is also all on .NET. Beta 2 is production level stable. This is also proven by a handful of high-profile sites mainly run by Microsoft (eg: MSN Shopping, office.microsoft.com) but other companies as well. For example, a huge portion of Verizon's "trouble ticketing" system was launched ~6 months ago on the .NET platform. Now we are testing the "Dot Oh" release of .NET (released in Jan), and I'm sure it'll be even more robust then the beta.

      --

      There is no longer anything that can be done with computers that is nontrivial and clearly legal. -- Paul Phillips
    2. Re:Thoughts by Joe+Rumsey · · Score: 2

      Yes, some of us love being plumbers (tweaking malloc calls or fine tuning a large loop in ASM), but for projects like this I think it is more appropriate to use a higher level language.

      Ok, that's fair enough, but I think something that isn't always clear outside the gaming industry is that most of the people who work in it (especially those who are successful at it) are the ones who like being plumbers. If you think about it, it makes sense: a large portion of the history of game development centers around coding increasinly complex games for the same platform that ran last year's games. The playstation 1 was a "current" platform until a year ago, and it only has 2MB of RAM! TWO MEGATBYTES. The PS2 still only has 32MB, way behind PCs, where you need more than that just to load Windows. There's a lot of baggage to get rid of before most game programmers will start considering things like C#. (I've mostly done PC programming, just using the PS as a graphic example, because it does still apply to some extent)

      When I say C# is shocking, it's partly because I'm trying to imagine myself going into work and suggesting it to a bunch of programmers who are used to programming "impossible" things on minimum spec systems. Even moving to C++ has been mighty slow for a lot of studios. No one would even take me seriously if I tried to push C# on them. "Let's code it in Java!" is already guaranteed to get a laugh from any game developer I know of. C# has the same sort of negative connotations.

      I generally try to stay out of these language discussions, because I've come to realize that being in game development has skewed my perceptions a bit over the last few years. "Let's code it in Java!" isn't automatically funny in other industries, I know that. And I suppose it's the same with C#, but being newer, it's even higher up the joke-language-for-games scale.

    3. Re:Thoughts by tshak · · Score: 1

      You make some great points. It sounds like he wants a relatively simple frontend. It's not like he needs excessive DirectX or OpenGL calls. Otherwise, I'd say you're correct. If you are trying to develop Quake4, half of the fun is the plumbing.

      --

      There is no longer anything that can be done with computers that is nontrivial and clearly legal. -- Paul Phillips
    4. Re:Thoughts by sheldon · · Score: 2

      Hi Joe!

      I agree that Netrek certainly has example aspects of what this guy is trying to do. State is held entirely on the server, and only a subset of information important to the player based on their tactical perspective is transmitted.

      Now as to why C#. I don't understand what this guy is exactly trying to do. A massive multiplayer strategy game sounds like a rather large undertaking.

      I have been throwing around the idea in the back of my head of writing a version of the Netrek server and client using C#. As far as worth, I see it purely as an educational undertaking. If it works, then the result may be more maintainable and extensible than the existing C code.

      In the case of netrek, I doubt performance is an issue considering the game used to run on minimal hardware by todays standards. But in a massive multiplayer strategy game, I could see that as an issue.

      I probably won't go forward with this because I have little interest in games these days. But it is interesting to think about.

    5. Re:Thoughts by RevAaron · · Score: 2
      This is a bit Off Topic but there are some major advantages to going with C#. First, think of the advantages of using a GC'd platform like Java. Second, think about not using pointers unless it's absolutely necessary. Third, think about an incredibley intuitive and powerfull class library that allows you to focus less on the "plumbing" and more on the creation of cool software.

      But there's nothing new in those features. Sure, they're things outside of the domain of C/C++, but languages like Common Lisp and Smalltalk have had those for 20 years. C# doesn't have anything that they dont' really, other than a huge amount of marketing dollars. The .NET VM/CLR system however, is quite interesting, and could also present an advantage for a project, perhaps allowing different developers to work on their own components in the system, but without having to settle for C#.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    6. Re:Thoughts by RevAaron · · Score: 2
      Well, I generally laugh at Java too, even though I don't do game development. heh.

      In any case, this kind of game doesn't seem to be as speed-dependent, as for example, is a FPS. For this type of game, I think the focus would be more on cool features, a more engrossing world, interesting AIs, interesting networking methods. Something a higher-level language should be able to handle with ease.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    7. Re:Thoughts by Anonymous Coward · · Score: 0
      For example, a huge portion of Verizon's "trouble ticketing" system was launched ~6 months ago on the .NET platform. Now we are testing the "Dot Oh" release of .NET (released in Jan), and I'm sure it'll be even more robust then the beta.

      And as we all know, Verizon is the epitome of efficiency...

    8. Re:Thoughts by mikera · · Score: 1

      Thanks for the interesting perspective on the the people inside the gaming industry. In case you hadn't guessed, I'm outside it ;-).

      I'm a little surprised things like C# are considered a joke though - I suspect people might not be giving the issue enough thought. There are a lot of advantages to C# (and Java too, for that matter) especially in terms of programmer productivity and flexibility, and I would have thought that these would have won out in the gaming industry sooner or later.

      As every good coder knows, performance is 95% about choosing the right algorithm and architecture. I'm willing to bet a well-designed C# program would outperform a badly desined C++ program any day of the week. Ultimately, it's about choosing the right tools for the job, and that's what I *think* I've done on this project.

      My suspicion is that once DirectX starts appearing on .NET and the relative advantages of C# become more apparent, we will see several game developers make the switch, and probably do very well out it.

    9. Re:Thoughts by mikera · · Score: 1

      Yeah, the VM/CLR is one of the things that really interested me about C#. The language is nice, but the stuff underlying it is even more interesting.

      One fetaure I've playing with is the possibility of producing self-modifying code through the IL layer. You can Emit() a bunch of bytecodes and let the JIT compile them on the fly, effectively allowing you to perform some dynamic optimisations. It seems to have potential for things like inner loops that you need to reconfigure dynamically.

    10. Re:Thoughts by mikera · · Score: 1

      Thanks for the interesting comments.

      Regarding why Ask Slashdot, it's mainly because I thought people might have some interesting opinions on the subject. I think I've been proved right. I never expected it to create the answer for me, but it's certainly given me some ideas.

      I'm trying to avoid N-squared operations by making the subset of state communicated to each client relatively limited. Theoretically, it should scale linearly, with each player only recieving events from (on average) a small number of adjacent players. In practice there are some complexities, e.g. how to tune the algorithms to be efficient on a subset of a large map, but I think these can be nailed down to N log N at worst. It's a tough one though, since you have to make some pretty substantial architectural investments before you can test it out under load.

      I went for C# for the following reasons, no particular order:

      1.Something new to learn. It's actually a pretty easy transfer of skills from Java, so I'm having no trouble there.

      2.Garbage collection is a godsend for games. Sure, you can hack it into C/C++ but it's a kludge.

      3.Good networking tools and language fetaures, such as object graph serialization etc built in. Again, you can code these yourself if you want but I'd rather focus on the game itself. e.g. It's only a couple of lines of code to Serialize and transmit an arbitrary object graph. Stuff like that is a real PITA in C++.

      4.The language itself is nice, pretty convenient to program with most of the best bits from Java and Delphi.

      5.I'm not doing anything that really needs maximum processor speed, so I can live with a decent JIT compiler like C#. It's a strategy game, so no need for complex physics. The graphics stuff will mostly just be a few calls to native libraries. AI is far more about the algorithm than how much power you chuck at it. Ultimately, network bandwidth is far more likely to be a constraint on what I can do.

    11. Re:Thoughts by tshak · · Score: 1

      You are correct. The underlying platform is where a lot of the power lies, C# just exposes them.

      I've been coding in C# for about 7 months, and have already been through one full development cycle. I think that C# is one of the most transparent languages I've ever used (although I only have 5 years of professional experience). I'm not the first to make comments like this either. I think about Java, and how people say how similar it is to C#. However, it's always those "little things" that make a big impact on the overall effectiveness of the language (or anything, for that matter). Java was very cool, but I personally didn't "flow" with it nearly the way I do with C#.

      --

      There is no longer anything that can be done with computers that is nontrivial and clearly legal. -- Paul Phillips
    12. Re:Thoughts by Joe+Rumsey · · Score: 2

      Garbage collection is nice in theory. But if you're talking about a real-time game, it can be a major pain in the butt if it isn't done well. I don't know how good Java and C# run-times are at it, but imagine if you had GC that took 5 seconds every 10 minutes. Every 10 minutes, your game is going to pause or at least run very slowly for 5 seconds. You really want something approaching real-time programming for games, and GC makes that hard. At the very least, I'd want it to be something you have control over, which I believe is not the case in Java! You can correct me if I'm wrong, I'm probably just confused :)

      Now, if it's a turn based strategy, or if you're sure the GC implementation isn't going to get in your way, then yeah, it's pretty nice.

      Thanks for the responses, good luck again!

  44. wow, don't even know where to start by jon_c · · Score: 5, Insightful

    First off let me say that you are way in over your head, don't go into this thinking you will actually make a everquest. Everquest took 4 years to develop with a full staff of experienced programmers and artists, DAoC only took 2 years, but they had a very complete engine to work with. However i do not want to discurege you, attempting this, while foolish is a noble task where you will certainly learn a great deal. that being said:


    The only communication from clients would be commands to units, which is simple enough


    Generally the way this is handled is setting up a TCP communication for critical information, such as the stats of the player, text communication etc.. then send small UDP (connectionless) messages for non-critical data, such as player and monster movments. Be warry of using TCP for everything, this is something Anarchy Online did, which caused some pretty massive problems on the server side.


    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.


    There are two approches for this, one is a moving 'buble' of information, where you update the client with all data within a certain radius, another is the zone approach (i.e. everquest) where you send the an entire zone worth of information. Note that you are not sending everything, only monster,player movment and state (are they fighting).

    What should the object model look like?

    I have no idea, i imagine it would be far too large and complex to even describe in a slashdot post. However i recommend you look at it from a top down view, then try implementing from the bottom up. For example, you know that you have a 'world' and the 'world has players, monsters and items', 'players and monsters' could be concedered 'actors' with certain command antributes. 'actors interact with items' etc.. you should start seeing how to construct a object model. also don't worry about what this looks like at first and you will no doubt be revising it as you go a long, make things the work and compile so you have some possitive feedback for you hard work. When things seem out of hand, step back, make some coffee and draw out what you have and try to thing of a way to break it apart into managable sections.

    ok that is all, good luck.

    -Jon

    --
    this is my sig.
    1. Re:wow, don't even know where to start by MrBandersnatch · · Score: 1

      Some nice advice :)

      Its really inpossible to give anything more than general advice due to the lack of information about this project..for example how many clients, how large a server/systems budget, is the gameplay turn based or real time etc etc?

      That said....on a MASSIVE scale split up the individual subsystems - AI, client handling, client updateing, world updating, communications etc and then delimit zones/areas of control for each server/thread would be my recommendation. Ensure that threads for each server ( logical rather than physical ) are aware of each other and can request state. Pass along objects between servers for zone transitions etc..

      I know the above model is vague...it may not even be very good but it should allow you to deploy the hardware to allow the system to scale....

      *Shrug* shame I havnt done my Masters yet - I'm hoping to do it in just this area....

    2. Re:wow, don't even know where to start by Anonymous Coward · · Score: 0

      Well using TCP itself is not really a problem, it's just that most people would implement the server having one thread per connection.

      Use TCP but implement it using non-blocking I/O.

    3. Re:wow, don't even know where to start by jon_c · · Score: 2

      true, one thread per connection would kill bring the server down to a crawl. however just having a server handling 40,000 active tcp connections would kill it's stack. The way to handle the TCP side is usully one thread per proc. so if you have a 4 way Xeon box (or whatever) then have 4 threads each looping through the connections. Though how one does that depends on the OS.

      -Jon

      --
      this is my sig.
    4. Re:wow, don't even know where to start by Anonymous Coward · · Score: 0

      another is the zone approach (i.e. everquest) where you send the an entire zone worth of information.

      EQ doesn't always send entire zone updates. When a player first enters a zone, the server sends full details on all mobs and players in the zone, and after that it does continue to send details of nearly all monster movements but it only sends data about players who are either (1) near or (2) grouped with you. There may be other data that is not sent and I think the EQ programmers are gradually reducing the amount of data sent -- not for efficiency so much as to defeat cheat programs like ShowEQ and SINS.

    5. Re:wow, don't even know where to start by MrBandersnatch · · Score: 2, Insightful

      Its NOT a threading or a load issue that is the problem with TCP/IP - its the fact that its a stateful, connection oriented protocol. Even slight packet loss on a number of clients above a certain threashold will bring the server/system to its knees as TCP/IP tries to resend large chunks of lost data. If the point arrives where the resend doesnt arrive due to congestion/load issues - you have a problem.

      That is why most MM games use UDP largely and have gaming models that support the shortcomings of UDP. UDP for data where reliability and order is unimportant ( just impliment your own protocol on top of it to solve the problem of dropped / out of order packets), TCP/IP for reliability.

      The last MMORPG to use TCP/IP primarily was AO. Very successfull implimentation Im sure youll agree.....

    6. Re:wow, don't even know where to start by thona · · Score: 1

      Well, then I suggest you start eating your own food. Write a program that opens 40.000 Threads, and you will see what a memory and resource hog you have. A therad is pretty heavy - it needs at least it's own stack. Just at 64k per stack, 40.000 therads run you down to a memory use of 2500 Megabyte. Thats around 2.5 Gigabyte of RAM just for nothing. And the scheduler needs to check them once in a while. Try it out - and come back whining.

    7. Re:wow, don't even know where to start by throx · · Score: 2

      Generally the way this is handled is setting up a TCP communication for critical information, such as the stats of the player, text communication etc.. then send small UDP (connectionless) messages for non-critical data, such as player and monster movments.

      Actually the way this is usually handled is with UDP packets for everything. Using multiple socket connections (TCP+UDP) only wastes resources in your IP stack. If you have critical data then put a sequence number in the appropriate data packet and implement your own ACK mechanism. That way the program actually has an idea of what the lag for a certain client is rather than having it hidden by the TCP stack.

      another is the zone approach (i.e. everquest) where you send the an entire zone worth of information

      Everquest also uses the "moving bubble" approach. Updates are only sent frequently for mobs that are in your bubble of information (controlled by the client's clipping plane). Although the client does actually know of each mob in the "zone" (required for tracking skill to work) the updates for mobs in the far corner are extremely rare. Realistically the concept of a "zone" is used to limit the server requirements and client requirements. Each EQ server is run on 27 different machines, which would be next to impossible without using the "zone" approach. Clients only have to load textures and models which are implemented in that zone rather than demand loading anything in the world.

      In the end, it's all a tradeoff.

      --

      Fear: When you see B8 00 4C CD 21 and know what it means

    8. Re:wow, don't even know where to start by jon_c · · Score: 2

      I didn't say spawning 40,000 threads was a good idea, i just mentioned other problems with the one thread per connection idea. why are you telling me to 'eat my own food' as if i was advocating it?

      no offence, but comments like that ruin the slashdot community.

      -Jon

      --
      this is my sig.
  45. Don't forget Client-side Prediction by Rayonic · · Score: 5, Interesting

    It sounds like you're taking a lot of the stuff off the client's hands to add security. While this is a good idea, I can't stress enough the importance of the client predicting the positions of players and objects. Objects especially are easy to predict (an arrow arcing through the air, something rolling, etc.) Movement prediction can make or break a game; you'd be surprised how little tolerance players have for people/things jumping around with no movement in between.

    Heck, players can be pretty predictable objects themselves, if you want to get fancy. Most games have pretty simple algorithms predicting the future state of a player character (if player X is moving in a straight line, he'll probably continue to do so.) But I think you can get fancier than that. What about curves? (circle strafing) Or if the player is repeatedly hitting a button every half-second. (chopping wood?)

    It'd take a lot of coding, but the master server could conceivably take note of each player's input characteristics and compile some sort of "personality" profile for each one, which it could transmit to clients every time they start up, to help with their local prediction.

    Please note that I have no idea how much CPU time this would take up,

  46. make it as parallel as possible by king_ramen · · Score: 3, Interesting

    having one "master state" will be hard to scale. Make different states for different "zones" (either physical as on a map, or having to do with aspects of the game), and then you can delegate zones (or subzones) to other machines. Do this also for object-classes (player attribute state may be separate from object state, separate from location states, etc.) so that different subsystems can be independently optimized. A cluster of master META routers can glue these parallel states together to provide a single entry point and consistency. Round robin DNS would be sufficient in most cases (esp if using UDP or persistent (stateful) TCP).

    Obviously, until things ramp up, you should be able to do all this with one server, but making these parallel states will make scaling much easier when the need arises.

    --
    ----- Refactoring is the reason why man does not mistake himself for a god.
  47. Two strikes ... by Ldir · · Score: 5, Interesting
    If this is a commercial project, please tell us the name of the game so we can avoid it.

    In all seriousness, in my opinion (unless you're doing this solely as a personal learning experience), you are starting with two critical strikes:

    1. You're trying to do a major project in a language you don't know (and an immature one at that).

    2. You're trying to do a major project in a genre with which you have no experience.

    Either one could cripple the project. Put them both together and you're doomed before you start. You may eventually make it work - sort of - but it will never work well, and it will be riddled with bugs.

    I encourage you to start by developing a small multi-player game in a language in which you are already proficient. This will let you focus on the design and structure without fighting the language. Keep it simple, manage the scale, but incorporate the kinds of capabilities you want in the final version.

    When you've got that working, throw it awy and develop it again in C#. Since you're starting with a working design , you're now free to focus on the mechanics of the language. You need time to learn its limitations and idiosyncracies, and to become proficient. (I will let others debate the wisdom of C# - I'm skeptical of all proprietary languages, especially until they're field-proven.)

    Once you have succesfully finished a small project in C#, you can begin planning your real game. Based on your experiences, you may decide to scrap C# entirely. If you choose to stick with C#, then throw away ALL of your original code and start over. No matter how good you think your first code was, by the time you finish the big project you will know that it's crap. Might as well get it out of the way up front to reduce re-work and improve the overall quality.

    Of course, if this is a project you've been assigned as a commercial effort, you won't be given the luxury of doing it well. You probably already have a deadline pulled out of thin air, and you're probably already behind schedule. Speaking as a pointy-haired boss who actually has significant coding experience (a long time ago, in a galaxy ... etc.), most PHB's have no clue when it comes to software development. They work with the suits to draw up pretty little Gantt charts, and haven't the foggiest notion as to why they are complete fantasies. You can see some of the results in the bargain bin of your local Best Buy, or in the "still delayed" list of your favorite gaming magazine.

    In any case, good luck.

    1. Re:Two strikes ... by Anonymous Coward · · Score: 1

      Don't listen to this guy. If everyone gave up before they started just because they were afriad to learn or try where would civilization be?

    2. Re:Two strikes ... by Utopia · · Score: 1

      Good comments.

      But the guy is a pretty experienced programmer. C# is not very different for C++ or Java.
      If you know one of these languages then you would be up and running in C# is just a couple of weeks time.

    3. Re:Two strikes ... by Ldir · · Score: 2
      Don't listen to this guy. If everyone gave up before they started just because they were afriad to learn or try where would civilization be?

      If we tried to learn bridge-building by starting with the Golden Gate, we'd be at the bottom of San Francisco Bay.

      Who said anything about giving up? Just start with something manageable and build on the experience. Programming is an art form. "Software Engineering" is an oxymoron unless your project is staffed with developers who are already proficient in building very similar systems.

    4. Re:Two strikes ... by mikera · · Score: 1

      Yep - that's about how long I've had with C# and I'd say I'm quite far up the learning curve.

      Most similarities with Java, although I have also noticed some nice Delphi-isms like properties.

      Don't think picking up C# is the challenge in this case - it's much more about coming up with a decent network architecture.

    5. Re:Two strikes ... by Utopia · · Score: 1

      You probably already know this.
      The credit for architecting Delphi and C# goes to the same person - Anders Hejlsberg.

      I used in program in Delphi and I simply love it. Too bad I can't use it in my workplace.
      While C# and the .NET framework have a lot of similarities, it still doesn't match the flexibility I had in Delphi.
      For example, I had terrible luck using layouting in winforms but it always worked like a charm in Delphi.

  48. Significant Juxtaposition? by rjamestaylor · · Score: 1
    A story about product placement in video games juxtaposed next to this story about gaming which reads like a product placement sponsored by Microsoft....

    Maybe I've had too many pre-game brewskis.

    --
    -- @rjamestaylor on Ello
  49. Re:This is important by psyco484 · · Score: 1
    people trying to trash a group or even a single person should at least have the balls to login...

    "can't call that justice, if it's just a stupid excuse to fight, single out and attack the ones who've got no defense, you call that a new way of thinking, i call it regression to ignorance"

  50. Re:Why the hell? by Anonymous Coward · · Score: 1, Informative

    that's stupid, no it's not! Slower, perhaps, than say, straight C, but who cares?

    On a celery 400mhz, limewire, for example, runs fast enough to not feel slow.

    If the original poster who posted the question decides not to use java, then at least I would hope he wouldn't use c#. Does c# have features so vastly cool and ahead of other languages, that it would be chosen knowing the limited platforms available?

    What's that, most desktops, you say?? Well, when handhelds and other devices become more widespread, wouldn't it be cool to have the game on them as well, with minimal fuss? What about consoles, which seem to be trending towards online-ness, really really this time - only one out of the bunch supports microsoft...this is potentially a bigger market than desktops. Handhelds seem to be comming out left and right, some with their own OS, some with Linux, some with Microsoft...point is on these 'other' types of computers, microsoft does not a monopoly have.

    Think about it! Oh yeah, and all the stuff about making deals with the devil, the monopoly stuff, yadah yadah yadah, etc.

  51. Is it this easy? by monk · · Score: 2, Insightful

    Just thinking out loud, but it sounds like the client subscribes to updates from units in a particular "area" (defined however you like) and will automatically be subscribed to the "partial" or "distant" updates for adjacent areas. A client's key allows it to subscribe to exactly one area at a time.

    Server side you keep a list of client subscriptions and something like the PropertyChangeListener approach from Java to simplify the updates from your units. I think any solution has these or similar elements, your implementation will depend on what C# can do for you. I don't know anything about that. I used Java links as examples , since I didn't find any C# API links out there.

    Please let me know how things go, and I'm interested in feedback on my ideas from more experienced MMPG builders out there.

    --
    [-- Trust the Monkey --]
    1. Re:Is it this easy? by mikera · · Score: 1

      Yep, that's a pretty decent model to use. Don't think the client even needs to subscribe actively - it would probably be possible for the server to work out the relevant areas since it would know the player's position(s).

      My case is slightly more complicated in that I want to allow for pretty localised information hiding as a tactical element of the game.

      For example, I want a player to be able to drop some smoke and create cover for a surprise attack. This means that your filtering has to be a little more fine-grained than an "area", and furthermore you have to calculate it all server-side to prevent the client from requesting info that it couldn't legally obtain.

  52. An idea I'm kicking around... by 2nd+Post! · · Score: 4, Interesting

    Assuming you have a secure communication channel (whether it be trust, PKI, or other encryption), you can try to reduce lag by distributing resource request and allocation.

    Rather than the server handling 100 clients, when it needs to push out identical data to all 100, you push out data to 10 of those clients and rely on those 10 clients to push out data to another 9 clients.

    You can also push in the other direction. When client 1/100 says 'Hi!', rather than pushing it to the server to push it to 100 clients, the client pushes it to the client he's attached to, who pushes it out to the other 8 people, as well as to the server. The server then pushes the 'Hi' out to the other 9 clients it's connected to, who pushes out to their respective 9 clients.

    It's akin to treating the connection to the server as some sort of nested tree; you introduce latency but reduce the amount of server lag.

    1. Re:An idea I'm kicking around... by FastT · · Score: 2
      Interesing idea (you are basically describing a P2P network), but "latency" and "server lag" are the same thing. Lag is the ability to for the canonical server state to diverge from the client state, and this occurs because because of latency in sending/retrieving updates. In a time-critical application, where state needs to remain as consistent as possible in all views, your idea is problematic. This is especially the case when you start to consider clients with high-latency connections of their own.

      I think there is also the problem of peer-to-peer connections from a security point of view. Hacking a naive player's machine would be quite easy for a directly-connected, semi-sophisticated player.

      --

      The only certainty is entropy.
    2. Re:An idea I'm kicking around... by 2nd+Post! · · Score: 2

      There's several kind of lag to deal with:

      Server getting too many requests for resources.

      Client getting pushed too much information.
      Client getting pushed too little information.

      Planned, intentional, latency is much more workable than a classic DoS. As a workaround, for example, you introduce locality.

      IE, people get clustered around deputized local servers, so that you can bypass spanning the network.

      If I broadcast 'Hi', it only needs to go up to the server and back down, but it's only spread around the local group. That way people in the virtual geographic space don't get spammed with my packets and lag is much reduced.

      Anyway, that's just an idea.

    3. Re:An idea I'm kicking around... by Anonymous Coward · · Score: 0

      I like the idea. Furthermore --

      You can also push in the other direction. When client 1/100 says 'Hi!', rather than pushing it to the server to push it to 100 clients, the client pushes it to the client he's attached to, who pushes it out to the other 8 people, as well as to the server.

      -- you could attach clients according to player position, so that clients (players) send first to those that are in the same (game world) radius/zone, i.e. within their "time critical event horizon". So the client-client network topology would vary according to game events. And news from/about more distant (in game space), "beyond horizon", players would and could arrive later. Or sumtin'...

    4. Re:An idea I'm kicking around... by hughk · · Score: 2
      The Game that I worked on was a Stock Exchange, except it was for real. A lot of very similar problems though!!!!!

      We used a multilayered communications architecture but kicked everything back to the server systems. One server was elected as a broadcaster and it would be responsible for assembling the known facts about the world (i.e, market state) and broadcasting them through the other layers.

      The comms layers meant that the host didn't have to have a connection to every client.

      --
      See my journal, I write things there
    5. Re:An idea I'm kicking around... by mikera · · Score: 1

      That's a great idea. Since it's a strategy game I'm planning, the latency isn't too much of an issue, so while this would be a tricky thing to pull off in a FPS is could work well here.

      I think it might combine quite neatly with the idea I had of "team servers" where an alliance of players can run a single server, which then connects onwards to the master server. I *think* this avoids the problem with security, since the team would be able to co-operate anyway and the team server would just contain the combined "world view" of all the allied players.

      Think you could just nominate the team server in an ad-hoc way based on who has the best average ping times and available bandwidth - kinda like a P2P app. The only real issue is what to do when the team server goes down, but I think it should be possible to fallover to another connected client.

    6. Re:An idea I'm kicking around... by leshert · · Score: 1

      One of the main reasons to prefer a client/server architecture is for security. I've worked on commercial games based on both serverless and client/server systems. The serverless game we released was subject to a number of different kinds of cheating; as a result, we designed the second game with a strict trust design which kept all the "important" game state on the server, as you mentioned in your original post.

      There is no way to completely secure a serverless system. (I'm making an absolute, sweeping generalization in the hopes that someone can prove me wrong, but I'm not hopeful).

      Pushing a server down to the client side essentially makes it a non-secure server, vulnerable to proxying, man-in-the-middle attacks, server replacement, etc.

      If you're thinking about c/s for security reasons, you've pretty much taken away that advantage if you push a server down to the client. I'm not saying that the approach is unworkable, but just be sure that in your design this "team server" is treated as being outside the trusted sphere.

    7. Re:An idea I'm kicking around... by FastT · · Score: 2
      There's several kind of lag to deal with
      Agreed, though they all add up to the same thing: divergance of local state from the canonical state.

      For sideband information like messaging, I agree with you, it makes sense to localize. However, it is incredibly difficult to manage distributed state, especially when individual connections have varying bandwidth and latencies. Add to this that a shared game experience requires keeping the average latency for all users within a factor of 2-3x (if even that), and you have a very difficult time introducting latencies intentionally.

      I think deputization of local servers only makes sense given two capabilities. First, you must have a dynamic QoS infrastructure that can manage changes in network health and migrate state information and clients from unhealthy nodes. Second, there must be a single server that is the canonical host for a portion of the overall state at any one time--you can't have two hosts competing for the same state.

      If you add to the architecture the ability to migrate clients from one host to another as they move from area to area, your plan may work. This is similar to how Neverwinter Nights is architected, though the change from area to area is discontinuous. This scheme works well when such discontinuity is acceptable, but probably wouldn't work when trying to provide a seamless experience.

      --

      The only certainty is entropy.
  53. Re:Some advice... Client/Server by Anonymous Coward · · Score: 0

    The game engine runs on the server, not the client. The client can use whatever language to interface to the server (even Java). The only time your support issues would be relevant, would be if you were supporting licensees of your server code. You can then charge for this..

  54. Parent is OT, please mod down. by Anonymous Coward · · Score: 0

    fucking CmdrQueer-supporting anti-troll karma whores.

  55. Re:.NET will soon be the dominant GUI for Linux by GrendelT · · Score: 0
    ok - so some people are using KDE... why haven't you tried WindowMaker? Is it not "Windowsy" enuf for you? i'm not flaming here, really. I started on KDE, then went Gnome, and now i use WindowMaker. Why? Freedom.

    Why do i have to go to the bottom left corner in Windows to get to my "Start" Button, why do i have the go to the bottom left for the KDE equivalent? - same with Gnome? With Windowmaker, you put things where you want them, your "Start" menu is just a right-click away... wherever you are.
    So, for my 2 cents... try WindowMaker, you'll like it.

  56. Re:Some advice... Client/Server by MrBandersnatch · · Score: 1

    I've seen a java client for a MMORPG. It was cute in a Commodore 64 kind of way.

    There were about 800 players on line.....

  57. Some ideas... by maunleon · · Score: 3, Informative


    Stuff like "How can I make the networking code as transparent as possible so I don't have to write SendUpdate() after every assignment?" we can't answer. I mean, it's all events, and there are hundreds of ways to write this. There are countless examples. GUIs are event driven, for example.

    A long time ago I wrote a multi-user game. It wasn't anything fancy, but it did the basics of what you are trying to do. It turned out that calling SendUpdate() wasn't the problem -- that's easily done with proper design (inheritance, etc). Heck, you can encapsulate the whole message in a class and let the constructor/destructor take care of it, if you want... The main problem was scheduling time to clients, especially when one client was slower than another. For example, it would be unfair for a fast client to send 10 move messages in the same time that a slow client would send one.

    Another distinction you need to figure out is what needs to be real-time and what doesn't. For example, if the program supports inter-user messaging, you can implement "soon-enough" delivery rather than "just-in-time" delivery. It all depends what it is used for. That can be done with a MQ type setup rather than a real-time connection, and it can be sent from client directly to another client.

    I wish I could work on such a project again.. open sourced, closed source, I don't care, just not commercial. But the internet is littered with the graves of abandoned open sourced programs, which tells me a little about how much commitment people are willing to put into these things.

    1. Re:Some ideas... by maunleon · · Score: 1

      One more thing...

      Consider three-tiered architecture where security and game rules (business rules, if you will) is enforced in the middle tier.. the client providing the user interface. This has a number of advantages, including better scalability, security, and modular design. If it's an internet game, you can do creative stuff with multiple middle-tier layers distributed based on geographic location.

    2. Re:Some ideas... by mikera · · Score: 1

      My solution to the client speed problem is to do the command dispatch/server updates pretty much independantly.

      That way a client can send of as many commands as quickly as they like, without having to wait for a response. The guy with a slow connection gets a bit more lag before they see the result of their actions, but they can still work just as quickly, which is the main issue from the fairness point of view. Since it's strategy, reaction time won't be too critical I hope.....

      Know what you mean about abandonware. Mostly the result of bad design IMHO, which is why I'm spending the time up-front to get the concept right before I spring something on the world.

  58. Use Jabber! by 1010011010 · · Score: 2

    Use the Jabber protocol for client <-> server communications, or even server <-> communications. You even get chat for free, then, and you could potentially use a standard Jabber client to inspect the server's state, and send administrative commands. All communications are in XML, so it's easy to see what's going on, and there's fewer endianness problems (even if it's more chatty). You can probably use SOAP or XMLRPC via Jabber.

    --
    Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
    1. Re:Use Jabber! by mikera · · Score: 1

      Hmmmm... while I think Jabber is great I'm not too sure that XML is the right choice for data transfer. It requires a fair bit of processing at both ends, and tends to be considerably larger than an equivalent binary format. Good for config files and server management, less good for real-time communications.

      Having said that, C# has a lot of built-in XML functionality so I expect I'll use this for a lot of data files etc.

  59. WorldForge - more info by Shiny+Metal+S. · · Score: 1

    I replied to a 0 score AC post so for those who don't read replies to posts below their threshold, here's my comment . I posted more important info and quite a few good links there. Enjoy.

    --

    ~shiny
    WILL HACK FOR $$$

  60. beware floating point! by rufusdufus · · Score: 5, Informative

    I made a 3d game engine and in my cleverness, I figured I'd reduce load on the server by offloading the physics asynchronously onto the clients. I learned the hard way that THIS WONT WORK. The reason is that different floating point processors get slightly different answers in some instances. Indeed, if all processors are the same stepping of the same intel processor, you'll be fine, however for example an Athlon might in some rare circumstance be different by the very last decimal point from an Intel. The butterfly effect will eventually catch up to you and the Athlon machine will for example detect a collision where the intels didn't.
    Using emulation or fixed point is either too slow or too inaccurate, so I ended up just doing all the work on the server and doing continual sychronization.

    To be more precise, in order to smooth out 'lag' time, the clients would do their own emulation, but would resychronize all decisions on the 'heartbeat'. Using interpolation, this worked out to have great apparent lag response, even lag times of 3 seconds were smoothed out. The only problem then was when a client's lag was unstable, fluctuating a lot. I smoothed this out by emulating a 1 second lag in all circumstance, so everyone has a smoothed out lag response which isn't too bad to play. Only unstable lag of 2 seconds or more caused a problem, where that client would see his character jump around everytime synchronization kicked in.

    1. Re:beware floating point! by Anonymous Coward · · Score: 0

      The FPU differences aren't all. The nondeterminism introduced by asynchrony also causes this skew, and may well be more substantial.

  61. My Experiences by sjbrown · · Score: 3, Informative
    You said strategy game, so hopefully my findings might be handy. Most strategy games are sector-based, like Freeciv or Warcraft. I'm using a pretty good (IMHO) model for my own project, Metagame-Sector, which you might be interested in.

    Basically, I've broken it down into 5 objects: Game, Map, Sector, Player and Item. The ownership relationships are as follows: Game owns one or more Maps, and zero or more Players. Map owns one or more Sectors. Player owns zero or more Items.

    There are three subclasses of items so far: Trivial (like swords and onions), Units (like tanks and horses), and Charactors [sic] (like Mario or Frodo). There are also interfaces for the items such as Movable and Jumpable.

    Check out Metagame-Sector if this model interests you.

    1. Re:My Experiences by mikera · · Score: 1

      Cool, thanks for the info. What you suggest is actually pretty much like my current design idea, although I haven't yet tackled the multiple map issue in too much depth.

      One idea I did have was building a QuadTree of Maps, so they could be subdivided or extended pretty much arbitrarily. This solves a lot of the problems of having to worry about a fixed size of map, and means that you can transfer a localized map area just by picking the right branch or two of the quadtree.

      I'm currently thinking of building all objects from a single "Thing" base class, which will handle a fair amount of the common networking functionality, e.g. having a unique id which can be referenced identically on the client and the server.

  62. Here's the basics by Adam+Wiggins · · Score: 4, Informative
    • The game makes a connection to one (or more) other games via UDP. UDP is ideal because it doesn't guarentee that the packets will arrive in order, or even that they will arrive at all - but it does guarentee that any packet that arrives will be intact and unaltered.
    • The games need to time sync to each other, by sending "here's what time it is" messages to each other and then recording how long the trip took - much like ping.
    • Update packets are sent whenever an object changes. You can do this one of two ways. One is to explictly setting a "changed" flag on the object, and then at the end of the update loop check to see if that flag is set, and if so transmit an update packet. The second is to have a "compare" and a "copy" function for all game objects; you can create a copy of the object at the beginning of the pulse, and then compare it to the current one at the end of the pulse. If they are different, transmit the update packet.
    • Update packets must not rely on each other. They must contain all pertinent information about the object. Typically that will include its current position, its current velocity (vector of motion), animation state, hitpoints, and so forth.
    • The timestamp on received update packets should be compared to the most recently received packet for the object that it applies to. If it is older, discard it. (Remember, UDP can deliver out of order.)
    • The game uses data about the objects' motion and state to continue to animate the object moving even inbetween packets -sometimes called "dead reckoning." When an update packet is received that shows the object in a slightly different position, the object should interopolate (sometimes known as "lerping" in the industry) to its new position so that it does not appear to pop.


    The only remaining issue is what we call "who is right?" If one game claims that a ship blew up because it was hit by shot, and another game claims that the ship dodged at the last minute, who is right? If the game is client-server, the answer is easy: the server is always right. In fact, clients shouldn't even display "big" events like a ship blowing up until it has confirmation from the server that that is what really happened. (Sometimes it's a good idea to use "hint" animations - if the client expects that a ship has been hit and is going to explode, but hasn't received confirmation from the server yet, you might want to show a shower of sparks. Then, if the confirmation is received a moment later, the explosition doesn't seem to be delayed quite so much.)

    In peer-to-peer, things get much tougher. In some cases one of the peers simply declares itself a server, in which case you have the situation above. In true peer-to-peer, it's simply up to the game designers. The most obvious choice is to make each machine responisble for its own position as well as the position of the objects its has created. So the player controlling a given ship has the last say on where that ship was at any given moment.

    In some cases, you may find that certain game elements (especially if it is an action game) don't work very well when you have to deal with 100ms or more of delay on network traffic. In that case you may want to remove or change those elements. You should pick a number where represents your "maximum" allowable delay, based on whether your target audience is modem users or not.
    1. Re:Here's the basics by rufusdufus · · Score: 1

      This is a great explanation of multiplayer game design!

      I would only flag that the choice of using UDP is not necessarily correct. I read an article a long while back that surveyed various game publishers and concluded that UDP was not a win. Simplistically, the logic goes that you end up re-implementing the TCP stack logic in your game, only generally with lots of bugs. Also, in some instances TCP will pass through a firewall where UDP will not.

      In my view, the bottom line is that LAG is real, and UDP won't get rid of it. Your game needs to be tolerant of LAG in the thousands of milliseconds anyway, so the benefit of using UDP is limited in real significance, the but complexity of 'getting it right' will add many many hours of development time to your game and may be the straw that breaks the camels back.

    2. Re:Here's the basics by Anonymous Coward · · Score: 0

      Your game needs to be tolerant of LAG in the thousands of milliseconds anyway

      You've never played Quake online, have you?

    3. Re:Here's the basics by rufusdufus · · Score: 1

      Im not sure I understand your point. Are you saying that Quake isnt tolerant of slow ping? Or that it is? I don't think of quake as a massively multiplayer game anyway, those would be ones like EverQuest and Asheron's Call.

    4. Re:Here's the basics by Anonymous Coward · · Score: 0
      Sorry but there are certain things that TCP should just not be used for in games. Most modern games use a combination of TCP and UDP. You can read my other post for a rehash.

      In a nutshell: anything which becomes irrelvant in a short period of time (e.g. client position updates) should not be sent via TCP. Reason: on a shitty connection with packet loss, the resends are not wanted.

      - SEAL

  63. Designing Multiplayer Game Engines by Anonymous Coward · · Score: 0

    Wired did a story on Designing Multiplayer Game Engines back in June.

  64. Idi Amin, former dictator, dead at 77 by Anonymous Coward · · Score: 0

    I just heard some sad news on talk radio - Genocidal and cannibalistic former dictator Idi Amin was found dead in his Saudi Arabian home this morning. There weren't any more details. I'm sure everyone in the Slashdot community will miss him - even if you didn't enjoy his work, there's no denying his contributions to tyranny and despotism. Truly a Ugandan icon.

  65. RE: Microsoft- Idiots Ahoy! by Anonymous Coward · · Score: 0

    You obviously are paid by Microslop Craporation
    for spreading false information about GNU/
    Linux.

    Please return to your sugar daddy.

  66. Re:.NET will soon be the dominant GUI for Linux by Anonymous Coward · · Score: 0

    Oh shut up and stop bashing Windows. Most people use it because we don't want to have to bother with all the extrenuous complexities of Linux, we just want to use our computers. Furthermore, making games cross-platform is hardly an issue with 90% of PC users running some version of Windows.

    I'm not bashing Linux here. I just think it has it's place. Linux is not a desktop OS, and I doubt it ever will be fully accepted as one. On the other hand, you can't beat it when it comes to servers and routers as I can personally attest (I'm building my own Linux box for routing duties.)

  67. Multicast the game data by Anonymous Coward · · Score: 0
    Yes, I see your point. You need a multicasting solution that works over non-multicast networks (a search brings up a company called Venation in the UK) that will do multicast in a decent manner to reduce the bandwidth of those messages which are repeated often.

    Of course, you would need to install a nationwide/worldwide network of these multicasting servers, which would be costly. But really reduce the bandwidth of sending "Verati has been killed by a Golem" to 10384 people simultaneously. However, at that level, you don't want to swamp your clients with those messages, so you would try and make things local - the player can only interact with things within a certain radius of their being (i.e., divide the game area into cells like a mobile GSM network, then only communicate with your cell and adjoining cells)...

  68. What course of action would a writer take? by dTaylorSingletary · · Score: 1

    I am a writer who constructs abstract representations of unfamiliar realities, worlds that I desire to contain into a multiplayer role playing game. Unfort, I am not a programmer. I am a world creator, from words and mind and want to be part of creating something that is unlike anything previous to it. Something that has an effect on the human mind in almost questionable ways. Also, as a music composer I am wondering how to go about trying to sell my compositional services to a game company?

    --
    d. Taylor Singletary,
    reality technician techra.el
  69. Unreal networking architecture by LloydB · · Score: 2, Informative

    You might like to investigate Unreal's network architecture for ideas.

    1. Re:Unreal networking architecture by mikera · · Score: 1

      Yep, I've had a good read of this a couple of times - very impressive architecture.

      Since I'm focussing on strategy rather than action, some of it isn't applicable, e.g. the client side simulation etc. isn't really needed. Which is lucky, because I don't think I could code something to match the Unreal Network engine in a hurry :-)

      One thing I would *really* like to duplicate is the way that networking happens "behind the scenes" in UnrealScript. Ideally you should be able to code the bulk of your game logic without worrying too much about the networking platform underneath.

      Not sure how easy this is to do in a langauage like C#. Ideally you would have objects which, when modified, would know to propagate their changes correctly. But this would appear to require writing networking code in *every* function that manipulates object state, which is hardly transparent.

      Maybe you actually need the extra level of abstraction that scripting gives you in order to make this work.... unless anyone has a better idea?

  70. One failure ingredient: experimental new language. by Kaz+Kylheku · · Score: 2

    If you want a successful project, choose solid, mature implementations of equally mature programming languges.

    You could succeed anyway, but then you could be a successful pianist with three missing fingers too. That doesn't mean you want to deliberately chop off three fingers. :)

  71. River City Ransom Online? by Gizzmonic · · Score: 1

    I hope this is the long awaited MMORPG version of River City Ransom. If so, may I offer you my services as producer?

    --
    (-1, Raw and Uncut is the only way to read)
  72. C# by Anonymous Coward · · Score: 0

    Do you a favor, use ansi C!

    1. Re:C# by mikera · · Score: 1

      Nope. I decided to pick up another language for my repertiore, and C# is actually quite fun to program.

      Of course, I still had a certain amount of morbid curiousity to see what wouold happen if I mentioned it on Slashdot..... :-)

    2. Re:C# by mikera · · Score: 2

      Problem with all non-gc langauages is that they *really* suck at serialization/persistence because you basically have to roll your own code for every type of object you deal with. C can't traverse an object graph automatically because it has no idea where you have put your pointers.

      Which is a right PITA for a network game..... not that it's impossible, but it's highly bug prone and very time consuming to update as you build your engine. And isn't laziness one of the three virtues of a great programmer?

      C has it's good points, network programming unfortunately isn't one of them.

  73. Re:+1 Wholey Sh$t : by Anonymous Coward · · Score: 3, Insightful

    Yeah, I have to agree about not using C#. You're *much* better off learning a new language on a small project for two reasons. First, the language can affect your design decisions -- a neat feature in one language might make it much "neater" to do things an a particular way. Second, it kind of sucks to be the one trying to forge the way for C# on something as performance-intensive as this. If you find out that C# has only one transparent client-server framework out, and it doesn't fit your demands (latency can jump too high or doesn't synchronize elements of your data), you're going to have to start over and write the whole thing over.

    C/C++ currently have (besides the performance benefit) a far, far larger library set than C#. Heck, *Java* has a big networking library set.

    Let other people live on the bleeding edge and do the bleeding. C# is proven to be solid for little pet projects -- I wouldn't currently try it for big stuff yet.

  74. Use Ada 95. by Black+Parrot · · Score: 3, Funny


    I know that suggesting a different programming language usually gets the same kind of reception that suggesting swapping underwear would, but why not consider writing it in Ada 95?

    The learning slope will be very steep at first, but once you get the hang of it it will pay off in spades. Ada is a software engineering language, and it makes you do a good bit more thinking before you start spilling code, but over the long haul you end up spending most of your time in the think-program cycle rather than in the more popular but IMO less satisfying program-debug cycle.

    Pros:

    • Ada is designed for large software projects.
    • Bullet-proof against buffer overflows and such.
    • Supported by GVD (the visual version of gdb).
    • Very strong portability properties.
    • Supports both high-level and low-level programming. (OO, generics, etc. all the way down to in-line machine code. But all are optional; you can write simple code when that's what the problem calls for.)
    • Built-in support for multitasking and distributed computing, if you want it. (And distributed might be the way to go for a big-game server.)
    • If you need a GUI there are thick bindings for GTK+, portable between UNIX and Windows. These bindings are OO, so you can create custom widgets by inheritance.
    • Everything mentioned above is available for free.
    Cons:
    • The aforementioned learning curve.
    • Probably fewer volunteers on the project once it gets big.
    --
    Sheesh, evil *and* a jerk. -- Jade
    1. Re:Use Ada 95. by Anonymous Coward · · Score: 0

      hahahah! someone stop me! I'm going to keep laughing until I die!

    2. Re:Use Ada 95. by Achilleas · · Score: 0

      Why is this moderated as funny ? this is the best comment on this subject so far.

    3. Re:Use Ada 95. by thona · · Score: 1

      Nice points.

      Sadly they dont exactly make ADA95 a good language to LEARN C# as was the original intention.

  75. Designing Multiplayer Game Engines? by Anonymous Coward · · Score: 0

    Product Placement in Video Games? Designing Multiplayer Game Engines?

    looks like someone's gonna write up a game proposal...

  76. languages and (unrelated) client security by dilvish_the_damned · · Score: 1

    If you want your server to scale then you should probably consider plain old C. Maybe C++ if you if you are bent that way. I would suggest (flamebait, I know) that no other language will give you the goods that you may find yourself needing. Build it on a BSD/Linux PC but then suddenly find this baby needs to run on an Ultrasparc, and C will be your friend. Build it in C# and try to get a bunch of little machines to do the work of one good one i.e. you could be screwed.
    One offtopic word of warning. Do not allow the clients to send data to each other. Ever. Dont take that shortcut. Otherwise the cheaters will ruin whatever you build.

    --
    I think you underestimate just how much I just dont care.
    1. Re:languages and (unrelated) client security by Prisoner+Of+Gravity · · Score: 1

      This is terrible advice. C might be fast, but you'll never finish it unless you have a couple of decades to spare! Stick to C# (or even Java) for the server.

      In any case, the odds are against you. Sorry.

  77. Re:.NET will soon be the dominant GUI for Linux by peripatetic_bum · · Score: 1

    you know you bring up some interesting points about developing games for windows.

    My question becomes would you continue to pay for upgrades to play your games, when the time comes?

    Thank!

    --

    Sigs are dangerous coy things

  78. Sounds a lot like our project... by freeBill · · Score: 4, Interesting

    ...except you can substitute Ruby for C#.

    Our Documentation Index page gives a basic list of the areas we have documented. The General Philosophy describes our philosophical outlook, while Core Concepts describe the main ideas which are needed to understand coding FaerieMUD. Our engine is based on the same Design Patterns you're describing. It is open source and is basically finished and tested.

    The game engine is known as "The MUES Engine" (pronounced "muse") for Multi-User Environment Server because it allows many users to simultaneously interact with one or more environments each being served by one or more servers. When MUES is being used for serving MMORPGs or MUDs, the environments are usually called "worlds" but MUES does not make any assumptions about their nature. They can be chat rooms or workgroups for collaboration or whatever.

    The MUES code is pretty well documented, so you may even be able to use it as pseudocode. (For that matter, it may be possible to use it in Ruby since it doesn't make assumptions about how the objects which are served to it are created.)

    Good luck, and let us know if any of your ideas look like they'd help us.

    All of which should not be taken as disagreeing about any of the other advice to look at WorldForge or MUDdev lists or whatever.

    --
    Eternal vigilance only works if you look in every direction.
  79. This is a lot harder than you think. by glyph · · Score: 5, Insightful

    If you're really trying to develop a massively multiplayer game, make sure that you're ready for a collossal failure.

    I can already see the debate about C# heating up over this -- but that's tangential to the real problem. It's not that C# will doom your project, it's that you wouldn't choose C# if you knew what you were doing (and your project weren't already doomed).

    First, my personal suggestion (and I say this as a developer with 2 years commercial MMP development experience at this point): EITHER you want to write an infrastructure, OR you want to write a game. Writing both by yourself will take you the better part of 10 years. Having another programmer around who is doing the other part is handy -- but making sure that they are separate tasks is important. I recommend ditching C# to use Python, and my personal infrastructure project, the Twisted network framework (http://twistedmatrix.com), but if you're not going to use that, then find another high-level language with good asynchronous networking support and the ability to load code at runtime. Other good possibilities are Common Lisp and Scheme.

    If you don't have any experience in the area, and this is for an Open Source project, join an existing project and learn some things from there. I can also highly recommend getting involved with a failed project in the game industry to see how difficult the whole thing really is :-)

    Be prepared to fail at least once. The number of failure points in an MMP project is astronomical: client code, server code, internet latency, even the community itself is a potential "bug". If your technology is great and your game is fun, but it attracts really mean-spirited people for some reason, you might see your servers empty out over the course of a few months, or never even get to a real "massively" multiplayer state.

    --
    Glyph Lefkowitz - Project leader, Twisted Matrix Labs
    Writer, Programmer - Not a member of the TSU
    1. Re:This is a lot harder than you think. by rufusdufus · · Score: 1

      I would add to this that the game engine itself is actually the easy part. Game content as in game logic, artwork, music etc for a game that is saleable quality is a huge amount of work, an order of maginitude bigger than the game engine.

    2. Re:This is a lot harder than you think. by greygent · · Score: 1

      Sure, mod me as a troll.

      Sorry, but your suggestion sounds really retarded. Ditch C# for Python?

      That ought to be a big speed boost, and open the game to the many Windows users who would probably be using this (seeing as the author wants to do it in C#).

      I suppose the author was foolish to begin with. Who in their right mind would ask a question about using Microsoft technology on Slashdot?

    3. Re:This is a lot harder than you think. by Anonymous Coward · · Score: 0

      So you're recommending he drops c# and uses python, lisp or scheme ? You really don't know anything about c# do you?

    4. Re:This is a lot harder than you think. by ainsoph · · Score: 2

      http://www.eve-online.com/

      python.

      A good majority of python coders are win32 platform based.

      so what are you saying?

    5. Re:This is a lot harder than you think. by glyph · · Score: 1

      What you say is true, but potentially misleading: one thing that you have to consider is that a good game engine will reduce, by a fairly significant factor, the amount of effort required to produce the content for the game. The logic for the game is a grey area, where certain bits of it are "engine" and others are not, but the logic is traditionally easy to develop but hard to decide on. Extreme Programming (http://xprogramming.com) can help here, because getting a working prototype early on will allow game designers to manipulate the design concretely in the short term, reducing the amount of overhead it requires to fix bad decisions -- and you WILL make bad decisions.

      A good engine can only help so much, but a bad game engine can add an arbitrarily large amount of overhead to your art production pipeline and game logic code development.

      --
      Glyph Lefkowitz - Project leader, Twisted Matrix Labs
      Writer, Programmer - Not a member of the TSU
    6. Re:This is a lot harder than you think. by Anonymous Coward · · Score: 0

      You should face up to the fact that C# is already more popular than Lisp and Scheme combined, and it hasn't even been released yet. Your advocacy is futile.

      The record is clear on one thing: no programming language has ever come back from the grave. Efforts to resuscitate Common Lisp are one step away from spiritualists wishing to communicate with the dead. As the situation grows more desperate for the adherents of this doomed language, the sorrow takes hold. An unremitting gloom hangs like a death shround over a once hopeful Common Lisp community. The hope is gone; a mournful nostalgia has settled in. Now is the end time for Common Lisp. Common Lisp is Dead.

    7. Re:This is a lot harder than you think. by thona · · Score: 1

      Can you proove taht the eve-online CLIENT was written in Python? Sounds just way too ridiculous.

    8. Re:This is a lot harder than you think. by greygent · · Score: 1

      I'm saying most win32 users don't want/care to install Python on their machines. I thought that was obvious.

  80. Consider 3rd party middleware by leov211 · · Score: 2, Interesting

    While I'm not sure what kind of strategy game you're doing, but if you're planning to make it scale well it's going to be a lot of HARD work. There're a lot of issues to tackle - server load balancing, bandwidth mixing and dead reckoning. If you're considering what features to build, look at the API provided by RTime www.rtimeinc.com. I find their model pretty comprehensive.

  81. Use Design Patterns by Oink.NET · · Score: 1
    Don't reinvent the wheel. As your intuition correctly tells you, this has been done before. Instead, use the hard-gained knowledge of others to guide you in your design decisions. No, someone hasn't already built exactly what you want to build, C# or not. But they've solved many of the major design issues the hard way.

    These "meta-designs" are called design patterns, and many useful design patterns are documented in the definitive Design Patterns book. I would encourage you to browse the sample pages at Amazon.com, which will list summaries of the main design patterns. I'm sure you will find a pattern there that is very close to what you want to do. Buy (or check out) the book, study it, and make sure your design closely matches the design pattern. By used a tried-and-tested real-world design pattern, you will avoid many subtle and hard-to-fix design flaws.

  82. Re:.NET will soon be the dominant GUI for Linux by CrabCakeJimmy2k · · Score: 0
    With XP, this model is trying to be changed, so not only do you have to keep paying to use XP, but you can think of it as an additional cost to playing your games.

    How exactly am I going to have to keep paying to use XP? I may have to pay to play certain online games on XP, but the same would be true if I were playing those games on 98, ME or even linux (if the programmers ported that way.

  83. Re:Mod this up to +1 or +2 by Anonymous Coward · · Score: 0

    That was slightly amusing.

  84. Re:.NET will soon be the dominant GUI for Linux by peripatetic_bum · · Score: 1

    hmm, you're right, I didnt make it clear.

    What is clear that MS does intend to make the os XP a subscription service, and what I was trying to point out is that right now, that is not the model that game players deal with. They dont continue to pay sony to play their old playstation console. Here, in time, you would have to pay to continue to use XP to allow you continue to play your games.

    i hope this is clearer

    --

    Sigs are dangerous coy things

  85. Re:.NET will soon be the dominant GUI for Linux by Anonymous Coward · · Score: 0

    I don't pay for upgrades ;-)

    Besides, Windows service packs are released for free, and you can run most games on Win98, or even Win95, that you can on WinXP. So no need to upgrade just to play. We upgrade for more features, not to run new games.

  86. Re:.NET will soon be the dominant GUI for Linux by Anonymous Coward · · Score: 0

    God damn, it's people like you that make me embarassed to be a Window Maker user.

  87. .NET is designed for design patterns by Oink.NET · · Score: 1
    1. Re:.NET is designed for design patterns by Lord+Hugh+Toppingham · · Score: 0

      Interesting to see Microsoft doing something right for a change. However I suspect that this is simply so they can use 'design patterns' in their marketing literature. I doubt that anyone well-versed in design patterns could have come up with something so fundamentally stupid as the 'Registry'.

    2. Re:.NET is designed for design patterns by Anonymous Coward · · Score: 0

      Don't be an idiot. The original copyright on Design Patterns by the gang of four is 1995. Which means the idea was brand freaking new in 1995. Wanna guess when the registry was created in Windows?

  88. Re:Try AOP. Sort of like... by freeBill · · Score: 2

    ...this?

    --
    Eternal vigilance only works if you look in every direction.
  89. Re:.NET will soon be the dominant GUI for Linux by peripatetic_bum · · Score: 3, Interesting

    Normally I dont responf to AC's but the fallacy in his thinking needs to be pointed out

    Windows service packs are released for free
    So no need to upgrade just to play

    1. Ms has made it quite clear that they wanted people to pay for XP as a subscription model.

    2. There is no early reason why they would make the claim that the "value" you get for your subscription money is an up-to-date system which includes bug! The point is that they dont feel that they should continue to their software for free.

    3. That means, that You will no longer get service packs for free as these can be viewed as Service Pack upgrade or even a NEW VERSION, the point being that you will need to pay

    4. The other point, that MS has back off from, for the time being, is that they want software to be time-limited, which is to say that if you dont pay a subscription fee, then you no longer have the right to use the software, ie, in another words MS has clearly stated they want to change the way people view software from being views as a buy once commidity to something like Cable Tv in which you pay every month, and if you dont pay, you dont Watch, ie you cant play your games on their OS.

    Sorry for being so long

    --

    Sigs are dangerous coy things

  90. My two cents by Bob+Smith+157 · · Score: 0, Redundant

    I'll avoid most of my comments about your choice of language because most of it is of a political nature, rather than practical one; however, I really wouldn't suggest trying to make a massively multiplayer game with a language you're unfamiliar with. It's quite an undertaking even with a language you know. I know; i'm working on one.

    As for the networking code transparency, this one seems fairly obvious to me.. Just keep a datastructure containing all the changed or "tainted" objects as you go. Make mutator functions of your classes set objects as tainted. Then, just do the networking updates once or twice every time through the main loop (assuming it's in the same thread. Otherwise, you can implement something that might end up being a little more efficient).

    As for updating only what the player needs to be updated on, this seems like a question of algorithm efficiency. I don't know the specifics of your game, but with most massively multiplater games, transmitting the entire world state, or even the entire list of changes to every client, every cycle would be insane. So, you have to only update the section of the world that the player can see. How to do this well depends on the internal structure of the world, and what sort of stuff the player can "see". If the game is room-based, then this is easy. If the player can always just see a specific size circle or rectangle around him, this is also easy (each event can check distance to all players in its regeon). If it works like most RTS with arbitrary viewing areas, then you might have to be a little more clever. Whether this is even much of a concern is really a question of the number of people supported, and the expected hardware this'll be running on.

    Hope that helps,
    Bob

    --


    "It's funny. On the outside, I was an honest man. Straight as an arrow. I had to come to prison to be a crook."
    1. Re:My two cents by Peaker · · Score: 1

      Haha, nice ripoff of that +5 comment!

      Should this get a funny moderation? :)

  91. Take a look at Terrarium by quintessent · · Score: 2

    From the intro page:

    Terrarium is a multiplayer ecosystem game developed using the .NET Framework.

    It will probably give you some ideas on how to implement this kind of thing.

  92. Nevrax - alternative to WorldForge by Ploulack · · Score: 1

    www.nevrax.org

    News not updated but the CVS and docs are updated daily.

    20 paid professionals work on this thing.
    Architecture is CORBA inspired.

    and cherry on the pie: RMS is at the board of the company ! :)

  93. Re:.NET will soon be the dominant GUI for Linux by sheldon · · Score: 3, Informative

    "The fact is that up to now, hardware, the OS software and, for the most part, games have been a pay-once/play forever deal. "

    Obviously you haven't been paying attention over the past several years.

    Ultima Online
    Everquest
    Asheron's Call

    Many many numerous others, I know I paid $10/month for a bit to play Allegiance. Going back in history we have examples at Compuserve and so forth.

    Ongoing charges has been a factor of life for multiplayer gaming since almost it's beginning some 20 years ago.

    Take your FUD elsewhere, troll. If people find enjoyment with the game and the value of paying per month exists they will do so. Otherwise the game will fail.

    In the case of the XBox what I see as viable is for them to have a one time charge to access a large farm of hosted servers that grants access to many different multiplayer games. As things stand right now each different game asks for a seperate $10/month fee. Most people I know do not get addicted to just one game, they may play several, or go months at a time without ever touching one particular game.

  94. network architecture by Pinky · · Score: 1

    the way I'd try and do it is to start from the idea of a remote screen and work form there... That is, use the client as a sort of viewer of events happening in the "real world" on the main server.

    Show users what you can manage to show and have your client try an interpolate form the data that can be sent. As the user moves around the world, the view might require more timely information about certain areas of the "real world" so it would signal that the events it's interrested int should recieve more updates.

  95. Check out JavaSpaces by Anonymous Coward · · Score: 0
    JavaSpaces may solve a lot of your problems. It's way more mature than .NOT and addresses problems in distributed computing that M$ won't come across for a number of years. There is also a commercial implementation : GigaSpaces that you may also want to look at.

    If you use C# - seems like a gutsy move given the language and environments lack of maturity - I'd imagine that these would be critical factors for a networked game.

  96. state threads by thing12 · · Score: 1

    It could be done using State Threads. It's a library originally created by SGI based on code used in Mozilla. Basically it gives you the illusion of multithreaded programming wrapped around non-blocking I/O calls. For internet servers it's a perfect programming paradigm - as long as they don't have to do any blocking I/O (disk reads are a good example) or library calls that could wait for a long time. The best part about it is since the 'threads' never really run concurrently you don't have to do any locking of variables... everything is in the same memory space and it can all be shared between threads with no synchronization.

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

  98. No. by Anonymous Coward · · Score: 0

    Rule #1. Do NOT do it in a language you're just 'learning'. The resultant game will be.. crap. I speak not to insult your ability as a programmer, I speak from experience, both my own and that of hundreds of M*'s that have come and gone. Writing a game to 'learn' a new language is *not* a good idea - at least, for the game.

    Rule #2. Talk to M* admins - modern games like EQ and UO have their roots in M*'s. And M* admins are easier to get in contact with. Mind you, watch who you're talking with - some young kid (No offense to young kids, of course) who's just embarking on his or her coding career isn't going to be much help. Someone who's code reflects fathomless brutality will be.

    Rule #3. Design, design, design. Assuming your game will be continually improving/long lasting/etc, you should realize now that 99% of your time will be spent in the design stage. Do not overlook this! (Nor for any other coding task!) Plan out what everything should do, and how it should be done first, *then* code.

    Rule #4. Think if you really want this to be massively multiplayer.. MM games tend to eat tremendous resources, and unless you've got a large chunk of change sitting around, you'll eventually need some sort of commercial support. If that's fine, I suggest taking the route others have suggested - lock yourself in a room and don't come out til it's done. Technology is constantly changing, and if you want people tossing you money, you're going to have to make the game dance through the latest and greatest 3d hoops.

    1. Re:No. by mikera · · Score: 1

      Thanks for the advice :-) I still reckon I'm OK to hit out with C# because it's basically a tweaked clone of Java, and my skills transfer pretty well. The main trouble I have is looking up the different names for the same functions in the Java libraries... and remembering that C# capitalizes method names etc.

      Masively Multiplayer is an ambition, but I'm not sure whether I'll get there on the first iteration. I'll probably focus on getting the single player/team games/"deathmatch" games working well and then look at how well things could scale up.

      I think there are three real challenges to going MM.

      The first is that I would have to switch to the more complex but better scaling data structures, e.g. OctTrees and QuadTrees rather than Arrays. This would be neccessary to make sure that you can partition the server effectively and focus on localised changes.

      The second is the persistence element, which is clearly a bigger issue when you have many players and a long-running game. I'm trying to design a "transaction log" into the game engine so that the server can automatically regenerate from the last known position, but this might not be enough if you have a horde of fans hammering your servers (I wish...:-)

      The third, and certainly the hardest, is finding how to build your game design around the additional challenges that MM brings. That's the real test I guess - Is the concept right, and does the gameplay have what it takes to keep people coming back in a MM context?

  99. If he WANTS the bleeding edge, of course... by leonbrooks · · Score: 2

    ...he might as well learn a language that's actually useful, rather than C# (pronounced ``see-crash''). Ruby is not only extremely useful, but you also don't spend too much time counting spaces to make sure your code blocks are where you think they are... (-:

    Oh, and you can run it in a JVM (did I mention portability?) and spit it out as C if you like.

    --
    Got time? Spend some of it coding or testing
  100. Re:.NET will soon be the dominant GUI for Linux by Sparr0 · · Score: 1

    If Debian users are any indication then there isnt a majority for DE/WM choice. However, Gnome+Enlightenment has the plurality, so "most" people use Gnome+E.

    statistical data taken from the Debian Popularity Contest

  101. 2 ways: push or pull by Anonymous Coward · · Score: 0

    you can use 2 ways:
    - push. the server push/broadcast the state to the client. which depend on the algorithm you use, you can broadcast everything, or just only the changed state
    - pull. the client request to the server the world state it needed

    my suggestion is just start with UML diagram or any diagram you like. Then identify from there what you want to do, either inherit, mutator, etc

    1. Re:2 ways: push or pull by mikera · · Score: 1

      Good distinction to make.

      I think it has to be push in this case - major/relevant events could be occuring at pretty much any time and when they do you would want to broadcast it to the client as soon as possible.

      Pull could work, but I suspect it would just eat a *lot* of bandwidth polling the server all the time for events, and I don't see what it would buy you - you still have to transmit the event anyway. Guess it could be *slightly* simpler to code.

  102. UnrealScript by Anonymous Coward · · Score: 0

    Epic's UnrealScript network docs can give you a few ideas.

    1. On UT (their game), if you are playing on a corner or a map and there is a wall(s) such that you are not be able to see or listen to agents beyond, information for them does not get sent over the wire. They call it the "relevant set".
    2. They define 3 kinds of clients.
    2.1. Simulated clients. The behavior is mathematically/calculable in such a way that every client can determine the behavior of an object without depending on the server to notify them of it. For example, a rocket that flies on a line, or a grenade thrown with a known initial speed/angle/etc.
    2.2. Predicted clients. This is for things like the player and missiles whose direction you can control while they travel. They are given high priority because no matter the prediction, they need CORRECTION.
    2.3. Dumb clients. A box perhaps? You replicate information on them when they are pickup up (no longer on the map) and when they are dropped. These are of the lowest priority.

    One of the things you'll inevitably have to consider is that not all clients will see the same scene to latencies, variations in prediction and so on, so you have to make it believable that they are the same even when they are really not. For example, a missile might look for client A a few pixels to the left than it appears for client B but if it hits a tree, it hits a tree for both of them.

  103. Re:Why the hell? by TommyBear · · Score: 1

    Not it's not... It's slow for GUI but is comparable to C in server applications.

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

  105. Java Thoughts by n1k0 · · Score: 1

    I've recently started progamming in Java. The experience has been a very good one so far; the core libraries are complete and mature, and there are many, many third party libraries and utilities available, placing Java among the most well-engineered and supported development platforms I've ever used.

    As far as Mike's multiplayer game goes, Java's Bean architecture, combined with RMI (or maybe CORBA), sounds perfect for the event propogation needed to sync clients with a server. Although I've never tried using Beans with either, I'm pretty sure RMI would work fine, though I'm not too sure about CORBA.

    Java run-time performance is the only question. It would be a cinch to develop the app in a language like Java, but it might not be much fun for the people playing it unless you used JIT compilation or pre-compiled the byte code to native code. Either of these could cause problems using RMI (object serialization breaks with byte-code native code translations), however, and as far as I know, there aren't any free x86 JIT compilers that support AWT and SWING, though I found one commercial Win32 JITter that offers a free personal edition. See this article, recently linked from Slashdot, at IBM Developer Works:

    http://www-106.ibm.com/developerworks/java/libra ry /j-native.html?loc=j

    Maybe you could write critical sections of code in a language that produce native code, then wrap that code in Java using 'native' calls.

    ...or search google, there are LOTS of commercial solutions.

    Your choice to use C# may solve some of the problems described above if you don't care about cross-platform compatability (and even then, Mono aims to solve that problem completely). There's also cross-language integration, which can make management code easier to write (Python, Perl, and VB are certainly easier to use than Managed C++). The platform also provides JIT and native compilation for all supported languages. Personally, I've avoided .NET for a few reasons, the most important being maturity of the platform compared to Java; there are also the standard political reasons.

    Interestingly, .NET is becoming more alluring in that Mono is building a free CLR, while we're still waiting for a complete and free implementation of the seven-year-old, and in my own opinion, superior Java platform. Kaffe seems to be coming along nicely. Anyone know of any other solutions, besides writing one myself?

    niko

    1. Re:Java Thoughts by thona · · Score: 1

      Forget RMI/CORBA/DCOM etc. - this is not done for this scenario. MS even has it's own framework (DirectPlay) for handling network code in games. THe main problem is you DO NOT NEVER EVER want to use TCP :-) It can get sruck, which is a pain in the ass for anything time conservative. No way. You ahve to use something that is UDP based, and your own layer on top of this. Regards

    2. Re:Java Thoughts by mikera · · Score: 1

      How badly can TCP get stuck? Enough to take a client out of the game?

      Just curious, I was thinking it made sense for the kind of updates that absolutely have to get there. The other option would be to keep broadcasting on UDP until you get an confirmation/acknowledgement, but wouldn't that just be re-inventing the TCP wheel?

    3. Re:Java Thoughts by thona · · Score: 1

      TCP can get stuck for around 1.5 minutes under "regular bad" network conditions, and pretty indefinitly under VERY Bad ones (which is more academic). now, lets see. What about a RTS where one party gets stuck for 1.5 minutes? Ups, thats it. It is still strategy. It all depends on how "time sensitive" this is. And this, btw, is ONE packet getting loist (60 seconds waiting for the packet to arrive, then recovering it). Now, for UDP - maybe you do not need a confirmation for most data? Like position data - if the next position arrives, you dont need to get the last one confirmed :-)

  106. Strike 3 by RelliK · · Score: 3

    3. You are planning to use an unproven language purely for its hype.

    So to sum up, you have no clue what you are doing (the very fact that you asked it on slashdot, of all things, is an evidence of that); you don't know the language you want to use; and, instead of evaluating your options, you decided to ride the hype, perhaps to make your CV buzzword-compliant. Therefore, this project is doomed before it is even started.

    Oh, and just to throw in some more buzzwords, I suggest you make it a Web service using the .NET framework combined with an innovative XML protocol for the information superhighway! Wow! That will impress every PHP on Earth.

    --
    ___
    If you think big enough, you'll never have to do it.
    1. Re:Strike 3 by mikera · · Score: 1

      Actually, asking on Slashdot is something to do from the point of view of getting some interesting opinions, not because it's my only (or even first..) port of call.

      I certainly didn't need to "Ask Slashdot" in the sense that I have already read a lot of material, written some experimental code and am pretty confident in my ability to get this to work. But occasionally in a big debate some really novel ideas just pop out of the blue, and that was my primary motivation for sending in this story.

      Plus, some people might just enjoy talking about an issue which is, after all, supposed to be fun......

      Any why not make it a web service ;-) ? Sounds like the right tool for certain kinds of jobs, e.g. publishing server metadata.

  107. Cheating - some older Slashot articles by B.D.Mills · · Score: 3

    Here are some Slashdot articles that have been posted about cheating in online games. You may want to give them a quick read if you're developing an online game.

    Combating cheating in online games (16 November 2000)

    Multiplayer Game Cheating (16 July 2000)

    --

    The only thing necessary for the triumph of evil is for good men to do nothing. - Edmund Burke
    1. Re:Cheating - some older Slashot articles by fnurb · · Score: 1

      Cheating is primarily a problem of game design and social architecture, not network code.

      Trying to make a game mechanic around building individual stats by killing and then robbing the corpses, and then putting all the effort in trying to make the code secure, is like parachuting the naked film crew of a porn film onto the Ka'aba in Saudia Arabia and then trying to secure the set.

      As long as you design for hostile, antisocial antagonistic behavior, which rewards individual achievement and penalizes collaborative behavior, don't be surprised if people play the meta-game (of breaking your game) the same way you want them to play the game.

      Why make a multiplayer if you design for a bunch of stat-based single-player games running in parallel?

      --


      Flout 'em and scout 'em,
      and scout 'em and flout 'em;
      Thought is free. - Shakespeare [The Tempest]
  108. be efficent by mstrjon32 · · Score: 1

    rather than communicate all world changes to all the clients, only communicate changes to the clients that are within their "scope" of the game. this will keep network usage down, and system load on both the clients and the server down.

    Naturally, this model might not work depending on the type of game you are designing, but generally for MMORPG's, you should be good.

  109. Try to get a team for god's sake by CrazyJim0 · · Score: 1

    www.ebayrp.bizland.com

    Without a team, you're setting youself up to be too slow for the corporations...

    I wanted to make MMORPGS back in 89-92 when I was like 13... Wasted my early teen years in that shit. I'm a god programmer now, but I hate life.
    I hate that corporations can steal market shares so easy. If I had a team, it would have been sweet.

    Whats funny is that I'm back at it again... I seriously contemplate suicide on a daily basis, and sometimes throw myself into situations that may kill myself... Try russian roullette but use your car and speeding to see if you attract a police officer.

    MMORPGS have already been done though... Why not try true artificial intelligence?

    www.contrib.andrew.cmu.edu/~sager

  110. C# by trenton · · Score: 2

    Did you decide this just to generate a deluge of flames?

    --
    Too big to fail? Does that make me to small to succeed?
  111. Don't discount 'Play By Email' systems. by FrenZon · · Score: 1

    Don't discount the ease of use of 'Play By Email' systems - you won't have to worry about the finer points of network programming, you won't have to worry about players behind bizarre firewalls.

    Of course, this is only ideal for turn-based games. An example of such a game is the the brilliant Laser Squad Nemesis, from the XCOM developers (this was officially released a few days ago.)

  112. Re:.NET will soon be the dominant GUI for Linux by Anonymous Coward · · Score: 0

    It's people like him that make me embarassed to be human.

  113. Re:Loser? by slakdrgn · · Score: 1
    To be honest, in my opinion, any "experianced" progammer, would atleast try various programming languages.. Ie.. C#.. you never know, he may actually accomplish a lot more then you realize..

    I beleive someone with a closed mind, would say something you just said. After all, some pretty interesting things have been made with COBOL, and you know everyone hates COBOL :)

  114. Re:Loser? by slakdrgn · · Score: 1

    now an experianced speller, I am not..
    expecially after a few drinks! :)

  115. My 2 cents by lkaos · · Score: 2

    1) Slow down a bit, and give this project the respect that it truely deserves.

    2) Don't use C# for everything*

    3) Break the project down into parts that are actually accomplishable (i.e. network layer, world engine, actual game). Choose one of these layers and actually get it to work.

    4) Read lots of books because it's gonna take a lot more than a couple of comments from /. to show you all that you need to do.

    I don't really know of a great networking book, but you would really need to brush up on newtonian physics. There is an aweful lot of physics involved and 3d hardware will for the most part, not calculate this for you.

    5) Pay your dues on some open source gaming engines. Get your feet wet before diving head first.

    * C# is bad only because your gonna need big time speed for the 3d engine. The server is likely to require a bit of speed in handling client requests efficently too.

    For these areas, I would recommend C, or C++ if you know C++ _really_ well. C++ can be just as efficent as C but you have to know _exactly_ how C++ works and you must know the spec inside and out.

    C# is really fine for the frills of the engine, but any VM based language would not do well for the heart of the engine.

    Key is to use languages where they are appropriate.

    --
    int func(int a);
    func((b += 3, b));
    1. Re:My 2 cents by mikera · · Score: 1

      I was actually playing with C# recently trying to get DirectX to work and had some success. MS hasn't published the DirectX libraries for C# yet AFAIK, so I wrote some simple wrappers in C++ and linked them into C#. Not exactly elegant, but it worked and it was fast.....

      You're right that C# probably isn't appropriate for the hardcore inner loops in a game. But I reckons it's broadly fast enough for most "management" jobs. I guess that I will take the approach of using C# generally and dropping into C++ when I really need the speed. Since this is very much a strategy game, I'm hoping that I won't need to do this too much.

      Any open source gaming engines you think I should particularly check out BTW?

    2. Re:My 2 cents by lkaos · · Score: 2

      C++ is not the best bet for speed unless you absolutely no your way inside and out around the standard. Would be _much_ easier to use C.

      It's not that you can't accomplish the same thing in C++ as in C, but rather that you can't run into alot of the hidden speed bumps of C++ in C.

      Just do a search on SF for gaming engines... There are soooo many that I couldn't even begin do list them here. My personal fav is the GNU flight simulator. It's sweet...

      --
      int func(int a);
      func((b += 3, b));
  116. DON'T LISTEN by augustz · · Score: 3, Insightful

    Please DO NOT LISTEN to this guy.

    Try supporting a large java app, with folks who may have to install JRE's, open up security settings in their browser sometimes talking to an admin before being permitted to do so, who will find ENDLESS incompatabilities between various versions, and will discover that that java does NOT look "like what they are accustomed too" and you have yourself a gargantuan support, installation and education headache the like of which you probably have only had nightmares about.

    Mix that with the fact that you WILL be taking a performance hit by going to java, and the difference in performance between Java and C# is only likely to INCREASE and the technical arguement becomes even simpler. Remember that Microsoft will be droping Java support as fast as they can, do you think future IE/Windows is going to have a JVM? No chance.

    Mix with the face that C# at least so far appears to be an HONEST open standard, unlike Java's endless standardize promises, which have been repeatedly broken so that the only ones who continue to defend their promises of open standards are the insane java zealots, and you have a solid business (open standards are better, safer, and do not put you on the hook to a commercial company) and even moral decision that is clear cut.

    1. Re:DON'T LISTEN by Anonymous Coward · · Score: 0
      Don't listen to anyone who appears a language zealot. augustz fits that profile perfectly.

      That's my advice to you.

    2. Re:DON'T LISTEN by Sentry21 · · Score: 3, Interesting

      A few comments about your post...

      Try supporting a large java app, with folks who may have to install JRE's, open up security settings in their browser sometimes talking to an admin before being permitted to do so, who will find ENDLESS incompatabilities between various versions, and will discover that that java does NOT look "like what they are accustomed too" and you have yourself a gargantuan support, installation and education headache the like of which you probably have only had nightmares about.

      If you need a JRE, include one with the game installer.

      If you do not know how to change security settings in the browser, then use the regular version. If you have an 'admin', you should probably not be playing a game (at work? at school?).

      If you include a version of the Sun JRE that your product works with, then your product will work.

      I do not see how java can be 'what they are accustomed to' or not. 99.99% of games have a custom UI anyway. Java apps can be double-clicked on. What is the issue here?

      You will be taking a performance hit going to java. Most of a game's speed depends on the video card. It is hard to max out a modern CPU. With a JIT compiler (or a native compiler, if you so desire), you can eliminate most of the speed hit.

      C# appears to be an honest open standard created by a company that has historically proven that they have no interest in keeping interoperability any longer than it takes to lock in developers. They will undoubtedly come up with 'extensions' that will make life, if not impossible, then at least difficult for any non-MS users/developers.

      I would go with Sun's stupidity over MS's malice any day of the week. At least I know Sun isn't -trying- to screw me over.

      --Dan

    3. Re:DON'T LISTEN by augustz · · Score: 2

      Dan,

      Please remember I was responding to an early poster...

      "so that users can just use IE, Mozilla or Netscape to play the game"

      Remember, folks browse the web with a variety of browsers, and those browsers (despite what Sun claims about write once, run anywhere) are often incompatible or exhibit diverging behaviors vis a vis Java.

      "what they are accstomed to" I was pointing out that the Java interface is not a win in terms of what folks are accustomed too. Windows look and feel is, or as you point out a custom look and feel. This is NOT a java selling point it seems.

      On CPU speed. Depending on the game, but many MMOPG actually are not so graphically intensive as they are CPU intensive, they have a lot of items on the screen. Check out some current game benchmarks and CPU speed still makes a difference.

      On the C# standardization front, fair enough, Microsoft has clearly shown they have no interest in interoperability. But there is some usefull technology in C# that should be useful even in an embrace and extend.

    4. Re:DON'T LISTEN by ashultz · · Score: 1

      Here's a guy who has never written a big pile of Java, he's only heard stories about it. Don't listen to him. You could do it in Java as well as C# - the languages are pretty damn equivalent. The only question is whether to do it in Java/C#, C++/C, or something else.

      Someone has been swallowing too many of the microsoft propaganda spews, I think.

    5. Re:DON'T LISTEN by Anonymous Coward · · Score: 0

      Hmmm, I don't think so. First of all, don't worry so much about support. There are top notch JVMs for Windows, Solaris, Linux, Mac OS X (and a cruddy one for the old Mac OS), FreeBSD, and I'm sure some others I'm forgetting. An average JVM (just assuming the JVM 1.4 windows is average) is about 40 megs, not too bad. If your users don't have a JVM they can download one right now, not tomorrow, not whenever the developers decide to write one, not when one becomes stable, right now. That's important. Paul Simon had it right, don't squander your resistance for a pocket full of mumbles such are promises. :-)

      Now, will Java actually work? My guess is probably. There are a few minor issues in the JVM 1.3 network code, but they should be cleared up in 1.4. I would test on 1.4 if the 1.3 issues are a problem. I'm primarily thinking of the problem with 1.3 where under some circumstances a thread can be blocked for a LONG time (hours or days) on an invalid socket. Might be an issue, might not.

      Beyond that Java is stable and fast. I've managed to make massive (heavily loaded) java applications run for weeks on end without a crash. Though you may want to try a few JVMs for absolute maximal stability and performance.

      Second of all, anyone who tells you java is too slow for a network based app is probably completely wrong. I have yet to see a computer max out it's CPUs doing network based work with Java. It may be slow for some types of scientific computing and perhaps things like 3D shooters, but if you're using a lot of networking then the network will be your bottleneck. There's a reason so much network code is written in perl, it just doesn't usually matter.

      The performance hit you take by using java is small, even when comparing java to C or C++ except in a few exceptional cases. Generally good algorithm design is far more important. I also imagine that C# is no champion performer either and that it won't be significantly faster than java. Considering that they are almost identical.

      Basically, I would advise you that the JVMs are available now, whereas C# is only really available for one platform. In addition, you can have your choice of JVMs, but I don't think there will be very many runtimes for C# anytime soon. It would really suck to write it in C# and then find out that the runtimes which were supposed to be available aren't, or are too buggy.

      Initially Java was painfully slow, but that's no longer the case. In addition, many of its most annoying issues have been cleared up. I think the IO issues are the last significant problems left, and they look (though I haven't verified this with extensive programming) fixed in JVM 1.4

      My $.02

      Tyler Ward
      tjw19@columbia.edu

    6. Re:DON'T LISTEN by augustz · · Score: 1

      Except one is a standard and one is not, despite endless promises by sun. That counts beleive it or not with folks who see actual business advantages in using standards.

  117. Re:.NET will soon be the dominant GUI for Linux by Anonymous Coward · · Score: 1, Interesting
    Furthermore, making games cross-platform is hardly an issue with 90% of PC users running some version of Windows.

    It becomes an issue when the game is run on the SERVER.

  118. A few considerations by Ichoran · · Score: 1

    As other posters have mentioned, using C# seems a strange choice. It may be a good choice for the server-side, if you want to restrict yourself to only running the server on Windows boxes. However, for the client, using C# is a good way to dramatically reduce your customer base without gaining anything significant. Fortunately, the client and server don't need to be written in the same language.

    There are a few considerations that you should keep in mind. First, I personally am an fan of rolling your own messaging system over open sockets. Use simple encryption to verify that the client is who it is supposed to be--don't pass plain text strings around. Make sure that the server doesn't trust the client to do anything sensible. (Lost packets, hackers, etc...you have no idea what is going to come in.) If you can get by with sending updates no more often than, say, once a second, have the server limit the amount of updates you're sending.

    Also, as other posters have mentioned, you want to try to avoid N^2 behavior as much as possible. The server will have to inform everyone of what everyone else is doing--there is no way around that--but whenever there is a case where a change needs to be propagated, think about whether you can't hold off on propagating the change for a little while to see if other data comes in. If you want fast massively multiplayer interaction, this is a must.

    Also, don't be afraid to send predictive information to the clients. For instance, most MMORPGs send not just the position of NPCs and PCs but also their velocity so the client can properly update the position without having to interact with the server. Once the velocity vector changes, the server sends an update to the client (sometimes revising history as to where the NPC was). This is a good strategy in general to offload work safely to the client--just make sure that the server checks all requests that the client makes, in case the client is working with inaccurate information and says the user can do something that they really can't do!

    1. Re:A few considerations by mikera · · Score: 2

      You raise some very good points - I actually hadn't really given that much thought to using a separate language for the server. Reason is that there is a certain advantage in using the same language for client and server in that you can get some *serious* code re-use.

      I think the biggest issue is development speed. You only have to write all the object representations once, and you avoid all the bugs that could occur when you update the server but not the client and vice-versa. Less of an issue for a big commercial house, definitely an issue for a "Lone Wolf" coder like myself who needs to stay sane and motivated.

      You can also use server code in the client to handle updates. My first draft at a networking protocol made heavy use of this - updates to the game are propagated where necessary and applied to both the client and server states of the world to guarantee synchronicity. The client and server representations of the game state are the same class, and it would be a real pain to develop two versions in two languages simultaneously.

      You can even make the client and server the same program, to enable P2P style operation. Haven't thought it fully through yet, but If you had a muli-side battle with multiple players per side (lets say 50 players total?) it might make sense for some of the clients to become "servers" for their own side, taking the load off the master server.

      Then there's always a whacky AI idea that I am planning to test out - Clone() the entire game state and let the AI try a genetic algorithm on possible command combinations. This could solve the classic "lack of collective intelligence" problem a lot of strategy game AIs tend to have. Admittedley you would probably want to do this on the server, but it seems like there could be a potential to offload some of this work to clients, e.g. letting a client process the moves for an "allied" AI so they would make no gain from trying to throw a spanner in the works.

  119. Re:+1 Wholey Sh$t : by Bush+Pig · · Score: 0

    I'd have to agree. Also, seeing as C# runs only on a platform that is known to not scale well to large problems, I'd suggest you'd be better off writing it in C++ to run on Solaris (or HP-UX or ...), as you're going to need a _lot_ of grunt once you get past about 6 players.

    --
    What a long, strange trip it's been.
  120. It depends on what you mean by 'Strategy'... by TiggertheMad · · Score: 1

    If you are intending to do a turn based strategy game, then fire away, Gridley! I can say from experience that a MMTBS is relatively trivial via ASP, and ASP was/is a precursor to ASP.Net. (Remeber that M$ promises .net to be 'language neutral' in the sense that C#-ASP-VB-C++ etc, will be all able to accomplish the same ends.) I'm already working on my own MMTBS game, and it is comming along very nicely. On the other hand, if you me strategy as in Command and Conquer or Warcraft/Starcraft, you may need to check out what M$ is releasing for modules. They promise (no snickers from the peanut gallery, please) to have modules to allow you do common things w/o reinventing the wheel. Will they ship a fast network communication module? Depends on if they want to try to put wild tangent out of businuess. Of course, I haven't seen wild tangent actually make their multi player technology work yet... I hope M$ builds game modules into .net, it would be cool as, not many people know how to build .dlls and COM objects.

    --

    HA! I just wasted some of your bandwidth with a frivolous sig!
  121. GarageGames and Tribes networking model by 3Suns · · Score: 2, Interesting

    Here is a very in-depth look at the networking model for StarSeige: Tribes and Tribes2. It is written by Mark Frohnmayer and Tim Gift, who kinda wrote the thing. It goes into great detail about all the things you're going to have to think about, including construction of the stream layer, the perception of real-time play, preemptive client prediction, etc. A must-read if you're thinking about programming this kind of thing.

    You might also want to check out GarageGames for some other game development resources.

    --

    -3Suns

    ~~~~
    The Revolution will be Slashdotted
  122. Another framework, in Java by retrosteve · · Score: 1
    Check out Henrik Kniberg's
    White Orb project in Java.


    It's now defunct, but has source code and lots of documentation and design decision records, and may be a good place to start. No licensing problems either! Developed by a small international team.

    Steve.

  123. Common Lisp? by Convergence · · Score: 2

    If you are advocating Common Lisp, *please* tell me what compiler you're thinking of.. I've looked over them, and they are all inappropriate for a game. They may have late binding, but not always, and its the 'not always' part that bites you.

  124. A little vague by Casca · · Score: 2, Funny

    I want to build a car using (insert new untested material here) because its new. I know I'll need some windows, and wheels, and some sort of engine. I don't really want any suggestions about what materials would work the best because I want to learn how to use the new (untested material). What I really want to know is has anyone else ever done this before, and what should I look out for? I'm pretty sure I'll need to make sure it gets good gas mileage, but it will have to be really heavy, acceleration isn't important, but I want it to be responsive in the turns...

    Why would anyone ask a slashdot group about a C# project?

    --
    Casca
  125. This guy does not qualify to comment on Java by Anonymous Coward · · Score: 0

    Read his profile and his comments.

    Insightful? He's just yelling out surjective believes, I don't seen any insight here. The fault in moderation system is that moderators will mod up those who is on the same-side as theirs, not on the content.

    1. Re:This guy does not qualify to comment on Java by augustz · · Score: 1

      Perhaps you'd like to respond with some content and actual points? Perhaps without hiding behind the annonymous coward label? There is a reason AC's show up as score 0. Become the moderation system *works*.

  126. Use C# and learn not to by presearch · · Score: 1

    You should write your game in C# (or Java or C++) so when it collapses under the weight of it's own sludge, you'll learn what it's like to toss away 6 months worth of work on a bad decision and never make that mistake again. Then you can write it again in ultra clean C and maybe actually ship something that runs halfway decently. With what you are planning, you'll need to get every bit of efficiency out of every critical loop. In a 3D game, especially in massive-multiplayer, you can't afford to trade ease of implementation with not knowing what's going on in your code.

  127. let us know when you need beta testers! by daddydgk · · Score: 1

    I know very little of the programming of multi player games but if you need guinea pigs to find the bugs let us know.

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

  129. Try doing it the easy way first... by X · · Score: 3, Insightful

    Really, writing something as sophisticated as this with a new language which neither you nor it's developers completely understand yet is a really, really bad idea. I wouldn't use C# for any major production project yet. It's not ready for it.

    If you have no prior experience writing this kind of application, I'd recommend using somekind of a framework to provide you the basics. This will save you the roughly 1 billion design mistakes you are likely to make. If you were experienced with this kind of thing, I'd give you different advice. But for your first run it'd be a smart idea to learn a decent design that someone else has already done.

    You could look at a few open source projects which are doing this thing. If you don't like any of them, the other thing I'd suggest is using a J2EE solution. What you're describing sounds like a good fit for a JMS-based solution, particularly using message-driven beans. The nice thing with a J2EE solution is you have a proven framework to work within that can provide you with the scalability, availability, and reliability that you need.

    I'm not against reinventing the wheel, but it's best if you have some experience before you do that, otherwise you'll end up with a triangular shaped rock. ;-)

    --
    sigs are a waste of space
    1. Re:Try doing it the easy way first... by mikera · · Score: 1

      Hey, it's a challenge - but I always think that's a good reason to do things.

      It's not exactly like I'm inexperienced either - been coding for around fifteen years and I built a pretty impressive game previously in Java so the leap to C# isn't actually all that great.

      My evaluation of C# is that while Microsoft are certainly going to layer on a great deal more advanced functionality and libraries, the core platform is pretty much there. Apart from the introduction of generics, I don't think they are going to do anything else significant that could require any re-engineering. The worst I'm expecting is a couple of naming tweaks.

      I've actually found J2EE a little clunky for my tastes. Performance isn't good enough for a game server if you use Container Managed Persistance, and if you opt for Bean Managed Persitence you're effectively re-inventing the wheel anyway. Haven't really used the messaging beans though - I'll take a look into them to see if they would be useful/applicable.

    2. Re:Try doing it the easy way first... by X · · Score: 2

      For starters, I wasn't questioning your experience as a programmer, I was questioning your experience building these types of solutions. MMORPG's introduce a whole slew of design issues which most programmers have little or no exposure to. Honestly, I think from what you've said before, and what you're saying in this post, you haven't had much exposure to these problems.

      The key part of what's being done here isn't about language features. Microsoft most definitely is not doing anything new with C#, but they are building a new VM, a new library, a new compiler, etc. There's a lot of places for bugs to creap in. But it's even more than that. C# has no infrastructure. That's why I was recommending J2EE rather than Java. J2EE allows you to easily and efficiently add machine's to the system.

      Take a look at J2EE again. It's not nearly as clunky as you may think. For starers, the current state of the art CMP technology is actually significantly faster than what traditional O/R tools are capable of. If you're really concerned about persistance performance, look at various OODB-caching products that plug in to J2EE's persistence container (Gemstone and Versant come to mind). But really, the part of J2EE that seems most important to me is messaging. If you build this thing around a messaging model, you're in great shape.

      Now, you could build your own, you could use a proprietary messaging product, you could find a proprietary application server, or you could leverage all the other aspects of a J2EE app-server that you're going to need as well (and if you think using BMP means you effectively don't get any benefit from J2EE, then I think this is one example of how you don't know that much about what's needed to build this kind of solution).

      --
      sigs are a waste of space
  130. B.Y.O.N.D. by Anonymous Coward · · Score: 0


    Don't know if this would work for you or not, but you might check out http://www.byond.com which is a multiplayer gaming platform.

  131. Cheat Proofing by kyras · · Score: 1

    I would encourage you also to look into some of the literature regarding cheat proofing methods. Having an authoritative game server (or server farm) is useful, but it doesn't solve every problem. If people are actually going to play the game, then people are going to try to gain an unfair advantage in the process. It's the nature of the beast (er, man).

    There are quite a few good papers (Yes, academic! Don't you wish you could do research about games?) out there on the subject. You may particularly want to look into some kind of lockstep protocol, as time cheats (i.e., when a player waits for other nearby players to "make a move" -- whatever that means in your game -- before entering their own in response) can be reduced/stopped with something like this. That's just the tip of the iceberg, though...

    --
    Tastes like burning! - Ralph Wiggum
    1. Re:Cheat Proofing by mikera · · Score: 1

      Sounds interesting - didn't realise there was academic research into cheat-proofing! Might have to look at getting some grants to fund my endeavours :-)

      I think that having the authoritative server with visible set event propagation solves *most* of the cheating problems.

      As for the "time cheats" I have been less concerned because I have been trying to think of a way to actually make this a part of the game. I actually think that it's somewhat representative to strategy in the real world, where you wait for an opponent to commit themselves and then pounce.......

  132. Re:The article is a Troll by Anonymous Coward · · Score: 0

    Offtopic!? He's right! This article has all the markings of a troll!

  133. Loser. by darkmoon · · Score: 1

    He's an "experienced (Windows) programmer," on Slashdot this usually means that his language is Visual Basic.

    Mod me down for being right, I'll get you back in meta-moderation.

  134. Check out BYOND by Anonymous Coward · · Score: 0

    http://www.byond.com.

    It has some drawbacks, but it is really neat for newbie programmers to play with. Its for Windows, Linux, and FreeBSD, comes with a client (graphical version only available for Windows), a server daemon, and a development interface.

    A good example of a game that has been built off of this is Dragon Warrior Online, a fan game off of the popular RPG series.

  135. MMPORG Servers by Anonymous Coward · · Score: 2, Informative

    I won't cover the networking problems, because that's not my forte, but rather the issues of physical proximity of players. You have to assume that a player has a limited range of sight and effect to cull the amount of data sent to a player in real-time. Assuming a perfect 56K connection, you can only send about 600-700 bytes per 100msec frame, so (BOE) you can really only send position updates for about 20-50 other players, depending on compression techniques, etc.

    Spatial Data Structures (Hanan Samet) describes a set of aglorithms such as quadtrees (2 - 2.5D), and octrees (3D) which can be used to solve the proximity problem in log time in multidimensions, i.e. you can find the N players within a reasonable distance in a pretty short period of time. In fact, you only have to traverse down once, then traverse back up until you're out of range. Insertions are log N as well, so the server should be limited on network bandwidth, not processing power. You can also give priority (send this packet first) to the player that you're looking directly at (or who's looking at you), with diminishing interest in other players (if his back's to me, and mine to him, I don't care quite as much as if I'm looking directly at him),

    The second part is "what happens if I don't get a packet for an assigned player in time", a typical UDP problem. In a flight/driving sim game, you can "guesstimate" with an area of probability where the player's going to be, and if you're shooting at him, give the probability of a hit. Sometimes you'll miss when you should have hit, and vice versa, but you have to do something.

    Do the canonical system first, with objects in 3-D space which can manueuver and shoot to tune your algorithms on the server, then you can refine the game. Doing a simple "space shooter" should be relatively easy. You can make robo-clients with scripts to test out your weights and probabilities. Once you have the empty space shooter, you can add a world with static objects, which should be replicated on each client. Dynamic worlds (walls falling down, etc.) are much more complicated, where you have to set the before and after on each client, and kick it off with a trigger. Dynamic interactions get a tad too complicated even in single player games.

    If you're doing a game with animated players, it's easiest to have pre-programmed positions (running, shooting, slashing with the sword, kicking), so only a code for the target of the action has to be sent down. You can't ship down full animation information, it's too expensive. Unfortunately, it makes fighting unrealistic, because there's no reaction to the pre-programmed code. Doing interactions between figures is an N^2 problem (I block his kick), which while doable, requires a lot of hand-animation work. Full inverse kinematics is computationally prohibitive (AFAIK), but there are approximations that are quite realistic.

    Keep your hopes up. There's a lot of stuff out there that's not very good because it was put together in a hurry.

    For the networking stuff, try some tuning of packet sizes and rates for different scenarios (modem, DSL, high ping times) to figure out what's most efficient in terms of accuracy and percentage of arrived packets. You should be able to figure out your optimal packet size and rate for each scenario.

  136. MUD by Shadowcaster · · Score: 1

    It won't help you solve *all* the problems, but I'm sure you could glom onto a few ideas from having a look at the way a MUD works. Here's one (telnet:// link).. they're based off of MERC, but you'll want to look at the code too so either snag a copy of ROM or QuickMUD (the latter of which is just ROM + Color + OLC + Copyover, basically snazzier to the players/builders :).

  137. Re:Learn from experience... use LINUX or UNIX equi by tringstad · · Score: 2

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

    This sounds to me more like a management problem.

    Instead of having two full-time employees walk around all day rebooting servers, why not just hire one competent sysadmin to read the fucking logs and find out why the servers are crashing? Or maybe hire a few competent programmers (that find the problem and fix it, instead of whining about the OS) if it's the EQ code that's at fault?

    Oh wait, my bad, I forgot this is Slashdot, where we bitch about MS, without a link or anything else substantial to back up our slander.

    -Tommy

    --
    "I got a half gallon of Jack, and 2 dozen Ant Traps. I'm about to get wild." -me
  138. Re: UDP broadcasting by jeti · · Score: 1

    AFAIK broadcasting is part of the IPv4 specs.
    It's just that many routers don't implement it.

    So yes, you're restricted to LANs for broadcasting
    messages.

  139. note about TCP by rufusdufus · · Score: 1

    Oh, very important note if you use TCP in your game. You have to turn off buffering or your lag will be incredibly bad. The manual might say something like never do this because it spams the network and is very inefficient. What this means is that your bandwidth (bytes/sec) goes down with buffering off. But thats ok because you dont care about bytes per second, just time between packets. You have to be sure your server does not send packets as fast as possible, but on a schedule otherwise you will send to many packets and flood the network.

  140. Other languages to consider by Anonymous Coward · · Score: 1, Funny

    As so many people have made clear C# is completely the wrong tool for the job. How could it possibly be the right tool? After all, it's a new language from Microsoft!

    Some other advice on languages: how well this will perform will be completely dependent upon the language you choose. I cannot overemphasize this fact. The language you choose will be the difference between this game of yours being the next Starcraft and this game being the next Civilization: Call To Power.

    First off, I would recommend NOT using languages like C, C++, or Objective C. C is especially bad because not only is it not garbage collected, but because it is a structured language it makes working on large projects with it virtually impossible. Every large project which has been written in C instead of C++ has failed completely. C++ is not an object oriented language either. Both C an C++ have a horrible potential for memory leaks because they arent garbage collected. Also, C and C++ have language features which can be abused such as global variables and pointers. The sockets support in these languages is a bit iffy and they don't let you use all the latest language features like POSIX asynchronous I/O. Only a moron would even think of using C or C++ in this day and age, when there are so many better garbage collected languages out there.

    I have a number of recommendations to you for language choice. The first is of course Java! Java is an easy language and does an extremely efficient job of garbage collection, more so than what you could ever possibly acheive manually in languages like C or C++. Java is also dynamically recompiled which means it is optomized for your CPU on the fly, making it faster than C or C++. It's also easy to program in, and is a better object oriented language than C++ (Bjarne Stroustrup has admitted that C++ wasn't designed to be an object oriented language, and we all know that if a language isn't truly object oriented it's just no good)

    Might I also suggest Pascal as a language of implementation? Pascal has a very nice sockets interface which will let you use the absolute latest kernel features such as POSIX.2 asynchronous I/O which is, believe me, what you want to be using. glibc doesn't document the functions like aio_read() but you can find them on any BSD. Linux does implement asynchronous I/O, right in the kernel which is better than any BSD. And of course I know you want to be using Linux because it's the greatest operating system ever.

    Another language to consider is COBOL. COBOL has a great deal of support because it's been around so long. In fact, the COBOL compilers will optomize better than any other compilers on Earth, just because they've been developed so well because COBOL is so old. You should look into COBOL if you feel like writing it in Java isn't your cup of tea.

    Smalltalk is the world's greatest object oriented language. There are a great deal of tools for Smalltalk development, plus your program would run faster and be less buggy because it's written in a true object oriented language like Java instead of those fake object oriented languages like C++.

    Eiffel is another good object oriented language which you might look into. I haven't used Eiffel much but I hear it's very good.

    PHP is a language geared towards portability and rapid development. Use PHP if you want to code the server with ease and run it on a variety of platforms. I think PHP even supports POSIX.2 asynchronous I/O!

    LISP and ML are functional languages which are often ignored but very good. Use these if you want to guarantee your server is bug free.

    Color Forth is a language which gives you very low level access to the system while still being garbage collected. In fact Java stole its garbage collector from Color Forth. Color Forth also has the world's coolest syntax ever because it's color dependent. Color Forth will give you the best use of Posix Asynchronous I/O out of any of the languages I've mentioned, but watch out for memory leaks! Color Forth does not let you guarantee your program is bug free either.

    FORTRAN 95 is another way to go. FORTRAN makes it really easy to parallel process anything which uses the FOREACH command, and there are many great FORTRAN compilers for Linux made by Intel and the Portland Group. And we know if it doesn't run under Linux, your game will be completely worthless.

    Visual Basic makes it very easy to program network servers, and will guarantee you easy use of sockets and POSIX.2 Asynchronous I/O. Use Visual Basic if you want a very efficient language that lets you manage memory manually and use a small footprint while being very efficient in your use of CPU algorithms.

    For the client I recommend using Direct3D. You are writing a 3D game, right? A 2D game, especially a 2D strategy game, is completely worthless! Every single successful strategy game ever written has used Direct3D. It is for this reason that I recommend you use and learn Direct3D. I recommend you also write the client in Visual Basic as it reduces development time and allows for efficient memory management.

    1. Re:Other languages to consider by mikera · · Score: 3, Funny

      Cool. I will be sure to check them all out.

      Perhaps I should develop my own re-targetable meta-language so that I can defer the language decision until later?

      Also, you heard of unlambda? I think it might be a worthy addition to your list.....

  141. Propogating state information by hakker · · Score: 1

    It seems to me that this problem is similar to other "table" propogations as well as firewall forwarding stuff. What I mean is take a look at a spanning tree algorithm where each node is a client on your MMORPG network.

  142. Re:What the hell??? by ayjay29 · · Score: 2

    Why not?
    Being Java based, C# has great networking capabilities, and there's a lot of Java code out there that could be ported to C# easily. It also has the performance advantage over Java, which is important in a network game.
    With .NET you can create a distributed application, where the app is hosted on the server. So if you make a change to the client code, the clients automatically get updates.
    C# is an excellent choice for this project.
    Check out the Terrarium game at www.gotdotnet.com, they use quite a bit of this technology.
    Good luck, and ignore the Linux Jihad!

    --
    Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated up.
  143. How about a scalable pub/sub event service... by edashofy · · Score: 1

    Something akin to a JMS implementation, or something that can use event routers to increase scalability as you need it like Siena

  144. Agreed. by renoX · · Score: 2

    I wouldn't use C# right now because it is too new.

    On one hand I understand the appeal of using the latest and greatest language: I fell into the same trap with Java in 1997, and this was a wrong choice: the library was full of bugs and I spent half of my time working around bugs..

    C# is very new, so I wouldn't bet on it.
    Oh BTW don't believe the press, at the same time I was badly hurt by the bugs in Java, I kept reading reviews which were swearing that Java was the greatest things since sliced bread (in Byte or Doctor's Dobbs)..

    If Microsoft has an open bug report process, first check the "level of bugs" before..
    I should have looked at Sun's bug parade before choosing Java, it shows the true state of Java (a looooonnnnnng time to correct the bugs.).

  145. Big DON'T for merc/diku by Anonymous Coward · · Score: 0

    I have started my internet education exactly from diku/merc codebases. It took me almost a year after that to lose some bad coding habits... I must say, that this code is one of the worst pieces of C hack I have seen.
    I don't want to be inflammatory here - it works and it can be used. But it is not a place to learn. Try to look at any more contemporary codebases - a lot of stuff was already fixed there.
    Another problem with focusing on muds is that they are very simplistic in time handling - they don't care about lag, do not have to really update clients, etc, etc. Everything is simulated on server, clients only get text log of events. This does not scale to anything even semi-real time interactive.

  146. Re:Learn from experience... use LINUX or UNIX equi by hyoo · · Score: 2

    Did the thought ever occur to you that maybe the server code for the game is buggy? In that case, from managements perspective it maybe be more cost effective to have 2 fulltime server resetters then spending programmer hours on finding/fixing/testing/deploying the fix.

    And if its not the server code then it may be the drivers (ie. network card) that is causing the crashes and not the OS itself.

    I think that most Unix systems are more stable because the vendor (ie. sun, sgi) has direct control over the hardware that it ships with and can fully test the default hardware config with their flavor of unix. If MS was able to test every possible PC configuration then maybe they would be able to guarantee 99.9999% uptime, but NT's uptime reputation is at the mercy of driver developers of other companies.

  147. A design I wrote some years ago by mauddib~ · · Score: 2
    Some years ago I wrote the following design for a massive multiplayer game. It works by checksums and differential updates on an object orientated hierarchical design.


    Server updates

    The server updates will go by checking objectblocks.
    The client sends a checksum of his representatation about an object block
    or a set of objectblocks. If the checksum differs with the one on the
    server, an update is sent. The update is done by a diff, or a complete
    update.

    The client keeps it's current representation and a copy of the last correct
    representation in memory. The server keeps a total of n copies of the last
    timeframes in memory.

    Pro's:
    - Not much datatransfer
    - At high latency, connection will still be fast.

    Contra's
    - Much overhead for the server, keeping n copies of the complete
    representation.



    (I had to remove some information, especially ascii art sheets which the lameness filter catches)
    --
    This is a replacement signature.
    1. Re:A design I wrote some years ago by mikera · · Score: 1

      Interesting idea - how do you define "object blocks"? I guess you have to find some kind of tree structure in your data to make this work.

      I like the idea of the checksum to test for changes especially, sounds pretty efficient.

  148. Why C#? by codexus · · Score: 1

    If you want to learn a new language, why pick a Microsoft-centric language. Most language out-there are cross-platform and will allow your game to run on all these platforms as well.

    Chosing C# seems a little bit like tieing oneself to a tree before starting a race. If the rope is big enough you might not notice you won't finish the race until it's too late. :)

    --
    True warriors use the Klingon Google
    1. Re:Why C#? by mikera · · Score: 1

      Well, I'm actually betting that either of both of Mono and dotGNU will succeed in making a decent C#/.NET clone that will be truly portable.

      My assesment of this is that it's certainly possible - the .NET framework is very similar to Java in many ways, which has proved eminently portable in the past.

  149. Scaling using a server ring/tree by Anonymous Coward · · Score: 0

    If you care about scaling... what about a server ring, in a kind like irc. You can add trusted servers (trusted on cheating sense) and balance the load between them on connection or even hotly using some kind of server change message.

    You may also use a server tree in order to reduce the latency and keep a centralized data source, while keeping the circle for load balancing and other 'latency/inconsistency don't matter' tasks.

    I have already constructed a load balancing system like that in PVM programs. I may help you in constructing such system if you are insterested in, althought my code and coding skills leds to C++ and I am not interested at all in learning C# vokimon.at.jet.dot.es

    Vokimon.

    1. Re:Scaling using a server ring/tree by mikera · · Score: 1

      That's an interesting idea - I had thought about using multiple servers, but I had planned to only use them for P2P metadata sharing. This would allow discovery of game servers etc.

      Guess the tree of servers would work best since I think it's necessary to keep a single authorative master, with multiple clients connecting to sub-servers.

      This actually would solve one of my scalability concerns - number of client connections to a single server. This could become a problem because of the (relatively) large amount of processing required to work out the relevant set of objects for event propagation.

    2. Re:Scaling using a server ring/tree by Anonymous Coward · · Score: 0

      Well, the final proposal was to use the ring only to balance the user load, just traspasing user managment to the neighbourg server, when a server is too much loaded. I used this on an a parallel implementation of Branch and Bound for a TSP problem that I can send you.

      The ring only scales the client management. But if you already think that this is not enough you can distribute the authoritative map over a trusted network of servers. By this way you will also scale the event passing by no saturing a central server.

      If you are interested in such systems you may read some good articles on Parallel programming on how distribute the load, and about distributed database managers on how to implement a distributed ACID system.

      Vokimon.

      PS: I wont keep watching those thread (im not register and i dont receive notification) so emailme if you want to talk about this: vokimonatjetdotes

  150. docs by Anonymous Coward · · Score: 0

    just to tell you there is a pretty paper about networked gaming models on
    http://www.hut.fi/~jmunkki/netgames/

    http://gamasutra.com/ is also a good place to go for documents on general gaming issues

    you could accomplish the "selective sending" by making the client send you a "Changed map position" with the coordinates each time he/she goes to another place on the map. When receiving events, you should broadcast them to every player which is in the area the event occured.

    hope this helps,
    nightdog

  151. Re:What the hell??? by Alex+Belits · · Score: 2

    C# has no useful for games networking capabilities whatsoever -- it's based on the idea of a remote (procedure,method, ...) call while networked games have to deal with asyncronous streams of requests and messages. One can reduce those streams (plus all related structures that describe which stream describes which instances of objects, and how their state should propagate between clients and servers) to calls but that would be like writing a GUI on a Turing machine.

    --
    Contrary to the popular belief, there indeed is no God.
  152. Score 4, Troll ? by Shiny+Metal+S. · · Score: 1
    Nice moderation! :)

    Moderation Totals: Troll=1, Insightful=1, Informative=2, Underrated=1, Total=5.

    I think I wont troll again, that will teach me!

    --

    ~shiny
    WILL HACK FOR $$$

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

  154. UDP vs TCP by Anonymous Coward · · Score: 1, Insightful

    It's not even a connection issue, really.

    TCP is a problem simply because it resends data that has lost its relevance. Simple example: client position updates.

    As a client moves through your world, it needs to communicate its position to the server. If you do this with TCP and run into some lag issues or whatever, it will dutifully try to resend that data. By the time the server actually receives it, the client is (a) far from that position, and (b) already sending new position updates. This results in a variety of problems such as the "snapback" movement issue seen in Ultima Online.

    In a game, TCP is good for initiating connections (esp. getting through NAT), login verification, etc. But any data which is updated rapidly, and useless after a short time frame, should be sent via UDP. Client side prediction can smooth out dropped or misordered packets.

    - SEAL

  155. Game theory by Anonymous Coward · · Score: 0

    Any game theory application would make the project simply a programming issue.

  156. Re:.NET will soon be the dominant GUI for Linux by Anonymous Coward · · Score: 0

    So ends the conversation.

  157. Re:Learn from experience... use LINUX or UNIX equi by pioneer · · Score: 1

    You obviously have no idea what you are talking about...

    What's the largest code base you've worked on? Ever deployed to 200 servers? 80,000 simultaneous users.... I'm guessing no... and since, traffic wise, Everquest is nearly 1/4 of Yahoo's traffic (and the game logic is much more complicated then a web server) its quite a feat...

    And there is no such thing as bugless code. What there is though is the complexity of windows and the relative simplicity of a unix build built to match requirements.

    blatant MS loving is as pointless and uneducated as blatant MS bashing...

  158. Nice troll. by duffbeer703 · · Score: 2

    "Hi, I'm an experienced programmer who is going to implement a massively complex project in a brand-new and probaly buggy language. Also, the language in question (C#) will never work on any platform other than Windows and I would like advice from Slashdot readers (??)

    I'm so experienced at programming that I don't need to know what exactly it is I am doing. Since I will be using the .NET archicecture, I'll be able to send all game state changes to thousands of clients at the same time from a single server."

    --
    Conformity is the jailer of freedom and enemy of growth. -JFK
  159. Real-Time distributed state by aphor · · Score: 2

    I used to work for the CBOE as a Systems Support Analyst. In this job I was supposed to do hands-on troubleshooting of the options quote distribution system that populates the arrays of screens with stock tickers and options prices.

    At the core was a huge tablespace (database) of product:Bid:Offer:Last:Timestamp. That was an Amdahl mainframe running TPF (like the Sabre system backend for Travelocity). From there, the prices went through a ring-buffer where they were synchronously distributed (by another corporate entity: OPRA) back to all the derivatives exchanges including the CBOE. This happened over a T-1 in my time. Some Stratus Continuum (Wicked expensive redundant out the wazoo HPPA boxes running VOS) modules massaged the data out to and back in from OPRA. No traders on the CBOE floor have yet seen the effects of their bid/ask changes or last-sales on the overhead ticker displays.

    The Stratus modules maintained a first-tier subscription list for 10 georaphic "cells" (really called "posts" at CBOE), and streamed the appropriate updates to a "Post Display Server" (PDS). Each PDS server maintained a second-tier subscription list for 4 (possibly more) "Remote Control Node" (RCN servers) which fed a third-tier of subscriptions to the RCN displays, the end-client, a Tektronix X terminal running proprietary quote-screen software locally.

    We could never get clocks on all the servers to synchronise completely, but I estimate it took less than 500ms for a price change to make it to the screens, and peak trading times would see delays of 2-3 seconds.

    The multiple tier distribution system is designed to limit the impact of demand/performance spikes to the fewest number of clients possible. For example: your MMPOLG might have a server for each "city" in your game. I've always thought this might be a good application for a Beowulf cluster because of all the paralellism in dealing with all the clients simultaneous actions. Basically, you're a database of game state, and you have to sort and forward events to the fewest clients possible in order to keep things from getting overloaded. Clients recieve state, and they feed input to a state-engine, which generates events, which get sent back to the clients. The server sends the client a pond, the client throws a stone in it, and the server sends ripples back to all the clients at the pond. Your job is to keep that process as lightweight and distributed as possible.

    Good luck.

    --
    --- Nothing clever here: move along now...
  160. Re: UDP broadcasting by zippy_109 · · Score: 1

    Use IP Multicast. It does not restrict you to LANs and is gettine more widely depoloyed everday. It used the class D address space and uses the routers in the path to maintain group memebership. In this way the server sends the data (UDP) to a single destination address and the distribution tree and packet replication is handled by the routers.

  161. IP Multicast by zippy_109 · · Score: 1

    For sending identical datasets to groups of clients, multicast is the way to go.

    1. Re:IP Multicast by thona · · Score: 1

      Sure, as long as you do it on a LAN. Ridiculous what idiots dont even manage to post here. IP Multicast does not work on the internet. Why? Because the infrastructure (mainly the routers) do not support it. Ask you ISP, if you dont believe me. And next time think first.

  162. Languages are tools - pick the right one by Anonymous Coward · · Score: 0

    Cases can be made for a wide number of languages based on a variety of arguments, but I would strongly advise you NOT to use C# for two critical reasons.
    1) Microsoft already took one language (Java), made it their own and incompatible, dragged a whole mess of developers into the fray, and then abandoned them. These folks already have to move to C#, the last solution they picked, good or bad, was killed underneath them. Isn't this a nice lawsuit from the Fortune 1K to MSFT?

    2) There's lots of languages with real standards and established communities out there that are considerably more seasoned and experienced than something thought up inside MSFT and with no real world use. We are big fans of Smalltalk/Squeak, but there's a lot of good choices out there.

    Pick a language, any language. C# is not a language, it's just another poorly engineering trojan horse from msft. Once you ride it, getting off is only slighly more painful than staying on, but pain is the game.

  163. Massively Multiplayer? by Anonymous Coward · · Score: 0

    Hope you have a big honkin' server to serve this game to the masses...

  164. Use C# at your peril... by jotaeleemeese · · Score: 1

    Even if there was any useful technology in C# (there is not, all has been done in other places before) to give in to a company with complete disregard for fair business practices is the last thing anybody making business doing software development should lock himslef into.

    --
    IANAL but write like a drunk one.
    1. Re:Use C# at your peril... by Anonymous Coward · · Score: 0

      No useful technology in C#? You stupid fool. Christ, from a research perspective all of this has been invented decades ago. The question is are there huge class libraries, CLI etc on lots of platforms? You go into your corner with your custom hacked piece of crap system that predates this with very cool technology (and their are lots of these), while the rest of us will be using languages that suit a more evolved development style and can actually be used to develop a project (ie, their are programmers to hire who know the language). Do you even write ANY code at all? I'd bet this is just a lot of inexperienced speculation on your behalf.

  165. The comparison was Java vs C# by jotaeleemeese · · Score: 1

    The orignal poster wants to do this in C# not C.

    --
    IANAL but write like a drunk one.
  166. Excuses not valid. by jotaeleemeese · · Score: 1

    Assuming the original poster is not lying (he gave no probe of his allegations) then an OS that crashes because software is running is unacceptable. These are not the 70s were you need to reboot your machine once a week to ensure good operation.

    Same with network card.

    There are resilient probed stable solutions (the initial poster was right, a UNIX solution would not require those shennanigans of people going stupid rebooting servers).

    --
    IANAL but write like a drunk one.
  167. It's because of a DoS Bug in WebWasher by Anonymous Coward · · Score: 0
    Actually, the reason it is blocked is because we had some problems with bugs in webwasher, that caused it to send some data thousands of times when editing forms in zope, which tended to crash or slow down the site. The WebWasher developers were notified about the bug, but AFAIK nothing has been done yet.

    I'm not familiar with the exact details of the problem, though. Work is under way to solve other web page related issues, and this will likely be solved at the same time.

    -- zzorn, WorldForge developer.
  168. Check out the book: Design Patterns by gte910h · · Score: 1

    The memento pattern seems to be one of the many you will be using in your design. You will learn alot even if you fail miserably. The book is this one: Here

    --
    Want to see every step I took to start my company? http://www.rowdylabs.com/blogs/pitchtothegods
  169. Re:Learn from experience... use LINUX or UNIX equi by thona · · Score: 1

    he does not say that the servers crash. He says that they reboot them. This MIGHT be a faster way to handle a "log in, ill the server process, restart it" version. Sort of "just press the small button in front and things handle themselves". Resetting is way faster than even logging in. Again looks like a management decision.

  170. Why C# by Anonymous Coward · · Score: 0

    I don't know the specifics of your client or your server. Judging by what you want your server to do though, I would recommend C or C++. The client if it is anything besides basic telnet, could be written in just about any language.

    If I am reading correctly you are making a strategy game and not a mud. Most of the languages I've seen recommended will not give you the speed you want. This really also depends on how many clients you have connected at the same time and how many calculations you have to do. I'm guessing your thinking in the thousands since you stated massive. Under these circumstances you should stick with a compiled language and not a interpreted/bytecode language such as ... C#/Java/Python/Perl. Even though I'm a big fan of some of these, I really think you'd be limiting the size of your game by using them.

  171. Re:.NET will soon be the dominant GUI for Linux by Anonymous Coward · · Score: 0

    He's talking about windows not being a good server OS, not the client side. Windows is the right OS if your looking for the one that has the most used on the client side. Windows is NOT a very good server OS. The added fact that you will have subscription fees as an OS tax are not helpful either. Any *nix like OS(Unix, Linux, BSD, even MacOSX) would be a much more viable alternative for a game server. Stability is your prime concern.

  172. Look at DNS strategy to solve your problem by MrIcee · · Score: 1
    Here at TQworld we are also extending our games to handle multiplayer... we also encountered the same problem as you did... here is the strategy we are currently working on - which might work for you as well.

    When a new user joins a game he does so through the primary game servers, which identify the user and issue a code to the users client program. In addition, the server also issues a *handful* of IP addresses and codes for other players *near* the user (near being in terms of where the player is within the game). This handful of addresses and codes we term the *circle* - and you can think of it as being a circle of friends known to the clients game program.

    Once received... the client program then does direct peer-to-peer communication with the *handful* of client IP's that it received from the server.

    Now... as new gamers arrive, invariably they are handed some of these same IP's... each time they contact another game client they give their code... and they then remember it.

    With each gamer coming online... the *nearest* game clients then *know* about that gamer. However, other clients may not, since they are not *near* the gamer at that point. As they enter the gamers area they, of course, broadcast their codes and positions, not only to their known circle of clients, but also back to the primary game server.

    When a gamers client sees a new client code enter their area (as told to them by one of their circle of clients) -- they simply *ask* their circle who that player is. If none of their circle of clients know, they ask the primery server. Anytime they receive the new info, they not only update themselves, but they also tell their circle of clients.

    This works similar to DNS... in that... because a particular game client only knows about a few other game clients - the amount of traffic is minimal, but eventually everyone knows about everyone through the *circle*. For anyone that is not known, the master game server knows and is polled. This puts the primary amount of activity in the clients, and peer to peer - as opposed as client to server (the server basically only records the initial entrance of a gamer into the game... and also takes care of responding to any confused clients who can't find out about a gamer from it's local circle).

  173. Blah, Blah, Blah by Anonymous Coward · · Score: 0

    zzzzzzzzzzzz ... oh sorry. I fell asleep while this pompous ass was going on and on about his "expertise" and "experience". Man, what a putz.

  174. Don't Reinvent the Wheel by micromuncher · · Score: 1

    Believe it or not, many MMPGs and MORPHS are based on a tried and true distributed communications architecture called... IRC. Examples: anything by Blizzard (Diablo II etc), Everquest (and Verant's new StarWars Galaxies, etc.)

    My humble opinion, but check out what other people have done first...

    It is amazing what the slashdot sensors publish as articles these days (and what they don't).

    --
    /\/\icro/\/\uncher
  175. Trust by 2nd+Post! · · Score: 2

    Well, I can agree that you can never guarantee security in today's systems.

    I also haven't looked at cheating, yet, but I have a couple ideas.

    One: PKI. If every packet sent by the server is signed or encrypted, then a client should obviously only trust signed packets. Prevents some man in the middle issues. If both client-server uses PKI, then this applies in both up and down stream situations.

    If you use both global and personal keys, then you can encrypt messages in two ways. Personal keys are for specific P2P communications (such as important state changes) while the global keys can be used for multicast information (like monster movements or screen updates). This of course depends on the strength and inassailability of the keys, but that is a technical issue and not a policy issue.

    This doesn't address the ability of miniservers to create state. I haven't decided yet if that's going to be allowed, but if it is, one possibility is to have multiple mini servers correlate data, to increase security and robustness. This is still imperfect because a group of friends who play together can still cheat together (bad clients, for example, or proxies, or whatever)

    On the other hand, cheating can be curbed, I think, by good game design; where cheating is reduced by making the benefits of not cheating much higher. That's another policy design. IE, a bunch of friends won't cheat each other, if they're really friends...

    1. Re:Trust by NickFusion · · Score: 1

      Cheating doesn't necessarily mean screwing your friends, it could mean making countless dupes of his powerful "Axe of Machismo."

      In an MMPO, some cheats are for screwing other players, but the far more serious bugs cheat the world economy.

      --
      What were you expecting?
    2. Re:Trust by 2nd+Post! · · Score: 2

      Oh, that.

      I was also expecting an implementation of genetic algorithms to 'scale' the monsters up against the players...

      Or at least attempt to.

      So that, no matter how much they cheat, the dragon they see on the mountaintop will still kick their ass. They can cheat as much as they want, the monsters and weapons are supposed to 'scale' against each other. Supposedly. At least, again, that's my goal.

  176. good point by jon_c · · Score: 1

    I hadn't thought about that problem, but it is a very good point. Its funny how one can think they are pretty informed on a subject, then find out through talking with other people just how much they really arn't aware of (i'm refering to myself of course).

    thanks,
    -Jon

    --
    this is my sig.
  177. Limited runtime polymorphism by RalphTWaP · · Score: 2

    Interesting papers...

    *grins* Somehow, I hope that the author reads his replies.

    At any rate, one of the papers (forgive me, but it's the one with the link on the right side of the page) mentions a method of runtime polymorphism (or something very much like it) that is accomplished by attaching categorized properties to an object.

    The paper then implies that the categories themselves are fixed prior to runtime (showing a UML-like class-graph indicating two categories "can use" and "use").

    While I believe that flexibility and utility can be served with few categories, and also believe that the categories themselves probably align well with the object model (if one "can use" something then does "use" something, or "can take" something then does "take" something... etc), I find myself wondering if any thought was given to a more general extension system where whole categories themselves could be given to an object during runtime.

    I arrived at the desire to do something similar (flexible runtime polymorphism) at a high level of abstraction while considering MMORPG from a graphics-engine perspective, and looking at developing an MMORPG runtime engine based on a directed acyclic graph (just as many graphics API's use the concept of a "scene graph", an MMORPG runtime engine could use a "world graph" in the same way).

    Looking at the same example as the paper presents, there is an in-game object, which is furthermore a weapon, which is wielded by one who is pure-of-heart, which has the added effect of undead slaying (my apologies, I know the paper doesn't use those terms, but it's close).

    Using a "world graph", it might be worthwhile to view the object as a node, and view the property of "being a weapon" as a sub-node. From there, the "can use" set of properties would be a sub-graph rooted at the "can use" node rooted at the "being a weapon" node rooted at the object's node itself.

    At this point, the idea of a "world graph" really isn't any more powerful than the categorized lists, but the framework might be (I believe) more flexible if organized as a graph, and the implicit ability to add seemingly nonsensical properties to an element of the world would _almost_certainly_ appeal to the game-designers ("...wow, I just made a door that can be wielded as a weapon once it's torn from its hinges, bet you never figured we could do that..."). And _hopefully_ the framework could do that without modification to the runtime engine.

    *ponders* Yes, sorry. Long post. But in sum, I like the concepts presented in the papers, I'm just wondering if there was any specific reason to truncate it (runtime processing overhead & etc) from a more general approach to runtime polymorphism

    1. Re:Limited runtime polymorphism by Anonymous Coward · · Score: 0

      this is a good post that should be modded up. i liked it very much.

  178. Counting spaces? by cduffy · · Score: 3, Informative

    I've never had to count spaces with python -- and it's been my primary application language for years.

    It's a fine point to try to debate with, until you try to actually use the thing and realize it never comes out at all (as opposed to counting curly braces in other languages, which really has happened to me).

    Further, Python too can be run in a JVM or converted to C.

  179. Re:Learn from experience... use LINUX or UNIX equi by tringstad · · Score: 1
    &nbsp&nbspYou obviously have no idea what you are talking about...

    Funny, I was thinking the same thing about you.

    &nbsp&nbspWhat's the largest code base you've worked on? Ever deployed to 200 servers? 80,000 simultaneous users.... I'm guessing no... and since, traffic wise, Everquest is nearly 1/4 of Yahoo's traffic (and the game logic is much more complicated then a web server) its quite a feat...

    Well, I don't see what the size of a code base has to do with piss-poor administration of servers. If the server crashes, figure out why (sometimes referred to as troubleshooting), and take steps to prevent it from happening again. Period.

    &nbsp&nbspAnd there is no such thing as bugless code.

    This is just wrong, and I don't think you that meant to make such an all encompassing statement. Surely, the more complex code gets, the harder it is to be certain that it is bug free, but to say it isn't possible is assinine. Regardless, if there are outright symptoms of bugs (servers constantly crashing) then you need to figure out why... simply using the excuse that all code is buggy, is lame.

    &nbsp&nbspWhat there is though is the complexity of windows and the relative simplicity of a unix build built to match requirements.

    I am not arguing with this, nor did I at anytime. I am a strong supporter of the right tool for the right job. This includes the right programmers and sysadmins for the job, which is my point.

    &nbsp&nbspblatant MS loving is as pointless and uneducated as blatant MS bashing...

    Please don't bother to put words in my mouth, I am quite capable of making an ass of myself without help. Not a single part of my post was in the slightest bit 'blatant MS loving', or even subtle MS loving. What I said holds true of any Server OS at all, which is why I never once mentioned MS, except to accuse you of slandering them without any evidence (other than the 'I'm not at liberty to say' bit, which if this is truly the case, you should have STFU to begin with).

    -Tommy

    --
    "I got a half gallon of Jack, and 2 dozen Ant Traps. I'm about to get wild." -me
  180. How rapidly must your game be designed? by Anonymous Coward · · Score: 0
    Weather you should use C# or not, really depends on one thing: How rapidly must your game be designed?

    If you are developing a final, "retail" version of a product, and are willing to spend a while coding it, then please stick with C++.

    If you want to quickly churn out a prototype implementation of your game design, C# is probably a better choice. C# is a much more convenient language to work in, as it lack most of the legacy inconsistencies of C and C++. When you have the basics all ironed out, you can re-implement it in C++, for the final product.

    I have done quite a bit of programming in C/C++, C# and Visual Basic. I am currently throwing together a prototype multiplayer game using purely Visual Basic 6.0 (I started it before I got VB.NET). Laugh all you want, but VB has helped me get the implementation down quickly, and fundamental problems are much easier to diagnose and resolve. I promised myself that once I get the basic multiplayer algorithms working properly, I will re-do it all in C++, so it can run faster, better, and on more systems. Of course, this means other problems will crop up, but I think I can handle them.

  181. JVB by leonbrooks · · Score: 2
    (as opposed to counting curly braces in other languages, which really has happened to me)

    Ooh, time for an editor crusade! (-:

    Further, Python too can be run in a JVM or converted to C.

    Knew about Jython (which see-crash can't do for political reasons) but didn't know about C as a compiler target.

    I hope that there will never be a JVB compiler, but would find a VB compiler with Python, Ruby or even something ruder like Java or C for a target highly useful as a stopgap from time to time.

    Cheers; Leon
    --
    Got time? Spend some of it coding or testing
    1. Re:JVB by cduffy · · Score: 1
      (as opposed to counting curly braces in other languages, which really has happened to me)

      Ooh, time for an editor crusade! (-:
      Well, yes, it's a problem I've not had with my own code (I use emacs or vim), but rather when trying to read/maintain others' code. Really damn annoying when the source is indented inconsistantly, such that something *looks* correct when it isn't -- especially using a language like UNIFY's 4/GL without editor support for reindenting and such. With Python, the editor support isn't needed -- what it looks like is what it does.
      Knew about Jython (which see-crash can't do for political reasons) but didn't know about C as a compiler target.
      Not suprisingly -- the optimizing Python-to-C compiler is 3rd-party, not packaged with (or to my knowledge endorsed by) the Python developers. In fact, I don't remember where I saw it... hang on while I look. (There's a really bad one -- a toy, really -- and another that's supposed to be quite good; with my luck if I just said "it exists" folks would find the toy).

      Ahh, I think this is it: http://www.mudlib.org/~rassilon/p2c/
  182. Re:note about TCP: why UDP and not TCP by Anonymous Coward · · Score: 0

    Turn off buffering? Do you mean reduce the TCP window size? That doesn't have much to do with the issues surrounding TCP versus UDP.

    The primary issue is that TCP is guaranteed delivery. That means that if your connection goes south for a second, NO OTHER DATA WILL GET THROUGH ON THAT CONNECTION until packet retransmissions get the originally-lost data through. When dealing with any kind of streaming data - streaming audio, streaming movement keystrokes - anything where an interruption in the data flow is worse than a momentary loss of that data - then UDP is what you want to use.

    Using TCP to stream multiple-times-per-second movement and position update packets will cause all sorts of hiccups and lengthy recovery delays over the Internet, which is why UDP is the protocol of choice there. On massively multiplayer movement servers, there is an additional issue of the overhead of maintaining hundreds of simultaneous connections to a single server. A protocol design that results in a need to bring up and shut down lots of TCP connections can spell disaster for a massively multiplayer online game server because the overhead requirements don't scale well.

    Prototypes on LANs involving a few dozen connections will work great, and lull the dev team into thinking the design's fine. Then you commit to a thousand clients over the Internet and everything goes to hell. Disregard that at your own peril. :)

  183. This is a lot harder than you think. by matthia · · Score: 1
    The eve-online FAQ
    "EVE uses a special Stackless version of Python to implement game logic, both on the server and the client."

    Matti Á.

  184. Re:+1 Wholey Sh$t : by chazman00 · · Score: 1

    If he is going to develop inside the .NET framework and he runs into a problem with C# Libraries, he can always plug C++.NET Networking Libraries in. It is the beautiful thing about the Common Runtime Language.

  185. Re:.NET will soon be the dominant GUI for Linux by Drazi100 · · Score: 0

    yeah, not by choice to be using kludge

  186. Re:Learn from experience... use LINUX or UNIX equi by Drazi100 · · Score: 0

    oh yeah blame "drivers".

    so in the early days when slq server sucked and crashed alot (4.5-6.5). was it bad drivers?

    what are you? another MCSE who doesnt know how an os works?

  187. _Another_ p2c? by leonbrooks · · Score: 2
    I think this is it: http://www.mudlib.org/~rassilon/p2c/

    Argh! Why couldn't he have called to pytusi or at least py2c? There's already a p2c for Pascal which is in wide use.
    --
    Got time? Spend some of it coding or testing
  188. Didn't actually follow the link, eh? by cduffy · · Score: 1

    It's *called* Python2C. Just happens that the directory the web page for it is in is called p2c.

  189. Re:Learn from experience... use LINUX or UNIX equi by pioneer · · Score: 1

    you are comical

  190. Article on "Using Groupings for Networked Gaming" by ontangent · · Score: 1

    Designing Multiplayer Game Engines?
    http://www.gamasutra.com/features/20000621/arons on _01.htm

    sounds like the sort of thing you might like to read for this.