Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rackover/broadcast
Master server broadcasting for any game
https://github.com/rackover/broadcast
broadcast game linux-arm lobby
Last synced: 10 days ago
JSON representation
Master server broadcasting for any game
- Host: GitHub
- URL: https://github.com/rackover/broadcast
- Owner: Rackover
- License: mit
- Created: 2020-02-17T15:15:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T22:40:00.000Z (almost 2 years ago)
- Last Synced: 2023-03-06T05:49:33.865Z (over 1 year ago)
- Topics: broadcast, game, linux-arm, lobby
- Language: C#
- Homepage:
- Size: 181 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ![alt](static/Icon.png) Broadcast
Master server broadcasting for any game# How to use
## Client
To connect to Broadcast with your application, check the Releases page and download **either**:
- net6.0 (if your application is .NET Standard compatible)
- net471 (if your application is .NET Framework 4.X compatible, like Unity is).Put the two libraries (BroadcastClient and BroadcastShared) in **/Plugins**
### Usage
Before using the client, you have to instantiate it.```
var client = new BroadcastClient(
string broadcastServerAddress,
string nameOfYourGame,
bool allowOnlyIPV4
)
```Notes :
- If you choose to allow IPV6 (by setting `allowOnlyIPV4` to `false`), DNS resolution **may be extremly slow** due to a Microsoft bug.
- The client does **not** connect to the server upon construction. It will try establishing a connection when contacting the server. That connection is managed by the BroadcastClient - in case of connection loss, it will reconnect automatically when needed.| I want to | Function | Returns | Info |
| ------------- |:-------------:| -----:| -----:|
| Get the list of lobbies for my game | client.GetCachedLobbyList() | Read-only list of object | Returns the local list, does not connect to the server. Use `FetchLobbies` to update that list.
| Fetch the list of lobbies from the server | client.FetchLobbies(Query customQuery=null) | `Task>` | |
| Create a new lobby | client.CreateLobby(...) | The lobby you just created, but with an ID delivered by the server | |
| Update information for my lobby | client.UpdateLobby( object) | Nothing | |
| Kill my lobby and remove it from Broadcast | client.DestroyLobby(uint lobbyID) | Nothing | |
| Requests the host to hole-punch me. | client.PunchLobby(uint lobbyID) | Nothing | Only works if the lobby uses `ETransportProtocol.UDP` |## Server
Download a binary from the /Releases section according to what you have
- winx86 for Windows 32 bit
- winx64 for Windows 64 bit
- linux-x64 for Linux 64 bit, any distro
- linux-arm for Linux ARM, like RaspbianUnzip and run `Broadcast`(.exe). This should work out of the box.
# Notes
- Broadcast runs on port 1000{`a`} where `a` is the Broadcast version. *Example: Broadcast v6 runs on port 10006*.
- Lobby that hasn't sent trace of life in the past 30 seconds are cleaned up and destroyed from the server
- Broadcast uses the major version number (X) to signal compatibility break. Minor version number and revision number (Y and Z) are usually quality of life improvements or bugfixes, but no protocol change.
- Broadcast returns maximum 200 lobbies when queried
- Broadcast does not implement hole punching: it only implements a message "requesting" a punch from the client to the host. The actual punching implementation is left to the application.