Page 4 of 5

Posted: Fri Mar 09, 2007 11:03 am
by rogerborg
Sure, but you have to admire his passion.

And he does make a fair point; the first thing you should do as part of any "O" game (MM or otherwise) is to design your network architecture. As part of that, you should be able to come up with a ballpark bandwidth figure, and a cost for that.

Posted: Fri Mar 09, 2007 12:31 pm
by WhiskeyJim
Good conversation going on. :) I think I messed up with the shorts in the very beginning when posting this - the intention was to make a game for several (nothing like WoW) users which I could host with some good home bandwith.

I know I look like crap pants now, but I'm still working on it. :)

Posted: Fri Mar 09, 2007 12:49 pm
by Midnight
rogerborg wrote:Sure, but you have to admire his passion.

And he does make a fair point; the first thing you should do as part of any "O" game (MM or otherwise) is to design your network architecture. As part of that, you should be able to come up with a ballpark bandwidth figure, and a cost for that.
This boy knows what he's talking about.

@jim nah its cool this thread was useful.

I was just thinking about how everyone is dragging like a whole 2 posts of mine (you know the ones I mean if not good forget about it)

but if you really cared to look I also have at least two posts of poetry also that might not mean much but how many hard azz people do you know that write poetry?

I know thats way off subject but this thread is trashed anyway so I can at least stop thinking about it.

So please for the love of god try not to single me out and make it as though the thread were about me or flame me more then is nessesary I mean seriously you've all had your shot and fair is fair.

I'm not begging either I'm appealing to your sensability.

besides I'm a leet haxor right? I will pwn joo for teh win!

Posted: Fri Mar 09, 2007 1:21 pm
by Frodenius
pff calm down man...

if you really want to make a nice mmorpg read http://www.devmaster.net articles about eternal land!! ( http://www.devmaster.net/articles/mmorp ... /part1.php ) or the beginners guide how to make a mmorpg. well and the latest might also be interesting for you.

Posted: Fri Mar 09, 2007 2:56 pm
by BlindSide
I used to play on a private WoW server it hosted 30 players and had a 2mbit connection :P

Lost climate you are right on the money with that first reply to midnight, although your networking experience spilled out so fast you had not time to insert capital letters or spaces, quite a pity :P

irrNet uses send velocity so it only sends when the velocity changes (No rotation velocity implemented though, probably not required either :P)
This all gets me thinking, Note to self: Implement some kind of network triggered animators eg RotateOverTime and ScaleOverTime...

@WhiskeyJim, give it a go, you never know! I recommend making the servers distributable so that the customers can run their own servers, that way no bandwidth worries...

Posted: Fri Mar 09, 2007 3:04 pm
by lostclimategames
Was that networking experience comment sarcasm? If not im honored, because i have never even done anything successful with multiplayer, or networking. Thats just all theory from bits and pieces i've read here and there.

Posted: Fri Mar 09, 2007 3:14 pm
by WhiskeyJim
Frodenius wrote:pff calm down man...

if you really want to make a nice mmorpg read http://www.devmaster.net articles about eternal land!! ( http://www.devmaster.net/articles/mmorp ... /part1.php ) or the beginners guide how to make a mmorpg. well and the latest might also be interesting for you.
Hey, thanks for the links man! :)
Blindside wrote:@WhiskeyJim, give it a go, you never know! I recommend making the servers distributable so that the customers can run their own servers, that way no bandwidth worries..
I give this a thought, thanks for pointing that out. :)

Posted: Fri Mar 09, 2007 5:07 pm
by BlindSide
lostclimategames wrote:Was that networking experience comment sarcasm? If not im honored, because i have never even done anything successful with multiplayer, or networking. Thats just all theory from bits and pieces i've read here and there.
Not criticism, you seem to know the technicalities well...

Haha MidNight reminded me of this time when i was beginning when I tried to calculate average network usage by typing "Position: 3242,3243,43242" in a notepad file and copying that line 10 times over then testing the file size hahaha :lol: Then again I am still scared of databases :oops:

Posted: Fri Mar 09, 2007 6:38 pm
by rogerborg
That reminds me, you'll also need to consider a strategy for data serialisation. You don't want to be stalling your server while you load or save player data or parts of the worldstate from/to disk (either in a database or a flat file), so think about how you're going to multithread that, including dealing with any mutexing issues, and how you're going to take backups of the saved data (which again gives you mutex issues; you don't want to be writing to your world state database while you're busy backing it up).

It's one of the few areas where I'd say that multithreading is actually necessary, and the earlier you deal with it, the easier it's going to be in the long term. If you ignore the issue, then you'll just end up putting in a dirty big hack for it later, like freezing the whole game or even having to do regular shutdowns of the server while you backup your database.

Posted: Fri Mar 09, 2007 11:41 pm
by lostclimategames
lostclimategames wrote:
Was that networking experience comment sarcasm? If not im honored, because i have never even done anything successful with multiplayer, or networking. Thats just all theory from bits and pieces i've read here and there.


Not criticism, you seem to know the technicalities well...

Haha MidNight reminded me of this time when i was beginning when I tried to calculate average network usage by typing "Position: 3242,3243,43242" in a notepad file and copying that line 10 times over then testing the file size hahaha Laughing Then again I am still scared of databases Embarassed
well thats how i figured out how many bytes were in a two character string, which i should have already known anyways but i wasnt thinking about it. I honestly have no expirience at all with networking so im kinda flattered that i seem to know the technicalities, I just try to use common sense instead of assuming each player needs to load 100models for itself 2x per second (sorry midnight but im not going to ever let you live that down :) but yep I think a mmo really to be most efficient needs its own network engine, it cant use one of the ones that you'd use for normal multiplayer games. It could but it wouldn't be the most efficient use of bandwidth.

