[RELEASED] MultiLan : multiplayer network kit - V3 now available

MultiLan : multiplayer network kit - Version 3 is now available
Add quickly and easily network multiplayer mode on your games

Features :

  • Players host themselves the game : no server to manage
  • Lobby with the list of current games on the network (Windows computers only)
  • Game list with filters, sorting and search [new in V3]
  • Join a game by entering the host’s IP address : for games internal or external of the network
  • Host can exculde players from his game
  • Players name display
  • Waiting room with players list, map preview and chat
  • In-game menus with player list and chat [new in V3]
  • Host migration management
  • Many parameters configurable from the inspector [new in V3]
  • Very easy to install
  • Works with Unity’s Network class and C# scripting : doesn’t require any other installation

Adapt MultiLan to your needs:
These modules may be enabled / disabled:

  • Game list filters
  • In-game chat
  • In-game players list
  • In-game exit button
  • View games menu
  • Join game from IP menu

Compatibility :

  • Unity free and Unity pro
  • Fully compatible with MultiOnline Asset
  • Compatible with build for “PC,Mac,Linux Standalone”
  • Compatible with WebPlayer (except the list of current games)

Pack includes :

  • 4 scenes : the menu, the waiting room and two examples game maps
  • All C# source code (commented)
  • Edition scripts : to manage the settings directly from Unity inspector
  • The prefabs you need to create easily your own multiplayer maps
  • Full documentation

MultiLan is available on Unity Asset Store

Screenshots:

Multiplayer game, with player name display, player list and in-game chat

Main menu:

Lobby: list of the open games across your network. With filters, sorting and search:

Join game from IP: allow to join a game external of your network, directly from the host’s IP.

Create a game: you can choose if your game is private or public

Waitroom [host view] with chat.
The host can exclude the others players, choose the map and start the game:

The video demonstration is now available :

1 Like

Buy, it’s not free. :wink:
Seems simple to integrate into a project.

There is an error in the console at 2:00, it was resolved?

This is a really great asset, and very well priced (I wish I found it before buying other networking assets). The code is very well written and it was VERY easy to add into my game, Thanks VirtuElle. I didn’t look at this asset earlier because of the name MultiLan, I assumed that it was for LAN only :confused:

Thank you very much for observing. It was not an error which impede the good functioning of the application, but I have resolved this one, I’ll upload the new version this evening.

I’m really happy that you like it.
About the name, I called it “MultiLan” because the list of currents games works only for the games of the network. But it’s possible to join a game if your IP is external of the network, from the host’s public IP.

The new update is now available

ChangeLog for v1.1.3 :

  • Fixed NetworkView error message which appears when a player find a game already started during the network game search (the one noticed by Yokil)
  • Fixed NetworkView error message which appears when a player joined a started game
  • Separate the player script on two differents scripts : MLPlayerMove and MLPlayerNetwork. In this way, it will be easier to modify the player’s movements and functions
  • Add a parameter for host migration : if the game is already started when a host migration starts, only players in game can become new host (players still in waiting room cannot)
  • Add a message on the menu if a Windows error system prevents the network games search
  • Checks a player hosting capacity only once he have been accepted on a game

Thank you VirtuElle, this was great. Really helped me out with a job I have with a tight deadline. Clearly written documentation too.

I have a couple of questions though. For some reason the multiplayers can’t see each other, where in the code should I be looking to fix that up?

And do you (or anyone else reading this) have any experience in hooking it up to Photon Cloud? I want to be able to host it all online and inside a webpage. I have a feeling it should be straight forward.

Thanks again.

If your players can’t see each other, I guess you use your own prefab player.
Be sure that your player prefab have a NetworkView component (Add component / Miscellaneous / NetworkView) with the state Synchronisation on “Reliable Delta Compressed”.
And you must attach the script MLPlayerNetwork.cs on your player prefab.

I am sorry but I cannot help you about it, I have not experience with Photon Cloud.

Thanks, I rebuilt my player and its working again. My virtual world feels less lonely now.

Just to be clear, if I wanted to use this over the internet I would just have to open a port on my router and port forward it to a computer on my network that has the unity project running on it?

Will the following clients need to do the same on their networks?

I’m not sure that I have good understand your question, but if you want to play with people which are not on your network, you juste have to open a port on your router and give your public IP and the game’s port to the others players (so that they can join your game from the menu “Join game from IP”).

The others players needn’t to open their port to join your game (if they don’t open their ports, they just will not be able to become host in case of host migration, but as long as you are host, they can stay in game).

But each player (internal or external at your network) must have the game on his computer (the .exe file and the data folder that you obtain when you build your game)

