How does an MMORPG work ?

Started by
11 comments, last by Telastyn 19 years, 2 months ago
I DO NOT WANT TO CREATE AN MMORPG What are it's elements. Sure we all play them, but I was wondering from the ground up, what are the individual parts that make it work. From my limited knowlegde there must be a; 3D engine, network engine, sound engine, server database, server code, particle system and a client at least. What are these elements made from (lets say open source or free/gpl), when compared to that of DAOC for example. How do these elements work together. What is the definition of a client and what are it's roles. What does the server do, and how are it's elements broken down (combat rules, player and world interaction, etc.) In DAOC for example, there must be a huge database which stores information on every item, every player's stats, every house, every monster. Then there must be an element which deals with what happens when player A hits player B, or buys from player B, or talks to player B. I am intreagued to find out how all of this works. Basically, what is each element responsible for, what is it usually written in, what do they typically run on etc.. What languages are the big MMORPG developers using , C++, JAVA, etc.. or a combination, by big i mean DAOC, EQ2, WOW. I am confuddled but amazed really. I know there is a lot of open source stuff, but it's like trying to read Mandarin. I saw an MMORPG (how they work) book in Chapters that i wish i'd bought now.
Advertisement
Before we being, I'll point out I've never actually PLAYED a MMORPG, nor even looked at the code, but I do know programming.

Firstly, you'd have to be clear-cut on what computer you're talking about. The graphics, sound, etc, would be dealt with and displayed via the programming on a client computer.

Secondly, I'd say that a particle system would be part of a larger Physics system, which would reside on the client computer.

Thirdly, a Client is anything, ANYTHING, that requires data from something else (generaly known as the Server). This doesn't limit it to computers, your game engine can have many client objects in it that require housecleaning routines supplied by a corresponding Server object (think Kernal).

Thirdly, you've pretty much described yourself there, when you say they must have a huge database. Now, as far as I can tell, there'd be in fact two "sets" of databases. One would be all the numeric data stored on the Client computer, which would know the attack rating and defense and etc of every object in the game. That's why these games are big hard-drive eaters. The second database would indeed be a huge collection of every single account's data. So each person with a copy of the game (and an account), will have a character, and clothing and equipment, etc. And all of that will be stored on the server.

The interactions between things will be sent along to your client computer via the server, but all the processing of those actions will be done on the client.


I think that addresses some of your questions. For detailed answers, find detail-filled people.
[ search: google ][ programming: msdn | boost | opengl ][ languages: nihongo ]
First I will say I have no experience programming an MMORPG but one of my ways to pass time in life is to study games and figure out how I would do such things.

I assume we're talking about graphical MMORPGS (While I still consider MUDs as simplistic MMORPGS and are quite interesting to investigate, I've done enough reading and programming to understand them, and they are quite interesting)

Ok first off, There's a client, The client is a multithreaded client of course, with threads for Graphics, Sounds, and Networking if not other stuff. I'd have to guess that they develop the code in C++ or something similar. Java is too slow for most games (though it is quite useful) Since most MMORPGS have heavy graphics and at least on Windows, it definatly is using something that is propriaty and links with DirectX and OpenGL, so I assume VC++, of course not .net. Each OS it's ported to will need a different API to do graphics, but this produces a better looking game for less overhead.