Posted: Sat Mar 10, 2007 3:15 am
by Nodtveidt
rogerborg wrote:That reminds me, you'll also need to consider a strategy for data serialisation. You don't want to be stalling your server while you load or save player data or parts of the worldstate from/to disk (either in a database or a flat file), so think about how you're going to multithread that, including dealing with any mutexing issues, and how you're going to take backups of the saved data (which again gives you mutex issues; you don't want to be writing to your world state database while you're busy backing it up).

It's one of the few areas where I'd say that multithreading is actually necessary, and the earlier you deal with it, the easier it's going to be in the long term. If you ignore the issue, then you'll just end up putting in a dirty big hack for it later, like freezing the whole game or even having to do regular shutdowns of the server while you backup your database.
Some MMORPGs utilize uploading to another local machine for backup. I don't know the details though, sorry.

What I did find kinda funny is the one person who said that they have unlimited bandwidth from their local machine. You're always going to be bound to the size of the pipe, always. Physical limitations will also play a part if the game server is not coded efficiently enough...hard drive access alone can slow down your output. If you think you're going to run even a 100-user MMORPG from your little Dell desktop with 512MB of RAM with 100mbit ethernet connected to your 512kbps cable modem...keep freakin dreaming. There's a damn good reason these games require MASSIVE racks of servers. I had the opportunity to check out the rack designed for eROSE...that thing was bloody huge and worth millions of euros...and the game actually ended up falling flat on its face not long after it was launched (*ahem*, we TOLD them so, but they didn't listen...*whistles*).

Posted: Mon Mar 12, 2007 12:30 pm
by rogerborg
Nodtveidt wrote:Physical limitations will also play a part if the game server is not coded efficiently enough...hard drive access alone can slow down your output.
Thus the point about threading off anything that requires drive access (explicitely, or implicitely using any asynchronous write/read functionality available, while being fully cognisant of the contention issues).

The bigger your server is, the more vital it becomes that it never, ever touch the drive unless absolutely necessary. You can't have it stall for even a few milliseconds while it waits on a drive head moving. That also means that it can't page memory in and out. Everything has to fit in RAM, and stay there.

For a server, it's worthwhile considering allocating fixed size amounts of memory on startup, rather than allocating dynamically on-demand. Memory efficiency is less important (to your clients) than predictabillity. It's better to know that you can handle everything that 100 clients can throw at you concurrently than to write something more efficient that can handle up to 150, but which then begins to page and thrash above that number because you don't know your limits.

Posted: Mon Mar 12, 2007 1:08 pm
by BlindSide
Maybe this can be solved by writing another application that recieves signals in some form (maybe tcp or some windows signalling i dunno) from the actual game and backs up/writes to the database. This will probably save you the headache of multithreading etc (Which sounds kinda hard and I hear irrlicht is not thread safe I dont know if that has anything to do with it). It should also be safer since the second application wont crash along with your game and mess up the database if theres a bug or a hacker.

Posted: Fri Mar 16, 2007 12:59 pm
by StormBringer
The server doesn't need to use irrlicht..

You could thread the server to handle a certain number of zones or clients per thread.

You would only want to send the data to the client at certain points, and inbetween you let the clients do some of the calculations. Example:

--Player 1 starts to run.
Send player 1 position + orientation + action to player 2
Send player 1 position + orientation + action to player 3
Send player 2 position + orientation + action to player 1
Send player 2 position + orientation + action to player 3
Send player 3 position + orientation + action to player 1
Send player 3 position + orientation + action to player 2
[begin block]
client1 predicts movement for player 2 + player 3
client2 predicts movement for player 1 + player 3
client3 predicts movement for player 1 + player 2
[repeat block a bunch of times]
Send player 1 position + orientation + action to player 2
Send player 1 position + orientation + action to player 3
Send player 2 position + orientation + action to player 1
Send player 2 position + orientation + action to player 3
Send player 3 position + orientation + action to player 1
Send player 3 position + orientation + action to player 2
[begin block]
client1 predicts movement for player 2 + player 3
client2 predicts movement for player 1 + player 3
client3 predicts movement for player 1 + player 2
[repeat block a bunch of times]
--Player 2 jumps
Send player 2 position + orientation + action to player 1
Send player 2 position + orientation + action to player 3
[begin block]
client1 predicts movement for player 2 + player 3
client2 predicts movement for player 1 + player 3
client3 predicts movement for player 1 + player 2
[repeat block a bunch of times]

That's just a small example.. But you get the idea.. I hope..
but don't trust the clients calculations too much. People WILL try to hack/break/cheat your game.. The clients are the sheep, and your server is the shepherd, the clients know where they're going, the server makes sure they are going there.. :wink:

This means the server doesnt have to send the data to every client continously 100 times every second..

About Writing to harddrive, you MUST write as much of the data as soon as possible. If god forbid, you have a crash, you can't let players lose progress and items. Worry less about writing data, and more about READING.. You need to keep everything a client can request ready to push out as soon as the request comes.. If another player comes running, the server need to know name, appearance, stats etc. Use a server with ALOT of ram, you need all connected player's data open...

you could precalculate alot of the memory requirements. What is the size of each instance of the player/client class? multiply by number of players on each server.. etc.

Good luck.

Posted: Mon Mar 19, 2007 11:09 am
by ErUs
Please tell me you dont send network data in human readable txt format :O!

<packet header byte> <object id short/int> <float> <float> <float>
15 bytes to change position / velocity..... quite a lot when you think about it......