Giter Site home page Giter Site logo

vangers-srv's Introduction

Vangers-Srv

Vangers-Srv is a reimplemented of the Vangers Server published by KranX. Its written in pure Rust without any unsafe features and uses tokio as async runtime.

Vangers-Srv is under active development and, unfortunately, is not full-compatible with original protocol, at least, for now. Additionally, the server hasn't all features that implemented by original server (for example, total player ratings are missed). However, the server is playable and you can play with your friends using any Vangers game client (Steam, GOG or your own compiled from source).

Vangers-Srv running on fenex.vangers.net:2197.

See also

  • Vangers - original Vangers game & server
  • vange-rs - Vangers game clone written in Rust

vangers-srv's People

Contributors

fenex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vangers-srv's Issues

Consider `thiserror` for errors

For example, this code:

#[derive(Debug)]
pub enum UpdateObjectError {
    SliceTooSmall,
    SliceToVanjectParse(VanjectError),
    PlayerNotFound(ClientID),
    VanjectNotFound(i32),
    PlayerNotBind(ClientID),
}

impl fmt::Display for UpdateObjectError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            Self::SliceTooSmall => write!(f, "fail read slice as vanject: [too small slice]"),
            Self::SliceToVanjectParse(e) => write!(f, "fail read slice as vanject: [{}]", e),
            Self::PlayerNotFound(id) => write!(f, "player with `client_id`={} not found", id),
            Self::VanjectNotFound(id) => write!(f, "vanject with `id`={} not found", id),
            Self::PlayerNotBind(id) => write!(f, "player with `client_id`={} not bind", id),
        }
    }
}

impl From<UpdateObjectError> for OnUpdateError {
    fn from(from: UpdateObjectError) -> Self {
        Self::UpdateObjectError(from)
    }
}

would turn into

#[derive(Debug, thiserror::Error)]
pub enum UpdateObjectError {
    #[error("fail read slice as vanject: [too small slice]")]
    SliceTooSmall,
    #[error("fail read slice as vanject")]
    SliceToVanjectParse(#[from] VanjectError),
    #[error("player with `client_id`={0} not found")]
    PlayerNotFound(ClientID),
    #[error("vanject with `id`={0} not found")]
    VanjectNotFound(i32),
    #[error("player with `client_id`={0} not bind")]
    PlayerNotBind(ClientID),
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.