The currently provided public server implementation is suitable for small multiplayer games, but probably wouldn’t scale well to a massively multiplayer game. And Disney’s not going to open-source its OTP server, no matter how nicely you ask, at least not anytime soon. Sorry. We already tried, and got shot down.
But you (and anyone else) are certainly welcome to write a public server for Panda’s use that would scale to massively multiplayer games.
I am not much of a programmer myself, i really have little-no good experience, but i would be willing to see what i can do with the code.
what code is there already concerning the small server/ client. what language would you reccomend for a server, and what does the server need to do other than connecting to clients (through sockets or python or something?).
The existing server is written (almost) entirely in Python and can be found in direct/src/distributed/ServerRepository.py.
All the server needs to do to is connect to clients and send messages back and forth. And keep track of the state of DistributedObjects. That’s what ServerRepository.py does. In the case of an MMO, it has to do this blazingly fast. That’s what ServerRepository.py probably doesn’t do (though I don’t think anyone has measured its actual performance).
If you’re not a strong programmer, you would probably do well to use the existing ServerRepository.py until you understand it really really well, before you tackle the problem of making it better.
so, if i make a game with the current server, then wirte my own server based off the existing one, will i have to change the rest of my code?
if it will work without changing my code, i think i will make my game, then develop a server, based on the existing one, but probably written in a more scalable language. (Erlang, C++)
All the code is in the Panda source tree. You can look at ServerRepository and see what it imports.
I doubt you would be able to implement a new server without any changes to your client code at all, but probably the changes would be minimal. ServerRepository.py is designed to work more-or-less like Disney’s ultra-efficient OTP server, after all, and programs that are written for the one would probably run with only minimal changes on the other.
where would i find the CMU LAN server? ServerRepository.py says it is for use with it. I am having trouble finding the LAN server, to base an MMO server off of, following it for a design, adding scalability and efficiency.
Hi, I wrote a opensource MMO-network lib myself. Maybe it will help you to pick some stuff out or just merge it with panda3d: syncsys.sf.net . I will add “non-reliable-protocol support” soon, so using syncsys with a UDP based lib will benefit from the non-reliable stuff.
But maybe this system is not suitable for a panda application because its maingoal is to provide a library which scales well with the number of cores/threads. For some test of the system take a look at networklibsbenc.sf.net (have to update this side…).
Afaik CPython has a GIL which makes python unable to really benefit from multiple cores but maybe stackless python is a solution for you. Or you implement the server as a C++ app with embedded python and the client as a python panda3d app.
jython has no gil either and for cpython guido says you should use processes instead which could giv even greater scalability because you can use different machines…
Well i know the concept of using multiple processes but this introduces a bigger otherhead and you have to use shared memory or serialize every information which has to be published to the other processes. So there is a reason why most application uses threads instead of processes.
But of course if cpython is the only solution processes would be fine .