Jump to content
  • Advertisement
Sign in to follow this  
Postie

Using RakNet with C#

This topic is 1386 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys,
 
I'm building a Open World Survival RPG in C# and I'm looking for advice on network libraries. I started out by rolling my own socket connections, but got a short way into it and thought "there must be existing libraries out there" and starting looking around.  I came across RakNet relatively quickly and people say good things about it, so I decided to give it a try.
 
I grabbed the source and I've spent 4 hours trying to get the examples compiling. I followed the c# tutorial and ran into issues, such as the build failing due to missing folders. So I fixed that by creating the folders. Then there were files missing from the project. I found them and added them to the project. None of the generated files have any standard "using" clauses, so I add the required "using" clauses to the generated code. Now I'm stuck with build errors such as "Cannot implicitly convert type 'RakNet.Row' to 'RakNet.TableRow'" or "Cannot apply indexing with [] to an expression of type 'RakNet.SWIGTYPE_p_DataStructures__ListT_DataStructures__Table__Cell_p_t'"... the list goes on...
 
It seems like parts of the RakNet source are out of date or the c# source generated by swig is messed up somehow. Or perhaps the swig tutorial I followed isn't up to date?
 
This brings me to my questions:
 
1) Does anyone know what I'm doing wrong with RakNet, and is it salvageable?
2) Can anyone suggest a different networking library for use with C# for simple multiplayer (8 simultaneous players) which may be easier to get up and running?
3) Should I just go back to rolling my own? 
 

Share this post


Link to post
Share on other sites
Advertisement
I could be wrong, but my understanding is that lidgren is the game networking library of choice when it comes to developing in C# and .Net.

The old repository is here, which you'll want for the getting started guides and tutorials:
https://code.google.com/p/lidgren-network-gen3/

The new repository is here, which you'll want for an up-to-date codebase:
https://github.com/lidgren/lidgren-network-gen3

It doesn't seem to have a NuGet package, as best I can tell. Edited by axefrog

Share this post


Link to post
Share on other sites

I saw lidgren mentioned in a few of the articles I found, but was swayed towards RakNet. Time for me to check it out..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!