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: 09 Dec 2004, 19:50
Location: North Rhine-Westphalia, Germany
Contact:

Server development

Post by Bjørn » 07 Mar 2005, 23:30

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: 05 Dec 2004, 21:01
Location: Germany
Contact:

Post by maci » 08 Mar 2005, 14:40

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: 09 Dec 2004, 19:50
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn » 18 Mar 2005, 01:38

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: 15 May 2005, 00:42

Post by Him » 15 May 2005, 01:15

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: 09 Dec 2004, 19:50
Location: North Rhine-Westphalia, Germany
Contact:

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

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: 08 Sep 2004, 20:48
Location: Espoo, Finland

Post by Rotonen » 15 May 2005, 10:52

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

Post by Usiu » 15 May 2005, 12:21

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: 23 Apr 2005, 20:31
Location: Online
Contact:

Post by Verious » 15 May 2005, 17:23

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: 15 May 2005, 00:42

Post by Him » 15 May 2005, 17:23

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: 15 May 2005, 00:42

Post by Him » 15 May 2005, 20:28

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

Post by nym » 16 May 2005, 01:00

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: 20 Sep 2005, 17:00
Contact:

UDP and firewall...

Post by criptos » 27 Sep 2005, 21:08

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