EasyNet

A forum to store posts deemed exceptionally wise and useful
Post Reply
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

EasyNet

Post 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
Please send me an e-mail instead of a private message.
Dingsi
Posts: 6
Joined: Thu Sep 30, 2004 8:17 pm
Location: Hannover, Germany
Contact:

Post 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
Vox
Posts: 47
Joined: Fri Apr 01, 2005 5:25 pm

Post by Vox »

Dingsi, your photo looks great. I'm not far away from you, only 300 KM :twisted:
Dingsi
Posts: 6
Joined: Thu Sep 30, 2004 8:17 pm
Location: Hannover, Germany
Contact:

Post 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? :?
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

looks like I'll be using this in IrrlichtRPG
a screen cap is worth 0x100000 DWORDS
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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!
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
stodge
Posts: 216
Joined: Fri Dec 05, 2003 5:57 pm

Post 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);
}
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
TeTo

Post 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!!!
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

Post 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
Please send me an e-mail instead of a private message.
Post Reply