Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am trying to learn Raknet with C# and I found it extremely confusing.

The Raknet tutorial seems to work well in C++. I have already made the chat server from the tutorial.

I am looking to do something similar in C# but I'm having trouble.

So my main question is what is the best way to use Raknet from C#?

The following information would also be very helpful:

  • A good tutorial for Raknet and C# together
  • Sample C# code for Raknet

I've done a lot of research but I'm still stuck.

Maybe Raknet isn't what I need after all? Comments with more C#-centric alternatives would also be appreciated.

share|improve this question
2  
From the Wikipedia article: "RakNet is a C++ class library that provides TCP and reliable UDP transport." It's for C++, so you might well be on your own as far as .Net's managed C++ and C# go. If you're having this much difficulty, aren't there other TCP and UDP protocols you can use instead? –  doppelgreener Jun 6 '12 at 23:56
    
I was wondering about that in my PD. My supervisor adviced me to use raknet in C# but everything I read made me think maybe is not the best option... –  cad Jun 7 '12 at 6:17
1  
Why not take a look at SuperSocket? It's written purely in C# and although I haven't used it personally (yet), I've heard just so many recommendations of it. –  Dunya Degirmenci Jun 7 '12 at 19:26
    
Thanks. I will take a look at SuperSocket :) BTW I am wondering now who downvoted my question.. did I made something wrong? –  cad Jun 7 '12 at 21:05
2  
Downvote plus 4 votes to close, but no comments explaining why? –  Tim Holt Jun 13 '12 at 16:02

1 Answer 1

up vote 4 down vote accepted

Everything you need can, more or less, be found on the official site,

  • raknet.com/raknet/manual/

There, they also have an official tutorial for using RakNet in C#, which is based on SWIG (just like raknetdotnet):

  • jenkinssoftware.com/raknet/manual/swigtutorial.html

You may be interested in lidgren, which is written in C#:

A basic but complete tutorial for starters can be found here:

Good luck!

share|improve this answer
    
+1 for mentioning Lidgren. It's a great networking engine. –  Boreal Jun 13 '12 at 16:31
    
Thanks. I have been googling a lot and I think I suffer overinformation. So many info about C++ hides good resources in C#. I will make a depth read on this links. I have already read about swig and found it a little bit confusing. –  cad Jun 13 '12 at 16:42
    
+1 I am testing Lidgren right now and seems very cool. Thanks! –  cad Jul 14 '12 at 18:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.