Page 1 of 1

EasyNet

Posted: Thu Apr 14, 2005 12:19 pm
by schick
Hey guys,

i wrote an easy to use wrapper over RakNet. If you have ever had problems setting up network in your game, have a look at those 4 little files. The zip archieve includes everything, which is needed of to set up networking in a msvc or devcpp (mingw) environment. Well you might want to have a look at the example here:
http://www.allaboutschick.com/files/eas ... ample.html

Got interested? Well grab the archieve here:
http://www.allaboutschick.com/files/easynet.zip

Best regrads,

schick

Posted: Thu Apr 14, 2005 1:40 pm
by Dingsi
And can you say why one should use EasyNet instead of using RakNet directly? I didnt examine your source very well but the pieces at the example page I've sawn arent looking easier than RakNet to me.

Oh, you're german. :D

Posted: Thu Apr 14, 2005 4:54 pm
by Vox
Dingsi, your photo looks great. I'm not far away from you, only 300 KM :twisted:

Posted: Fri Apr 15, 2005 3:53 pm
by Dingsi
Vox wrote:Dingsi, your photo looks great. I'm not far away from you, only 300 KM :twisted:
Who said its a photo? :?

Posted: Sat Apr 16, 2005 4:11 am
by keless
looks like I'll be using this in IrrlichtRPG

Posted: Sun Apr 17, 2005 2:22 am
by etcaptor
Dingsi wrote: I didnt examine your source very well but the pieces at the example page I've sawn arent looking easier than RakNet to me.
:D Schick's code is in very clean OOP style. Maybe using of exceptions makes it to look difficult, but belive me - it's realy easy then directly using of RakNet.

Hm, I still can't believe that schick have only 1-2 years practice with C++ /he wrote something like this in Open Discussion forum./
Very good style by me. I even tougth that he works in this buisness. Congrats!

Posted: Sun Apr 17, 2005 2:48 am
by stodge
OO until you get to the switch statement! :)

Just an example of how I would do it:

Code: Select all

typedef std::map<int, MessageHandler> MessageHandlerMapType;

MessageHandlerType messageHandlers;
messageHandlers[ID_CHATMESSAGE] = new ChatMessageHandler();

virtual void OnPacket(net::IPacket& packet) {
  MessageHandler* handler = messageHandlers[packet.get_PacketID()];
  handler->HandlePacket(packet);
}

Posted: Sun Apr 17, 2005 3:24 am
by etcaptor
:D You use map template...
Sometime this is a life saving solution :lol:.
Hehe - sometime with Irrlicht interfaces map works well for me.
About Racknet - I have not enought knowlege because my game will be single player. But to learn something is always well for me.

Posted: Wed Apr 20, 2005 9:20 pm
by TeTo
Congratulations schick!!! great work!! and great solution!!!!

plz can you put a documentation of easyNET independet of raknet??

Example:

messages what raknet process itself and examples of messages what raknet cant proccess.

how can we do a log the messages of raknet and the messagges of the easynet

summarizing :

in a conection between client with server .... a documentation about the historial of what messages send them with raknet and a historial ( or log) of messages with easynet

and during connection (during the game) a historial the messages what sendding between client and server if it has a error (lose connection, etc)

The idea is we could know what in our online games of what messages we must plan and proccess and what menssagges raknet and easy can proccess it .

thank!!!

Posted: Sat Apr 23, 2005 11:02 am
by schick
Well, some more documentation would be great but i do have really not much spare time at the moment.


If i have some more time i will wrap RakNet just a little bit more. :-)

Cheers,

Schick