U3 network / Raknet version

What version is U3 running for core RakNet in the editor? Is there a version of the U3 that we can grab only the RakNet source for the master server?

Question 1: 3.732

Version 3.732 of RakNet is not available from:

http://www.jenkinssoftware.com/raknet/downloads/

The closest version is 3.731. I hope that Unity3 upgrades to 3.8 at least or the source is provided for the version integrated into Unity3 so it can be used to make standalone servers without so much guesswork and troubleshooting.

Can anyone send me the guts of 3.732 so I can make a compatible coco carbon bundle server component and a c++ server component?

I was wondering if RakNet 4 might be out of beta soonish or whether it would be stable enough to be integrated into Unity. And I was wondering if integrating a new version of RakNet was not too painful, so it might be an option for Unity 3.1 or some later version during the 3.x cycle.

RakNet 4 sounds quit nice to me as it seems to have some support for .Net / C# which I think would make it the perfect match for Unity … and I’d just hope we wouldn’t have to wait until Unity 4 to get that.

On the other hand I could understand if they’d rather keep 3.732 than delaying the Unity 3 release …

If you scroll down the page, you’ll find:

RakNet-Console-3.732.zip

I’ve also seen a RakNet-Lobby-3.72.zip but I’m not sure if that is compatible with the console 3.732

Hope that helps :slight_smile:

I imagine part of that decision would be whether the application protocol raknet uses is incompatible between 3.7 and 4. You wouldn’t want games created with Unity 3 not to be able to join games compiled with 3.1.

After what we’ve suffered with for the last couple years, It would be nice if we weren’t behind the curve coming out of the starting gate, locked there again for another two year period. Hopefully there’s some communication and coordination with the Raknet guy in regards to Raknet 4 and Unity 3.

A few issues, first, protocol is questionably incompatible between raknet versions, now I haven’t looked at the packets in 4 vs 3.x.x of Raknet, but the 4 support for c# is through PINVOKE, basically won’t work for web, Jenkins is old school c++ and is very well versed in assembly along with core ansi C and C++, not much of a care to learn .Net, his code is stand alone without the need of native .Net assemblies, that is where the cross platform power comes in, I can take his c++ code, create a new carbon bundle, make a few slight header changes and compile as is in carbon to raknet.a so I can include both a raknet.dll unmanaged and raknet.a unmanaged in the pro projects.

The battle is getting the modified Unity source, they do not use Raknet as-is, never have, so I need two things, the modified packet list for identifiers on the client and the modified code for the master server.

The way raknet is implemented is custom in the set that is in Unity, that said, for us to create our own server to listen and respond to Unity, we have to know the ID structure for the packet sends, hopefully they will update this thread with any ID changes, I am downloading the 3.732 now to see what U3 hits my server with for packet ID.

EDIT: FYI that zip is password protected.

Edit: I got with Jenkins and he has uploaded the non console version of the file to the repository so we can grab that, it is now available. The console version is only for people authorized for console development.

any luck with it?

Yes and no at the same time, I am on hold with it because although I have the packet ID’s supplied by Larus in another thread, I do not have the message structure to make custom messages or to translate the messages from the client. I can receive messages from the client at the server, I can relay / broadcast those messages, but I can’t decipher them without the message structure. Not without another client sitting around translating the messages for me which defeats the purpose of the project. So at best right now, all I have is a relay. Until U3 is released, I probably won’t hear any more on this issue because the devs are uber buried in work to prepare for the U3 release.

http://forum.unity3d.com/viewtopic.php?t=56847

In lieu of Larus, Isn’t that something you could figure out with a packet sniffer and a little experimentation? I doubt it would have too many fields beyond networkID + serialized parms.

struct msgDatagram {
int32 networkID;
int32 msgLength;
string msgContents;
};

Start with some basic assumptions and see if they fit. From what I’ve seen through the years, back engineering an application protocol is really just legwork.

I have already been down this road on my end, it will require me waiting on Larus. There is more to this pie than is visible. I have tried wireshark to no availe, it doesn’t pick up the data for me to try to translate with a hex editor.

This is not something I can just half/blast as it were.
First piece to the puzzle is the ID’s, well Larus coverd that and I have updated my MessageIdentifiers.h file and appended those items. Next piece is the custom structure, this consists of either individual values or nested structures.

// Incomplete! Waiting on the Untiy team to get back
struct UnityStruct
{
	// in order by type
	int AllocatedID;
	struct innerStruct
	{
		int p0;
		int p1;
		int p2;
	};
};

So, I first tried like you showed way back when I started this, then I tried nested structures because of my returned values. Of course, I want to send a custom message as well as receive one, so if I can get Unity to receive my custom message and work with it then great, however, to use that structure, you have to do the following in code (C++)

UnityStruct unityInfo;
unityInfo.AllocatedID=1;
UnityStruct::innerStruct p;
p.p0=2;
p.p1=3;
p.p2=4;
outgoingBitstream.Write(unityInfo.AllocatedID);
outgoingBitstream.Write(p);

I just wanted to see what Unity transated and gave for values 1,2,3,4 and if they show for any reason, all I figured out was the first byte of information has to encompase the AllocatedID, but that was as far as I could get, the rest is fruitless because I think they are yet nested in a different way.

Sending the message was simply:

bool success = server->RPC("clientRPC",&outgoingBitstream, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID, 0); // broadcast to everyone, which happens to be our one client
if (!success)
printf("RPC call failed\n");

As you can guess, Unity DID get the message, it even knew that I wanted to trigger the RPC call of “clientRPC” but it didn’t know which scene, which level, which class, nothing, all in all I have to find out what the serialized bitstream structure is, so no, it is not as simple as you think. Thanks for offering help, I have to have the structure to both disassemble the incoming message to work with it and assemble a message to send back.

I’m pretty sure that the serialization includes the object uid together with an at runtime generated RPC function UID which is either object or even scene unique …

the generation of this uid is either predictable or the table is syncronized once at connect time or shortly after (similar to the ‘string’ table in torque which are later on only sent by id too)

Once I have a working structure, it will not be a problem for me to generate my own unique ID’s for my messages so not to conflict with Unity object ID’s that is created per object. Each serialized message is put together in a certain sequence with certain lengths, accordingly, once I know the rules, it is easy to keep within them. Seriously no rush on this thing though, I have other avenues that I have persued to keep moving forward on my project. This is seriously only for the community, I have purchased an unlimited player version of Photon and I am working on migrating everything non photon code over to photon.

This raknet thing is for the community, since Unity has a simple client built in with a simple server, expanding it to be a funcaitonal cascading server that can grow player base horizontally and vertically is just bonus for the community.