Code Monkey home page Code Monkey logo

bevy_replicon's Introduction

Bevy Replicon

crates.io docs.rs codecov

Server-authoritative networking crate for the Bevy game engine.

Features

  • Automatic component-oriented world state replication.
  • Events-based messaging API with different guarantees (reliable, reliable unordered, and unreliable).
  • Control over client visibility of entities and events.
  • Replication into scene to save server state.
  • Support for client and server both in one App and in separate.
  • Customizable serialization and deserialization even for types that don't implement serde traits (like Box<dyn Reflect>).
  • No builtin I/O. Use it with any messaging library. We provide a first-party integration with renet via bevy_replicon_renet.
  • API focused on writing logic once that automatically works for singleplayer, client, server, and listen server (when server is also a player).

If you are new to networking, see glossary.

Goals

The purpose of the crate is to provide a minimal and fast core that can be extended with the necessary features to ensure smooth gameplay. Consider the following examples:

  • A slow paced centrally hosted game wants ECS-level replication, and maybe some interpolation on top.
  • A slightly faster paced game might care more about order and need a lockstep system.
  • A shooter needs client prediction for the player and interpolation for everything else.
  • A sports game, or an online game featuring mechanics more complex than most shooters, needs ECS-level replication with full rollback on the entire world.
  • A fighting game only needs to replicate some input events and needs rollback on top.

All of these examples also have drastically different optimization requirements. This is why modularity is essential. It also allows for more developers to be involved and for each to maintain what they use.

Check out related crates to extend the core functionality.

See also What kind of networking should X game use?.

Getting Started

Check out the quick start guide.

See also examples.

Have any questions? Feel free to ask in the dedicated bevy_replicon channel in Bevy's Discord server.

Related Crates

Note: Ensure that your bevy_replicon version is compatible with the used crate according to semantic versioning.

Helper crates

  • bevy_bundlication - adds registration of replication groups using a bundle-like api.
  • bevy_replicon_attributes - adds ergonomic visibility control through client attributes and entity/event visibility conditions. An extension of this crate's raw client visibility API.

Interpolation and/or rollback

  • bevy_replicon_snap - adds snapshot interpolation and client-side prediction.
  • bevy_timewarp - a rollback library that buffers component state. See this instruction about how to integrate.

Miscellaneous crates

Bevy compatibility

bevy bevy_replicon bevy_replicon_renet
0.13.0 0.23-0.25 0.2
0.12.1 0.18-0.22
0.11.0 0.6-0.17
0.10.1 0.2-0.6
0.10.0 0.1

bevy_replicon's People

Contributors

aceeri avatar actuallyhappening avatar bendzae avatar chatalot1 avatar dependabot[bot] avatar dgsantana avatar jonastar avatar nisevoid avatar noahshomette avatar notmd avatar paul-hansen avatar pitibouchon avatar randomexplosion avatar rj avatar rsrasmu2 avatar shatur avatar ukoehb avatar umatriz avatar vixenka avatar zymoticb avatar

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.