Jump to content

View more

Image of the Day

Trying out some of Pickle Jar compositions in @SketchUp and Unity, for a late #screenshotsaturday #gamedev https://t.co/HU0kZAnQtD
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.


Sign up now

Using RakNet with C#

2: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Postie   Members   

1529
Like
0Likes
Like

Posted 08 June 2015 - 02:44 AM

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? 
 

Currently working on an open world survival RPG - For info check out my Development blog: ByteWrangler

#2 axefrog   Members   

1088
Like
0Likes
Like

Posted 08 June 2015 - 02:53 AM

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, 08 June 2015 - 02:54 AM.


#3 Postie   Members   

1529
Like
0Likes
Like

Posted 08 June 2015 - 05:25 AM

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


Currently working on an open world survival RPG - For info check out my Development blog: ByteWrangler




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.