LGPL'ed MMORPG network engine

Started by
7 comments, last by AI_the_rapman 20 years ago
download the source only at: http://www.plenware.fi/~luolin/DirectNet.rar
Advertisement
hello, how many of you have downloaded the source only of my MMORPG network engine? does the engine make sense at all? if you have any questions concerning the engine, please post your comment here. I do hope that you will find something useful in my network engine.

cheers!
also, I would like to give some performance analysis during my testing of the engine

on a dual xeon server system (which altogether has 4 virtual processors, thanks to Intel(r)''s hyperthreading technology), it accommodates 2048 simultaneous clients connection with each client having about stable 200kbytes/second thruput on a LAN environment. the test server is essencially a echo server, which echoes the client packet back to the sending client (packet sizes are randomly generated by test clients), the test clients send randomly generated packets to the central server, and waiting for server reply, after getting the reply, the client send another randomly generated packet, and so on. the client crowds are generated by a spawn program, which spawns 2048 instances (client processes)

if you have already read the code implementation somehow, and if you are somehow familiar with DirectPlay8+, you will find that the design of the API of both engines are essencially the same, so, if you are familiar with DirectPlay, you will find no difficult get used to DirectNet (which is my invention , and DirectNet is much simpler to setup.

post your questions, comments, they are most welcome!

cheers
Hello, i was wondering if you could/would port that into VS.NET 2003 for me, i'm prety sure im not supposed to do this but, can you fix up my code for me, it dosent look like a big job, i can pay you something through paypal, and if you could can you also leave comments to guide me through it. sounds pathetic but i really am getting disperate, so could you help me?

ps. its probrally only an 1 or 2 to fix up, for me on the other hand probrally a couple weeks. plz, bye.

My Email: Warvstar@shaw.ca

[edited by - Warvstar on March 21, 2004 1:36:25 PM]
The challenge in MMORPG is not the networking, it''s in the figuring out what data to send to whom when. Just getting your own data back is useless -- you need to see what''s all around you.

Doing that, while the other players keep changing the state of the world, is the challenge.
I dont know who your replying to, but in my Client/Server Experiment, all the data is persistent through hashing or something, but it only last while the payer is online. if that is what you meant?
In the shipping MMO engine I''m working on at work, one big challenge is figuring out what data to send to each client. You want to send data about entities that are close to the client, for example, but not data that concerns entities that are far enough away that the client can''t see or reach them. This of course gets more exciting if you use a baselined lockstep network model, and if you allow entities to move with high velocities.

From what you described, it sounds like you just echo back data without any specific filtering or processing to solve this problem. Maybe it''s not so; I don''t know because I haven''t looked at the engine.
enum Bool { True, False, FileNotFound };
Ok, I think I''d better make myself clear - the engine itself is only about networking, and the questions about to whom or at when should any packet be sent is mostly your game specific design.

DirectNet, like DirectPlay, only offers high performance packet oriented reliable sending and recving services, as if you have read the code, it is based upon windows completion port and overlapped io, as well as thread pooling technologies. How you will be using the DirectNet API in your own game to send and recv packet over the network highly depends on your own game specific needs. DirectNet does NOT contain any game specific logic. While DirectNet extracts sockets, completion ports, overlapped io, thread pooling (quite nasty stuff) away from the user (DirectNet has a quite easy to use API), it also actually, again like DirectPlay, defines a more reasonable way to handle asynchronous event over the network by using the asynchronous event handler.

events like new incoming connection requests, incoming packets, are all asynchronous events to user application, polling for those events in a traditional way is bad practise. instead of application polling for those events, DirectNet clearly defines callbacks to let the user application get ready to handle any asynchronous events, if any. refer to iDirectNetServerEventHandler for more detail.

if you would like to discuss how an MMORPG would behave concerning message communication mechanism, we could open up a new thread for it

about the source only, here is some advice how you could build up your own DLL out of it (DirectNet is actually developed and tested under vs.net 2003, and it originally were two DLL''s):
1. create an empty solution
2. add two DLL projects to the solution, be sure in C/C++, choose multithreaded debug/release for both projects - DirectNetServer and DirectNetClient (yes, they are separate projects)
3. add DirectNetServer.cpp to DirectNetServer DLL project;
add DirectNetClient.cpp to DirectNetClient DLL project;
4. be sure you have set your compiler path correctly, so the compiler finds DirectNet.h for both projects;
5. you should be able to build both DirectNetServer.lib/dll and DirectNetClient.lib/dll.
6. in your own MMORPG, use DirectNet.h and your just built DirectNetServer.lib/dll and DirectNetClient.lib/dll

NOTE: DirectNetServer and DirectNetClient must be used together, because there is some simple protocol (DirectNetProtocol) over the TCP connection.

NOTE2: if you would like to have DirectNetProtocol packet header encrypted, inherit and implement your own DES algorithm. otherwise, use the default implementation provided by iDirectNetCryption (do nothing actually)

what else am I missing? again, post your questions, bug reports here

Ok, by mistyping "extracts sockets, ..., away (quite nasty stuff) ...", I actually meant "abstracts"

and yet another note: BE SURE that by using multithreaded DirectNetServer and DirectNetClient dll''s, you must set your own projects to be MULTITHREADED (under c/c++ code generation of your project property)!

cheers!

This topic is closed to new replies.

Advertisement