Can I please have an updated ID list for both the client and the server so I can update my messageheaders.h file or can I please get a copy of that header file used within Unity?
So far I have only been able to figure out 1 ID change, and that is for the client send to the server to acknowledge connection and that ID is 131.
I am trying to figure out how to capture the message and translate it on my client code and my server code, or at the very least just pass it through Unity directly to my custom client code and use Unity’s network connect then Unitys network interface as the bridge. Going to do some more tests, but this is as far as I have been able to get so far based on knowing the Unity Raknet version used.
Ok, more progress, but sent in email to support, I need a few more pieces of information to complete this pie. When developing a custom server to fully interact with Unity’s built in client, one missing piece that is not in the documenation, is the structure for the message, aka, what I mean by that, is that when sending an RPC message back to the client, the first piece to the RPC message is the function call, the second piece (missing piece) is the message itself, the message is in the form of a structure, example:
struct unitymessage
{
int viewid;
int levelnumber;
// ........
};
That structure is what gets passed around through the RPC call, and I presume in that structure is an array of objects which are a serialized group, now the only issue I have now, is when I send a custom RPC from the server, the client understands the function I want to call, but it does not know which networkview or level I am sending the data to, so part of the message contains this information for deserialization.
Once I have this information, I am pretty confident that I can setup a server that can subsequently cascade the resulting message to other servers in my server bank and be able to super broadcast the message in such a way that I could have 5 servers of 1000 players receive the same message and ultimately hide the true number of players in a server set so that a player only thinks that there are 5000 players on the single server when it is a bank of 5 servers.
Hopefully they will get back with me on these two questions in the next day or so, would give me something to chew on over the 4th holliday with 3 days off from work.
Another reason why this is useful, see video for an example of server drop to player transfer through client reconnect, later I will add a video of server to server broadcast to all servers in bank, once I get a hold of the structure and RPC info, I will also show data consistance after drop from server with players not loosing location in game of other players with synced servers:
That is the plan, if I get the missing pieces, I am going to post the project code in the Unity WIKI for everyone to have. The up side to doing this is that it will work in ANY player that Unity supports internal networking components in without the need of an external plugin. Also, just as a side note, you will still be able to use the master server for game lists, but this opens up the door to the lobby interface amongst all other features in RakNet including Postgresql and MySQL interface. Unfortunately, if I am not supplied with the few missing pieces I need, it won’t really matter much, if I can not interface correctly and be able to use the RPC structure that is defined in the client, I can’t deliver the messages that are sent around and translate them.
Basically it is a “make it” or “break it” piece of pie.
Come to think of it, when I am done, I will send the C++ projects off to Jenkins for him to add to his list of example projects for the 3.732 build, this way anyone who downloads RakNet will have the custom code needed to interface with Unity.
Now that the holliday is over, I hope to hear back from someone sometime this week, maybe by friday if I am lucky. If I do, I will get an update on the threads and probably update the wiki to include what you have to do to make your own stand alone server.
Thanks! Any way I can get the RPC structure for the message so that I can translate it on the server once received and grab the RPC method name that was called and read the contents of the message? This will allow me to store information into a database, also, having this information would allow me to make a custom message from the server, like a server broadcast message to inform the players of changes or what ever.
Unity is burried at the moment with U3 development, so expansion on this will have to wait until U3 is released and they have wound down some on that end. I am taking a new angle on this for the mean time with using a stand alone RakNet server as a bridge, more on this hopefully by sunday of this week depending on how the weekend goes. However, this new approach without having the packet structure means that I have to use a shadow client to translate for me so adds another machine in the mix as a silent partner, not preffered but should work as a “patch” while i wait.