hengineer / CaptainsMess

A local multiplayer networking library for making games like Spaceteam in Unity
MIT License
184 stars 20 forks source link

CaptainsMess

A local multiplayer networking library for making games like Spaceteam in Unity (5.1+). Tested on iOS, Android, and Mac but probably runs on other Unity platforms. Hopefully it will help other developers make more local multiplayer games!

The library is designed for local multiplayer (LAN only) games where you play with other people in the same room. The main idea is to allow "one button" connections where you just hit Play and the game automatically connects with other games around it. No IP addresses, connection dialogs, or decisions about Hosting or Joining.

It's currently built on top of the Unity Networking HLAPI (High Level API) introduced in Unity 5.1, specifically the NetworkDiscovery and NetworkLobbyManager NetworkManager classes. CaptainsMess only handles the initial discovery and connection. After that you should use the built-in Unity Networking features to communicate between devices like SyncVars, Commands, and ClientRpcs.

It's not finished yet. Please help if you can!

So far it only supports Wifi. I may have to drop down to the Low Level API to add Bluetooth support.

(For more background, see my blog post: http://www.sleepingbeastgames.com/blog/the-spaceteam-networking-post/)

Todo list

Version History

0.5 (October 4, 2016)

0.4 (June 25, 2016)

0.3 (April 20, 2016)

0.2 (March 8, 2016)

0.1 (February 18, 2016)

Example Project

Captains Mess Screenshot

Usage

API

CaptainsMess API

CaptainsMessPlayer API

CaptainsMessListener callbacks

Limitations


Please check it out and let me know if you have any problems or if you can help improve it!

I've created a discussion thread on my forum here: http://spaceteamadmiralsclub.com/forum/discussion/218/captainsmess-first-release#latest

And if you want to support me please consider joining the Spaceteam Admiral's Club.

Thanks,

Henry (aka Captain Spaceteam) [ email | twitter ]