Server development

Content and general development discussion, including maps, quests, and server code from the development team.
Post Reply
User avatar
Bjørn
TMW Adviser
TMW Adviser
Posts: 1430
Joined: Thu Dec 09, 2004 7:50 pm
Location: North Rhine-Westphalia, Germany
Contact:

Server development

Post by Bjørn » Mon Mar 07, 2005 11:30 pm

While we keep working on improving the client in the 0.0.x series, we have been discussing the development of our own server, which will be developped in parallel until it is ready to be used. Several loose documents have been written about aspects of the server and the protocol used. I've now added a page to the Wiki that puts down the global idea, the main components in the server:

Image -> http://themanaworld.sourceforge.net/wik ... evelopment

While I know it doesn't go into a lot of detail yet, I'd appreciate any input on this. Especially from developers that plan to work on the server/network part.
User avatar
maci
Warrior
Warrior
Posts: 507
Joined: Sun Dec 05, 2004 9:01 pm
Location: Germany
Contact:

Post by maci » Tue Mar 08, 2005 2:40 pm

finnaly a thread which is relevant for now.. and not all that endless discussions about features.. btw the wiki page is interesting...
ElvenProgrammer wrote:Maci: don't be rude, we're here to help people ;)
User avatar
Bjørn
TMW Adviser
TMW Adviser
Posts: 1430
Joined: Thu Dec 09, 2004 7:50 pm
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn » Fri Mar 18, 2005 1:38 am

I've now committed the interfaces of some of the network classes to CVS. Here is a small diagram visualising how the core network layer classes fit together:

Image

In a short summary: The NetSession deals with keeping track of most of the low level stuff going on. Whenever something happens on a socket, an event is generated and called on the appropriate ConnectionHandler instance. This class will deal with higher level stuff, like connecting/disconnecting clients and routing incoming messages. The incoming messages are routed to MessageHandler instances that have registered themselves to handle certain types of messages. The messages will be encapsulated in a class that provides a convenient method to get to the information in the message.
Him
Peon
Peon
Posts: 6
Joined: Sun May 15, 2005 12:42 am

Post by Him » Sun May 15, 2005 1:15 am

enet.cubik.org provides reliable UDP, i have played a FPS (cube) that uses enet and its networking is great(very fast paced fps 16 players on dial up with no noticeable lag even when sniping,on my 56k). No matter what the game it has advantanges over TCP, and is easier to use.. The license makes it more or less public domain, as long as you don't claim it for as your own creation. Its also very lightweight and portable(even Mac). I wub the enet.

PS: Whatever scripting language is decieded it should have some debuging support.
User avatar
Bjørn
TMW Adviser
TMW Adviser
Posts: 1430
Joined: Thu Dec 09, 2004 7:50 pm
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn » Sun May 15, 2005 10:45 am

Yeah I've read about ENet and especially when we keep the kind of directly control we're using now it could be a good choice. I think they should work towards a release though... I'm reluctant to start using a library that's only available from CVS. We have decided to keep using SDL_net for now and maybe switch later.
User avatar
Rotonen
TMW Adviser
TMW Adviser
Posts: 3154
Joined: Wed Sep 08, 2004 8:48 pm
Location: Espoo, Finland

Post by Rotonen » Sun May 15, 2005 10:52 am

Perhaps we should start to email the devs there and bug them about releases..? :roll:
User avatar
Usiu
Peon
Peon
Posts: 15
Joined: Sun Mar 06, 2005 7:39 pm
Location: Poland
Contact:

Post by Usiu » Sun May 15, 2005 12:21 pm

I dont think UDP can reliable deliver packets, especialy on a crowded networks. Thats why UDP is often used in FPP than in any ORPG.
What's more I dont think implementing tcp like flow control over application layer is faster than tcp support implemented by your OS.
Do you know any crowded and popular mmorpg that uses UDP ?
User avatar
Verious
Peon
Peon
Posts: 42
Joined: Sat Apr 23, 2005 8:31 pm
Location: Online
Contact:

Post by Verious » Sun May 15, 2005 5:23 pm

Most UDP implementations build a reliable messaging stack on top of the UDP protocol, essentially simulating TCP for packets that require reliable transmission. This has the advantage of being able to send reliable and unreliable packets when appropriate.

There's an interesting article about Half-Life that discusses TCP vs UDP here:
http://www.gamasutra.com/features/20000 ... er_pfv.htm

There's also an interesting Postmortem on the lessons learned in X-Wing vs Tie Fighter here:
http://www.gamasutra.com/features/19990 ... oft_05.htm
Him
Peon
Peon
Posts: 6
Joined: Sun May 15, 2005 12:42 am

Post by Him » Sun May 15, 2005 5:23 pm

I have not played many mainstream mmorpgs because i dont have a credit card/bank account, but don't u think they implemented something like reliable udp into TCP, but made it more general use rather then tweaking it for game performance(enet has multiple channels which can be treated like multiple connections, if one packet is lost it doesnt have to stop the entire game from recieving any packets, and discarding packets till it gets the one it wants,hell u could give every mobile there own channel, there are other improvements here to)...

PS: you can download enet from the webpage http://enet.cubik.org/download/enet.tar.gz , and i don't think there are any bugs. there is a oddity or two about it but once you fiquare them out they do not hinder you..
Him
Peon
Peon
Posts: 6
Joined: Sun May 15, 2005 12:42 am

Post by Him » Sun May 15, 2005 8:28 pm

User avatar
nym
Novice
Novice
Posts: 116
Joined: Wed Aug 18, 2004 11:01 am
Contact:

Post by nym » Mon May 16, 2005 1:00 am

You may also want to note that pretty much all massively scalable MMO network engines use a customized protocol based on UDP. The reason for this is because: TCP has some redundancy when used with IP and that it has features which aren't used in a game. By implementing a custom protocol based on top of UDP the packet header size is severely reduced and allows more throughput for more essential data (ie. game data).

I suppose we should probably check out a few of the custom networking libraries available which are based on UDP, it would also be nice to decouple the server from SDL.
YOU ARE READING THIS!
User avatar
criptos
Peon
Peon
Posts: 75
Joined: Tue Sep 20, 2005 5:00 pm
Contact:

UDP and firewall...

Post by criptos » Tue Sep 27, 2005 9:08 pm

UDP protocol isn?t very firewall friendly.

UDP packets also is the first packets that policy based routers drop.

I rather stick with TCP, and for many players 1000++ split servers... :)
May the Source be With You
Post Reply