I have read the whole user guide and reference manual on everything about networking with Unity. I am ready to start the coding! my problem is that I can find no official free tutorial to use that will help me utilize this stuff! M2H’s tutorial is expensive, and I can find no free tutorials on the internet! Am I missing something here?
There is the networking example project you can use to learn from.
but there is no official networking tutorial no, as there is not more needed than docs + example projects, if you want professional tutorials then its M2H which are pretty cheap for what you get with the tutorials and sample projects to toy with
So I just kind of have to learn for myself from the example projects and such if I don’t want to spend anything?
No, you can also use the board.
But you won’t find a tutorial that takes you by your hand.
if its just about copy pasting a solution, the networking example project will offer that
I know a lot about networking already. I have coded a network game in blender before, but I would like to learn how to use the Unity API. I have just a little scene where you can move a cube around.
I want to know:
How to start up the server
How to connect the client to the server
How to share position of the cube with the server
Have the server relay it to all clients
That is pretty trivial actually and if you have background in networking, you will see that the networking example will show you all you need it has multiple scenes to show how onserializenetworkview works, the direct transform serialization, RPCs and just a simple little funny example.
I’m sure you will be flying in less than 3 hours likely
True.
I used that to create a prefab networking object that started either a server or client and allowed the games to see each other and join in all simply by dropping the prefab into the scene. All of this done from the networking example and all of this on day 1 with 0 networking experience.
Now, if THAT is not ‘taking you by the hand’ then I don’t know is…
So the networking code that does not pertain to updating objects should be attached to an Empty?
Did you try the iphone multiplayer tutorial? http://download.unity3d.com/support/resources/files/MultiplayerTutorial.pdf
It says iphone, but the only thing that is iphone-specific is the control scripts that you ultimately use in the startrooper game. The whole first section is just about creating a connection gui and establish a simple client-server connection and instantiating some boxes, no iOS stuff all.
Oh, Sweet! Thanks, man! I’ll start there!
YA, I think the issue here is the questions are too generic. When you have focused questions, the multiplayer stuff tends to be answered well, because people who are very new to programming don’t show up in this neighborhood.
This is very true. I want to reach the basics and go from there. I’m sure the iPone tut will help. I just want to establish a connection between two clients and server, and have the position of each client’s cube, which is spawned upon connection, constantly updating. Then I’ll go from there. Adding RPC’s, animations, etc.
Well, the first step in that is creating a server, the second is connecting to it from another client. When you have that, then you can worry about instantiation. Then you have to worry about interpolation on the movement, so it is tolerably smooth.
How would I integrate interpolation?