can uSPEAK be used with multiLAN?

I have never try uSpeak, but according their presentation on Asset Store, their asset supports all network major platforms :

MultiLan works with Unity Networking system and C# scripting, so I guess that the two asset are compatible (but I didn’t try)

Will you be adding Java script versions for your asset package?

It’s not expected since I work in C# only.
But if you usually use JavaScript (unityScript), this website may help you for conversion: http://www.m2h.nl/files/js_to_c.php

Hi one last little problem and I’ll hassle you no more.

Am I doing this right? I have attached this to my character, and to the Network View (which is also connected to the character). The animations are labelled correctly. My characters transform correctly, but when I start the walkMan animation it not only happens to my character it effects everyone I see, but from the other player’s perspective they don’t see me walking.

using UnityEngine;
using System.Collections;

public class WalkingMove3: MonoBehaviour {

	void Start () {
			}
	

	void Update () {
		if(Input.GetKey("a") || Input.GetKey("s") || Input.GetKey("d") || Input.GetKey("w")) 
    animation.CrossFade("walkMan");
	 
		else
    animation.CrossFade("idleMan");
	}

void RunAnimation1() {
	
	networkView.RPC("SyncAnimation ", RPCMode.All, 0); 
		}


void RunAnimation2() {

	networkView.RPC("SyncAnimation ", RPCMode.All, 1); 
}

[RPC] 
void SyncAnimation(int index) { 
	if(index == 0){ 
		animation.Play("walkMan");
	} 
	else if(index == 1){ 
		animation.Play("idleMan"); } 

	}
}

Thanks

In fact your animation script is not totally right (your functions RunAnimation1 and RunAmination2 are never called), try like that :

using UnityEngine;
using System.Collections;     

public class WalkingMove3: MonoBehaviour {         

	void Update () {
		if(Input.GetKey("a") || Input.GetKey("s") || Input.GetKey("d") || Input.GetKey("w")) {
			RunAnimation1();
		} else {
			RunAnimation2();
		}
	}

	void RunAnimation1() {      
		networkView.RPC("SyncAnimation", RPCMode.All, 0);
	}

	void RunAnimation2() {    
		networkView.RPC("SyncAnimation", RPCMode.All, 1);
	}

	[RPC]
	void SyncAnimation(int index) {
		if(index == 0) {
			animation.CrossFade("walkMan");
		} else if(index == 1) {
			animation.CrossFade("idleMan");    
		}
	}
}

And for this :

I guess you have added your script WalkingMove3 on your player prefab, so you must disabled this script for the others NetworkView, else the animation is played on everybody (as explain on the documention part 5.1, on the bottom of the page 21).
Open the script MLPlayerNetwork, go on line 18 and add this :

this.GetComponent<WalkingMove3>().enabled = false;

just after the line :

this.GetComponent<MLPlayerMove>().enabled = false;

VirtuElle, thanks for the asset, it really pulled me out of a tight spot.
I’d like to ask, how would you about resetting a scene and reloading all the players?
And also, how would you automate creating and conecction on a LAN?

The scenes are loading with the function Application.LoadLevel() and the players with the function Network.Instantiate().
The game scene is not reloaded during or after host migration, the players are reloaded with Network.Instantiate() when a new host has been found.
Look at the function StartGame() line 198 and OnDisconnectedFromServer() line 423 on the script MLNetwork and the script MLSpanw for more details about how does it work).

The game creation and connexion work with Unity Network class (Untiy Network class documentation).The open network games are searched by scanning the LAN. For know exactly how does it work, look at the MLIpList script and read the document part 6.1 (page 25)

i’m interested, but i need

support for unity3d masterserver

have ability for players to join best game from masterserver list based on user filters (more on filter later)

and a game browser and that players can use to join a game which does filtering and sorting on categories (more of that with filtering)

also have support for public games with both password and no password.

so people who host game can say its public and it would register with masterserver

regarding filters

filters should be game name, level name, game more, ranked/not ranked, max ping, min/max players, no empty, no full, no password, etc.

same for game browser sort columns.

also needs to have join friend so it needs to have some sort of friends support. like add, remove, find, and join friend

so it could use the master server to get list of servers and then go to each server and get list of players and then do filtering to join friend

also have things like kick player, ban/unban and get list of banned players, ban/unban and get list of banned ipaddress. etc and other basic admin stuff like get/set password to join, get/set number of players, restart and shutdown the server, and things like add, remove and get list of levels that can be played, and add, remove and get list of levels being played.

sort of the stuff u see in any fps out there

is this something you are doing/going to do?