Home

Awesome

[!WARNING] Horizon is still in early development and is not meant to be used in any production environments.

[!NOTE] Our installation methods have recently changed, please review them if you are experiencing difficulty with the installation process

<div align="center">

horizon-server-high-resolution-logo-transparent

Discord GitHub Actions License Visits Repo Size GitHub Sponsors Website <!-- can i make them flat? -->

An easily scalable game server implemented in Rust, and compatible with many popular game engines

</div>

Table Of Contents

</br> <h1 align="center" id='introduction'> 🚀 Introduction </h1>

Horizon is a custom game server software designed to facilitate seamless interaction between Unreal Engine 5 (UE5) and client applications through socket.io. It provides a scalable and customizable solution for hosting multiplayer games and managing real-time communication between players and a limitless number of game servers or "Hosts".

Synchronized Game Server Architecture

Horizon offers two distinct architectural models for game server synchronization:


1. Peer-to-Peer Model (Community Edition)

In the Community Edition, Horizon utilizes a peer-to-peer model for synchronizing multiple game server instances. This approach allows for efficient communication and coordination between servers without the need for a central authority.

How it Works

Benefits

2. Parent-Child-Master Architecture (Enterprise Edition)

For larger-scale deployments and enterprise use cases, Horizon offers an advanced Parent-Child-Master architecture. This model provides enhanced control, scalability, and management capabilities.

How it Works

This hierarchical structure allows for more sophisticated load balancing, fault tolerance, and centralized management as well as limitless scalability.

diagram <!-- gimme a better name! --> <!-- make the images local -->

<p align="center">Server image was created by Freepik</p>

Benefits


Choosing the Right Architecture

Both architectures leverage Horizon's core strengths in real-time synchronization and efficient data propagation, ensuring a consistent and responsive gaming experience regardless of the chosen model.


Implementation Details

Configuration

Administrators can fine-tune synchronization parameters via the server-config.json file, adjusting settings such as synchronization frequency and data prioritization to suit specific requirements.

Monitoring

Horizon provides built-in monitoring tools to track synchronization performance, allowing administrators to identify and address any potential bottlenecks or issues promptly.

Event Propagation and Multicasting

Horizon implements a robust event propagation mechanism to facilitate communication between servers based on spatial proximity and event origin.

Multicast System

Events are multicast from the Parent node to Child nodes based on their geographical proximity and relevance to the event origin. This ensures that only necessary servers receive and process the events, optimizing network bandwidth and computational resources.

Propagation Distance

Each event carries a propagation distance parameter, allowing servers to determine whether they should propagate the event further or handle it locally based on their position relative to the event origin.

Coordinate Management and Region Mapping

Spatial Coordinates

Horizon uses a 64-bit floating-point coordinate system to manage server positions within a simulated universe. Each server instance covers a cubic light year, and coordinates are stored relativistically to avoid overflow issues.

Region Mapping

Servers are organized into a grid-based region map, where each region corresponds to a specific set of spatial coordinates. This mapping enables efficient routing of events between servers, as servers can quickly determine which neighboring servers should receive specific events based on their region coordinates.

</br> <h1 align="center" id='installation'> 🔧 Installation </h1>

Prerequisites

Before installing Horizon, ensure that you have the following prerequisites:

Installation Steps

  1. Clone the Horizon repository from GitHub:

    git clone https://github.com/Far-Beyond-Dev/Horizon-Community-Edition.git
    

    image

  2. Navigate to the project directory:

    cd Horizon-Community-Edition/
    

    image

  3. Enter WSL or open the project in a VSCode Devcontainer

    wsl
    
  4. Run the following command to install the dependencies, this script only works with Ubuntu, Arch & Alpine Linux

    ./installer-linux.sh
    

    image

  5. Use cargo to compile and run Horizon

    cargo run
    

    image

  6. Follow the prompts to configure any necessary settings in the server-config.json file.

For more detailed instructions and troubleshooting tips, refer to the Installation Guide.

</br> <h1 align="center" id='configuration'> ⚙️ Configuration </h1>

Horizon's configuration revolves around Docker and environment variables. Here's an overview of key configuration files:

To customize Horizon for your specific needs, modify these files according to your requirements. Refer to the Configuration Guide for detailed instructions and best practices.

</br> <h1 align="center" id='usage'> 📈 Usage </h1>

Starting the Server

To start the Horizon server, execute the following command (This assumes you have already Built the Horizon server):

./start.sh

This script initializes the Docker containers and launches the server. Once started, you can connect to the server using socket.io clients or integrate it with your Unreal Engine 5 project.

Managing the Server manually

You can manage your server directly via docker-compose:

For more usage instructions and advanced features, see the Usage Guide.

</br> <h1 align="center" id='development'> 💻 Development </h1>

Contributors

Contributors help shape the future of Horizon Server. To start contributing you have to fork this repository and open a pull request.

<a href="https://github.com/Stars-Beyond/Horizon-Community-Edition/graphs/contributors"> <img src="https://contrib.rocks/image?repo=Stars-Beyond/Horizon-Community-Edition"/> </a>

Project Structure

The Horizon project directory consists of several key components:

Contribution Guidelines

For detailed development instructions and guidelines, refer to the Development Guide.

</br> <h1 align="center" id='additional-resources'> 📚 Additional Resources </h1>

Community Support

Documentation

For more resources and helpful links, visit the Additional Resources section.

</br> <h1 align="center" id='troubleshooting'> 🐞 Troubleshooting </h1>

Common Issues

For troubleshooting tips and solutions to common problems, consult the Troubleshooting Guide.

</br> <h1 align="center" id='stargazers'> 🌟 Stargazers </h1> <a href="https://github.com/Stars-Beyond/Horizon-Community-Edition/stargazers/"> <picture> <source media="(prefers-color-scheme: light)" srcset="http://reporoster.com/stars/Stars-Beyond/Horizon"> <img alt="stargazer-widget" src="https://reporoster.com/stars/dark/Far-Beyond-Dev/Horizon"> </picture> </a>