Skip to content

Introduction

Cobra Servers is a Unity asset designed to simplify the integration of server lists for multiplayer games. This asset is composed of two primary components:

Server-side API: A REST API written in C# that can be hosted either in Docker or as a standalone application.

Client-side Integration: A client-side component that facilitates interaction with the server list. This can be used to get all the servers or adding new servers to the list.

Features

The client-side code provides functionalities to add new servers to the list and retrieve all available servers. By default, each server entry includes the following information:

  • Name
  • Host
  • Port
  • Current Online Players
  • Maximum Player Limit

Additionally, you can easily add any type of custom data you need, allowing for complete flexibility in managing server information.

The server availability verification feature ensures that each game server is checked for availability over both TCP and UDP protocols before being added to the server list. If a game server responds on either protocol, it is deemed valid and added to the list. This process helps maintain an accurate and reliable list of available servers.

Security

Each newly added server is assigned a unique ID, ensuring that servers are authenticated and preventing unauthorized impersonation. This system guarantees that only legitimate servers can appear on the list, maintaining the integrity and reliability of your multiplayer game environment.

Extensibility

Cobra Servers is designed with flexibility in mind. If additional data types are required, they can be added via an optional dictionary. JSON can be used to convert each value to a C# object, allowing for customized server information to be seamlessly integrated into your game.