Fenrir.Multiplayer
1.0.26
dotnet add package Fenrir.Multiplayer --version 1.0.26
NuGet\Install-Package Fenrir.Multiplayer -Version 1.0.26
<PackageReference Include="Fenrir.Multiplayer" Version="1.0.26" />
<PackageVersion Include="Fenrir.Multiplayer" Version="1.0.26" />
<PackageReference Include="Fenrir.Multiplayer" />
paket add Fenrir.Multiplayer --version 1.0.26
#r "nuget: Fenrir.Multiplayer, 1.0.26"
#:package Fenrir.Multiplayer@1.0.26
#addin nuget:?package=Fenrir.Multiplayer&version=1.0.26
#tool nuget:?package=Fenrir.Multiplayer&version=1.0.26
Fenrir Multiplayer SDK
Fenrir is a platform for building server-authoritative real-time multiplayer games with C# and .NET.
This library provides supports for building multiplayer games using Unity on the client-side and .NET and Docker on the server-side.
It is optimized for real-time multiplayer and provides fast reliable UDP layer and a basic serialization engine. It also supports various serialization engines and plug-ins.
Fenrir provides a great balance between performance and ease of development and makes it extremely quick to build multiplayer games of any genre.
Documentation
Table of Contents:
- Documentation Home
- Installation
- Quick Start
- Networking
- Serialization
- Room Management
- Logging
- Docker Setup
- Thread Safety
- Client and Server Lifecycle
- FAQ
Quick Start
Installing Unity Package
This package can be installed using Unity Package from https://upm.fenrirserver.org registry.
- In Unity, open Edit → Project Settings → Package Manager and add a Scoped Registry using URL:
https://upm.fenrirserver.org - Open Window → Package Manager and switch to Packages: My Registries. Select Fenrir Multiplayer and click Install
Generating Server Project
Fenrir Multiplayer Unity Package comes with a server template that is recommended (but is not strictly required) to use.
To generate a server project, click Window → Fenrir → Open Server Project.
If a project server has never been generated, dialogue window will open asking to generate the package. Select Generate.
Editor script will generate and open a .NET Solution in the folder next to Assets:
📂MyGame
┣ 📂Assets
┣ 📂Packages
┣ 📂Library
┣ 📂ProjectSettings
┣ 📁Server ← Generated Server folder
┣ 📂 MyGame.Server ← Server .NET Project
┣ 📂 MyGame.Shared ← Server and Client Shared Library
┣ 📄 ServerApplication.sln ← Server solution file
┗ 📄 Dockerfile ← Dockerfile that defines how the docker image for your server is built
Once the solution file is open, you can build and run the server.
Connecting to Server
Fenrir Multiplayer allows you to build server-authoritative multiplayer games with Unity and .NET.
Unlike most networking solutions for Unity, Fenrir allows (and encourages) to separate client and server logic. Data contracts and common code can be shared between client and server.
Example Server:
Note: Server template that comes with Unity Package includes basic hello world example for the server, which is also provided here.
using var networkServer = new NetworkServer() { BindPort = 27016 };
networkServer.Start();
Example Client:
using var networkClient = new NetworkClient();
var connectionResponse = await networkClient.Connect("http://localhost:27016");
if(connectionResponse.Success)
Debug.Log("Connected!");
else
Debug.Log("Failed to connect:" + connectionResponse.Reason);
Reference Project
Please check out TicTacToe repository for more examples!
Contributing
For problems with this library, please open a GitHub issue or a pull-request.
For issues with Fenrir Cloud, please contact customer support or your account manager.
License
Fenrir.Multiplayer is an open source software, licensed under the terms of MIT license. See LICENSE.txt for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- LiteNetLib (>= 1.2.0)
- Newtonsoft.Json (>= 13.0.3)
- WebSocketSharp-netstandard (>= 1.0.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Fenrir.Multiplayer:
| Package | Downloads |
|---|---|
|
Fenrir.Matchmaking
Fenrir Matchmaking Library |
|
|
Fenrir.ECS
Networked ECS Framework |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.26 | 265 | 6/24/2024 |
| 1.0.25 | 163 | 6/24/2024 |
| 1.0.24 | 199 | 2/15/2024 |
| 1.0.23 | 227 | 2/12/2024 |
| 1.0.22 | 189 | 2/7/2024 |
| 1.0.21 | 179 | 2/6/2024 |
| 1.0.20 | 178 | 1/30/2024 |
| 1.0.19 | 181 | 1/25/2024 |
| 1.0.18 | 228 | 1/9/2024 |
| 1.0.17 | 295 | 12/6/2023 |
| 1.0.15 | 217 | 10/1/2023 |
| 1.0.14 | 199 | 10/1/2023 |
| 1.0.13 | 221 | 9/13/2023 |
| 1.0.12 | 207 | 9/13/2023 |
| 1.0.10 | 453 | 11/30/2021 |
| 1.0.9 | 1,091 | 11/29/2021 |