Collection of Multiplayer samples

This is a collection of links to samples that have been posted in this forum. Some are scripts and some are entire sample projects.

18 Likes

also:

How about that one?

I would like to contribute to this list but I can’t seem to upload the project zip file here. Where else can I do so?

You can upload your code to github.
And share a link to the repository here.

Here’s the project link. This project shows how to make a non-player object as a player-controllable unit in a typical RTS application. (It’s not a game, just an boring RTS sample of clicking here and there.)

To test the project out, you need to first CTRL+B (Build) the project into a runnable executable, and then use the editor to connect to the runnable.

Hopefully, it can help others out.

2 Likes

Another RTS sample project download link. This is a project that uses one of many examples of making units move without stuttering over the network.

1 Like

Another one is the Networking Lobby with MatchMaker Example:

There’s also the Multiplayer Networked Tanks Demo:

New RTS sample project. This shows how to spawn non-player game objects from other non-player game objects. It may seem trivial to do, but just to get UNET working takes a lot of effort.

1 Like

Update: A much cleaner version of a simple turn-based multiplayer Rock Paper Scissors game is now available below (my apologies to anyone who download the pile of garbage I posted earlier).

Here is a simple turn-based example game of Rock Paper Scissors in two C# files (RPS_Player and RPS_Server) which are both components of a player prefab. (See attach RPS_10112015.unitypackage file below).

This solution for a RPS game seems to work pretty well. But, I’m new to UNet (and networking in general) so I’m sure this is not the MOST elegant solution that could be created (feel free to post improve examples).

This approach uses [ClientRpc] to sync data between player and player instance.

Please have a look and please post better solutions.
Critiques are much appreciated. :slight_smile:


2324145–157698–RPS_10112015.unitypackage (14.4 KB)

3 Likes

3 part series on UNET client-server communication, client-side prediction and server reconciliation, and quality of service channels. All parts contain a link to get a sample project that uses everything taught in the series.

Part 1: Blogs recent news | Game Developer
Part 2: Blogs recent news | Game Developer
Part 3 is in 6 parts:
Blogs recent news | Game Developer

2 Likes

This is from 5.3 beta forum:

1 Like

This is really a wonderful thread, thank you for keeping it updated. Lots of useful information.

Yeah thats helpful

Hi there.
I’m kinda stucked right now. Regarding the Lobby-sample project, I can’t seem to find the logic behind a team-selection. Can anybody please do some explaining?

Or could you guys (the official UNet developers) come up with a sample project for this? :frowning:

The lobby example is the official sample.

thanks for sharing~:p:p