Server development
Forum rules
This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.
Its current use is for the continued development of the server and game it has always served: TMW Classic.
- Bjørn
- Manasource
- Posts: 1438
- Joined: 09 Dec 2004, 18:50
- Location: North Rhine-Westphalia, Germany
- Contact:
Server development
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:
-> 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.
-> 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.
- Bjørn
- Manasource
- Posts: 1438
- Joined: 09 Dec 2004, 18:50
- Location: North Rhine-Westphalia, Germany
- Contact:
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:
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.
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.
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.
PS: Whatever scripting language is decieded it should have some debuging support.
- Bjørn
- Manasource
- Posts: 1438
- Joined: 09 Dec 2004, 18:50
- Location: North Rhine-Westphalia, Germany
- Contact:
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.
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 ?
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 ?
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
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
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..
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..
This may also be intresting http://lists.gnu.org/archive/html/nel-a ... 00039.html
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.
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!
UDP and firewall...
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...
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