Server code is more propriaty, It can really be in any language (I'm assuming they use what ever language can do networking, have tight code, and work on a database) Remember here Speed is 100 times more important then readability as we are dealing with thousands of players) We're looking to have the most amount of players. The database likely has a player table, and a map table, and a Mob table (monster) as well as items, effects, merchants (extention of mob), and other stuff as well as combat rules.

As the player moves around a variety of maps And the networking must constantly be updating it's position on the map. There should also be constant checks to a chat part of the server.

Remember that there might not be one server for each "server" you might be talking to different servers depending where you are in the world (I remember EQ actually could shut down a single zone likely due to a computer needing matinence)

The rules depend on where the programmers want to put it, and find it quickest. The server is likely where it will be but it's possible to put it in the database.

Remember the Server and databases are NOT on the same computer, and the database might be on multiple computers. The amount of computers needed for one of these games' servers would shock you because you have so much load.

Finally the client should also have access to an update server (another computer from all those prior) That verify's your version and updates you with patches (not entirely new files necessarily if possible) on a Per bootup basis. The game will also need to have every player reset their client once a patch if possible.

I just want to meantion I never did program one, I just have spent hours considering how I would do such a thing. I'm sure I made a couple mistakes but that's how I'd tackle it.
Why VC++ and not VS.Net 2003 for example.. I have a copy of .NET 2003 which I was compiling a copy of Ogre's 3D engine.

What is the difference between C++ and .NET ? and can Visual Studio .NET 2003 do both/either ? I do not understand.
I was talking about the project type, not the compiler itself. I believe all VC++ systems can still do a non .net system. The difference is in librarys and overhead. In addition if you want to port something it's impossible to do so with .net functions.

Finally When you program with a .net project you require the users to use .net framework on their system. It's really quite wasteful and stupid to require a user to install any thing more then directX unless essential(every addditional installation on a users computer will annoy them a bit more) in addition .net framework is not available on many versions of windows. Games should be made to allow the most users.

But if you set up your VS .net 2003 project correctly (choose a project that doesn't have (.net) after it) you should be fine.
Quote:In addition if you want to port something it's impossible to do so with .net functions.

Wrong. (Consoles aside... not many MMORPG's on consoles though)
Quote:It's really quite wasteful and stupid to require a user to install any thing more then directX unless essential

Really? I guess we shouldn't use OGRE, or Newton, or any other extra libraries then.
Quote:every addditional installation on a users computer will annoy them a bit more

Silent install. They don't even notice.
Quote:in addition .net framework is not available on many versions of windows.

Wrong. Unless your looking for 3.1 support...

Just my general purpose "dont use .NET" rebuttle... Thanks for listening.
Quote:Original post by kinglink
Ok first off, There's a client, The client is a multithreaded client of course, with threads for Graphics, Sounds, and Networking if not other stuff.


this is incorrect. a MMORPG does not need any more threads then any normal game, except maybe for the networking part.


Quote:
Since most MMORPGS have heavy graphics and at least on Windows, it definatly is using something that is propriaty and links with DirectX and OpenGL, so I assume VC++, of course not .net. Each OS it's ported to will need a different API to do graphics, but this produces a better looking game for less overhead.


why would each OS need its own graphics API? OpenGL works on both Linux, Mac, and Windows. also, VC 6 and VC.net are both compilers, not languages.

Quote:
Remember here Speed is 100 times more important then readability as we are dealing with thousands of players).


this is once again misinformation. speed is NOT 100 times more important then readability. speed is actually not really much more critical on a MMORPG server then it is for any other game. you write them to be as optimized as possible and you make it as scalable as possible. you should NOT sacrafice readability for speed, no matter what.

also, a good MMORPG architecture should be scalable. this means that it should be designed to work on multiple machines if nessasary. for example, a commercial MMORPG could have one machine / server program instance running which operates strictly on a set of maps or a "zone". this PC only has to worry about that zone. if more players start playing the game, then you can simply add more PC's to the "shard" to spread out the zones better. i believe Everquest does this architecture, and its how my game works [grin]. of course there are other architectures then this one that can make things scalable.

Quote:
There should also be constant checks to a chat part of the server.


you really dont need to "check" for chat. a player sends his message, the client sends it to the server, the server bounces it back to the clients who need it.


Quote:
The amount of computers needed for one of these games' servers would shock you because you have so much load.


its really not very many PC's to run a commercial MMORPG, i cant remember numbers off hand, but maybe someone here more knowledgable then me can post them.

@the OP

the question you are asking could fill a book really. if you are really interested in it, check out an open source MMORPG like Eternal Lands. if you have more specific questions then just ask and either i or someone else can try to answer them.
FTA, my 2D futuristic action MMORPG
It depends what OGRE and Newton is for (haven't seen it yet) but from what i understand, .net is a Microsoft only format. Is it possible to port it to Linux, and MAC OSX (not using a "hacked" format similar to the wine system (which is good but isn't a licensed version of windows), but using 100% legit programs (don't know the word I'm going for here but I'm sure you understand what I'm mean))

To install .net framework it's hardly a silent install,From what I've seen. I'm not sure about the others you meantioned but you have to manually go through licensing agreements for the .net Framework (as far as I understand it, I haven't done too much with the install programs just yet, and not showing that license probably violates Microsofts agreements)

I'm sure we've all installed software (VS 2003.net was the most recent one for me) where you have to install 4-5 different programs just to get the program to work, which I will accept for a heavy duty piece of software, but I would scream out if a game forced me to accept so much. That's what I was basically talking about.

I wasn't saying .net is bad, just not right for portability but maybe I'm still a bit behind in understanding this concept.
Something that often gets left out is a strong web site that allows for checking of server status, forums, and of the most important piece getting playes credit card information. Other than that the may trick would seem to making sure your code is scalable.

Don't get hung up in the .NET vs. C++ or OpenGL vs. Direct X, these are all side issues when it comes to creating your MMORPG. Either choice could be made to work.

Glen Martin
Dynamic Adventures Inc.
Zenfar
Quote:Original post by kinglink
It depends what OGRE and Newton is for (haven't seen it yet) but from what i understand, .net is a Microsoft only format. Is it possible to port it to Linux, and MAC OSX (not using a "hacked" format similar to the wine system (which is good but isn't a licensed version of windows), but using 100% legit programs (don't know the word I'm going for here but I'm sure you understand what I'm mean))

To install .net framework it's hardly a silent install,From what I've seen. I'm not sure about the others you meantioned but you have to manually go through licensing agreements for the .net Framework (as far as I understand it, I haven't done too much with the install programs just yet, and not showing that license probably violates Microsofts agreements)

I'm sure we've all installed software (VS 2003.net was the most recent one for me) where you have to install 4-5 different programs just to get the program to work, which I will accept for a heavy duty piece of software, but I would scream out if a game forced me to accept so much. That's what I was basically talking about.

I wasn't saying .net is bad, just not right for portability but maybe I'm still a bit behind in understanding this concept.


i dont think you understand what VC .net is. it is simply a C++ compiler, and nothing more. you do NOT need to have the .net framework to run code that was compiled with this compiler. it is simply an updated (and much better) version of VC 6.
FTA, my 2D futuristic action MMORPG

This topic is closed to new replies.

Advertisement