It wasn't as straightforward as i tough, but wasn't too difficult either (i only started using Unity this weekend). Since it's hard for me to test it cause i only have 1 computer, i've uploaded the compiled game so you can download and test it, and hopefully leave some feedback. If there are no major bugs i'll release the complete Unity project source.
You can download the client here : http://www.seines.pt/downloads/carclient.rar
It's not meant to be a complete multiplayer game, i simply added the possibility to see other players cars and bump into them. I also added some checkpoints and laptime, since it wasn't in the original tutorial. Your best lap times won't be saved tough when you exit the game.
SOURCES
C# Server Project : http://www.seines.pt/downloads/server_source.rar
Unity 2.6.1 Project source : http://www.seines.pt/downloads/cartutorial_source.rar
In the Unity project you need to open Assets\Pro Standard Assets\Player.IO Client .NET\PIONetwork.cs, find these lines:
- Code: Select all
client = PlayerIO.Connect(
"put_your_game_id_here", // Game id (Get your own at playerio.com. 1: Create user, 2:Goto admin pannel, 3:Create game, 4: Copy game id inside the "")
"public", // The id of the connection, as given in the settings section of the admin panel. By default, a connection with id='public' is created on all games.
userid, // The id of the user connecting. This can be any string you like. For instance, it might be "fb10239" if you´re building a Facebook app and the user connecting has id 10239
null // If the connection identified by the connection id only accepts authenticated requests, the auth value generated based on UserId is added here
);
and change "put_your_game_id_here" to the game id PlayerIO assigned to your game.
The Unity project is not compatible yet with version 3 wich has been recently released. If you want the link to download 2.6.1 here it is: http://download.unity3d.com/download_un ... -2.6.1.exe