MMORPG? lol

Hey guys, I am new, just signed up :stuck_out_tongue:
I have been following along with quite a few threads and decided it is time for me to post.

ok so to start off, I do want to make a mmorpg(doesnt everyone?) lol

and yes i do know that there is a ton of stuff involved, and the competition out there is crazy.
with WOW, guildwars, DDO, and lots of others.

I have been programming computers and games since i was 13 (i am 38 now)

I do realize that to get more than 10 - 20 players in a game working together you need some good bandwidth but that would be a good test environment to start off.

ok so to my question. (one thing i love about this forum is that no matter how far fetched someones goals, i haven’t seen anyone flamed lol)

so i’ll toss around a few ideas and realize i am hunting here for some input.

I plan to use postgresql database backend.
the server will auth people’s accounts (user connects to server and server queries the database for thier info.

the flow would be somehting like:
login screen
log into server
Get account info from database, characters etc
If there are characters goto character select screen
If there are no characters goto Character creation screen
When done making a character, goto character screen
enter world:
get character data from database, (zone they are in and position etc);

load area:
read mapfile, static objects <<Database
Cache actors from database (load the base models) <<Database
load zone models <<Database
Fade in scene

GAME LOOP:

Request actors and positional/state data from server (Radius around character)
render GUI
check keyboard input
check mouse input
check GUI events
check game state (environment state) >>Server
check for server messages

I really just want to make a game where you can get quests, kill stuff, do pvp, and have your friends join you and do the same, help you , etc etc.

so i get, and have ideas, on allot of this stuff.
but i was curious as to what type of network model would be best for this type of game.

one of my ideas from my notes was:

server side
Keep zone state, mobs etc, everything about the zone to update clients as
they log in.
Zone objects and static npc’s are built at zone in time.
Client has a radius they can see, requests to move in a direction, and server
updates client position as well as npc/mob locations.

this model would probably require the server to be running the game, and zone(s) to give the clients updates i think.

Also i read the thread on DistributedNode(s)
and i am studying the code David has for the 2 example server/client setup. I love the DistributedSmoothNode (server2) example, that is basically what i am looking for but i have yet to decipher and fully understand what is going on in the code. I will have to look further into it.

so i guess my main question is:
should I use DistributedSmoothNode type network topology for a game that expects to have many players interacting together and multiple zones in play?

Again thanks for listening to my ramblings and welcoming me into your community!

Cody

Hi, welcome!

Sounds like you have a pretty good grasp of the fundamental problems involved.

As to whether you should use the DistributedSmoothNode and its related systems, I cannot say; but this system was designed originally for the MMO Toontown Online, and subsequently used for the MMO Pirates of the Caribbean Online. So it can do the job in principle. However, the full implementation is unfortunately not part of the public Panda3D distribution; in particular, it lacks the high-bandwidth and high-security server. So you might still have some issues to face ahead of you.

David

For networking systems you can always use something like asynchore (or if you have a good understanding of sockets aswell as exception catching then build your own asynchore using python’s socket module the same way I am)

Soon enough I will release a fully extend-able python server and client that are pure-python and can be extended via adding packet handlers (via plugins that are automatically loaded) I realize, much as David said, that nobody has used this for a professional MMO yet, as opposed to panda’s distributedNode system, so I shall be the first to test this. However it may be a viable option for your networking as well.

I’m actually doing something similar to what you are doing Zaneiel. It’s a ton of work, but it’s fun and enjoyable :slight_smile:

Regarding the networking bit, what other methodologies have you considered?

Thanks for your input guys.
Really i haven’t tried any solutions yet i am just trying to get my head around it. Also fishing for “what do others do”

If Disney uses something similar to distributednode then it makes sense to me.

and thanks to David’s examples, I have something to work on.
I’ll play around with it and get something going.

I love that we have a forum like this to be able to ask, discuss, and share. I love this community already!

Once I get something workable i’ll post some code or example. It could be a while though time permitting.

Cody

Well please dont get me wrong but thats not a MMORPG you want to develop. It is “just” a MORPG. I am a bit huffy if I read “MMO”. In most cases the limit of “standard” implementation is easily reached and for me a MassivMultiplayerOnline implies more than 20 or 100 clients.
There are some solution around which can handle more than 100 clients. Maybe you can get some useful details from projects like mangos. But even this project is not really abled to provide “MMO” because it started as a singlethreaded concept.
I do not know if the source of eve-online is somewhere aviable which is using stackless python but maybe you can find it somewhere.
Furthermore there are some “MMORPG-Maker” around. It is possible that one of them meets your requirements.

I hope you can find something useful with these catchword.
General speaking i would say using postgresql is a good idea and in principle your concept should work.
For an onlinegame like this is no other reasonable way than running the world on the server and using a master->client topology afaik.

To put it into a nutshell, please do not call ever multiplayeronlinegame a MMO and stay with your general concept which should work for your purpose.

The client limit is more hardware related than software. I built really basic client/server networking code with threading for Panda and it works really well.

Yes you need to code efficiently to make it consume the least amount of server resources, but if you’re careful it’s not too difficult to do. More time consuming than anything.

Well, I did mean Multi player online game, but what if it catches on , like passed around through facebook etc and people get adicted to it / like it. Then your in a different boat if say 200 - 300 people wanted to play it etc. but i guess if you have hundreds of people wanting to play your game, thats the least of your problems lol i suppose that is a good thing. I will make my project modular of course, and if i get to many players i guess the modules could be re-written and swapped out if necessary and hardware upgraded etc.

Anyway I realized early on that before i could even make any levels, rules, etc etc, I have to figure out the model i need to follow. So that means Network and database programming first, character model / scenery and buildings later lol.

So Canadian: When you say networking code with threading…
Does that mean when a client connects to the server a new thread is spawned to handle them? I would like to see your code to get an idea how you handle things. I do like simple. Especially in a project like this, anything simple is great and lets me move on to the next task. There is allot to do after the bulk of the programming is done, Quests need to be written, models need to be made, etc etc. And of course many hours with my guitar and recording software to make more music hehe. All fun stuff of course though.

I’d advise atleast giving Panda’s distributed system a shot. It handles all the listening and communications for you … you just have to follow the rules of the datagrams that you define within the system.

I couldn’t even get a threaded TCP server working for my core game logic in Python but have a lot of the groundwork done now since I started to use Panda’s distributed system. I’ve playtested half a dozen connections with minimal latency on a box that was also playing the game and a connection with a 128 upstream. Our goal is 64 connections for PVP battle scenarios on a 1mb upstream line … dunno if it’s possible for us but we’re sure gonna try.

The built-in panda ConnectionManager modules use threading automatically. I spent a week going though the entire module and related modules just figuring out how it works and setup a simple client/server TCP connection.

I posted the code of how to use the connection manager and setup a basic client using the TCP protocol with Panda. Took a while to make it work because the stuff in the online manual doesn’t really give you much for sending data to a specific connection, which is essential in a multiplayer game. I put a way to deal with it in the code I posted, but it’s still pretty rough:

Click here to get the code

That’s what I’m doing now. The DistributedNode code is really cool, and it’s probably the best way to get a multiplayer game working. I’m working through it all to figure out how to get it working, and it completely automates the code that I spent a week working on above lol. But trying to setup a connection manager myself taught me a ton about how Panda functions so I think it was very useful.

veto, proof: networklibsbenc.sourceforge.net <- there is a test which compares different C++ networklibs. There is a testcase for the “distribution” or “sync” approaches of the libs. The clientlimit very different for the libs. So its a softwareproblem too. Furthermore one thread per client is very consuming and introduce a massive overhead and i.e. linux limits the number of open sockets per application.
But I guess for the prototyping part Panda’s distributed system will be perfect.

But it’s a huge limit number, something like 10,000 for the lowest distribution. Some distributions like FreeBSD and Solaris can handle way more, and just about every linux version should be tweakable to increase the limit.

However, if you are at the point where your game is having 10,000 connections simultaneously, then you’ve probably got over 100,000 players and a huge pile of revenue that you could invest into a cluster server architecture and easily bump up the limit to a stupid level. Take 1 month’s worth of revenue and dump it into hardware upgrades and you could easily handle way higher volume.

Seriously…if you are consistently getting 10k players on, that’s at least 100k accounts. If each is paying $15/month, that’s $1.5M in monthly revenue. Hire a really good Sys Admin and a Network Programmer that specializes in Python and give them a stupidly high budget and tell them “FIX IT NOW” and you’ll be fine :wink:

Sorry if I insult you but did you ever try to develop a software which does not only support multithreading but really scals in a resonable way with the number of threads/cores?
Spawning threads is only the first step and i guess most of the people are inexperienced. So in most cases they are too careful which leads to applications which runs slower on a multicore with multiple threads then on a singlecore with only one thread. Or they misses racecondition etc which leads to completely strange behaviour.
I do not know how it is to remodel a pythonproject but for a C++ project which is designed as a singlethread project it is hard to change it to really benefit from multiple cores.
Of course multithreading is no rocketsience but it is not as intuitive as many other things with panda3d+python.

But for this usecase singlethreaded + distrubitionsystem of panda will be fine i guess.

Correct me if I’m wrong, but from what I made out of the DistributedNode videos it sounds like both Pirates and ToonTown run it and they have several thousand clients connecting to it.

That should tell you it’s a workable solution. It may not scale as well as other options do, but in theory it seems like a very logical system to use.

Besides, if you get to the point where you are having too much server load, that means you have a lot of people using your game (assuming you code it well), which means you should be making some money off it, which means you can actually invest that revenue into making it work better :slight_smile:

Did i ever say, that DistributedNode will not meet the requirements of this request?

No, and at no point did I accuse you of doing so.

You guys seem to know a lot about the distributed networking system. could you tell me what code makes up the server?

if we knew this we could rewrite the server to be capable of MMO games

Hi NetworkedMMO, I thought I should discuss a few things, the distributed node is built on top of non-blocking IO sockets written in c++ most likely.

I can tell, by your posts (and by your name :wink: ) that you’re really interested in building an MMO, I want to point out some really big points…

first off, the panda3d networking system is only limited to 900 clients. (900 being because the current Linux kernel is compiled only with support for up to 900 sockets on the same port) other than that the scalability you will run into are CPU and memory, assuming you where serious about building an MMO you could easilly get a quad core > 3ghz or an I7 to handle all your CPU intensive tasks, which should allow for up to about 700 clients assuming you’re doing CPU-intensive things in another thread (or distributing it across the CPU) Now as for memory, servers contain less data than you think, unless you’re loading thousands of maps, you could also easilly get four gigs of ram that would be more than enough for 700 clients. In fact, four gigs of ram could support around < 1800 clients as an estimate.

Now I can tell you’re really interested in doing this if you’re still reading this reply :wink: I’d like to point out that odds are, unless you have a team of at least 7 developers and artists that are extremely dedicated that you will never hit around even 100 clients in a year or so.

If you want to build an MMO, you have much much bigger area’s you need to address before you should even concern about scalability. You’re going to need serious artwork, music, sounds, you’re going to have to lay out an entire gui system, you’re going to need AI, collision detection in several area’s, you’re going to have to design a decent camera if you want people to like your game, and to top it all off you need to think about gameplay, skills, how things will effect each other in your world, and so forth.

I know I sound incredibly discouraging to you, so I’ll inform you that all of this is from someone who has experience in this area. If you’re going “Oh well I can ignore models for now, and oh that’s dumb right now I just need networking code…” then you are completely un-serious about building an MMO, and that’s OK, if you want a simple game that is fun and has no ‘great’ artwork or anything, then you can get away with building a game about the size of Roblox (if you’ve ever seen it) or so. However unless you are entirely serious about building an MMO (and you focus on artwork, game play, music, AI, camera motions, etc first) then there is no way you will ever exceed 900 clients at once, and there is no reason you should have to worry about making the panda networking system scalable across multiple machines.

I’m simply stating you should focus on a simple - ‘non-scalable’ MMO that can only support 700 clients, and then when you actually have 700 people wanting to play your game that you made you can work on your scalable networking system.
Otherwise you had better have at least 7 very talented artists and coders that can and will build this MMO with you.

I hope you have a great day and I am looking forward to getting a look at your game if your goal is accomplished

~powerpup118[/u]

thanks powerup118
I think i’ll wait on the server for now if you can really do 700 clients on one decent machine.

I am serious about making an MMO, and i do expect it to take quite some time.

eventually i intend to release the game as open source, but only once i have something to show for it.

maybe a community MMO would spark development of a better server.

thanks again