Coder Social home page Coder Social logo

oxtx / hyperion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andrewgazelka/hyperion

0.0 1.0 0.0 1.79 MB

Getting 10k players to PvP at once on a Minecraft server to break the Guinness World Record.

License: Apache License 2.0

Rust 99.38% Dockerfile 0.62%

hyperion's Introduction

Hyperion

Star History Chart

Discord invite link wakatime

From the creator of SwarmBot:

How can we get 10k players to PvP at once on a Minecraft server to break the Guinness World Record for largest PvP battle in any game of 8,825 players?

The image below shows 100k zombies (with collisions) running at ~8 ms/tick on an M2 MacBook Pro.

Running

Step 1: The event

git clone https://github.com/andrewgazelka/hyperion
cd hyperion
cargo run --release -p infection

When joining the server downloads a map and loads it.

Step 2: The proxy

  1. Join the Discord server
  2. Look in the #build channel for the latest proxy release
  3. Run it with ./{executable_name}. You will likely need to make it executable first with chmod +x ./{exeuctable_name}

FAQ

Q: How is hyperion so fast?

  • Hyperion generally does a good job at utilizing all cores of your device. On an M2 MBP, CPU utilization is over 1000% when spawning hundreds of thousands of zombies.
  • We aim to utilize as much SIMD as possible. This is still a work in progress, but as it is built out we are aiming to use SIMD-friendly data structures. Make sure to compile with RUSTFLAGS='-C target-cpu=native' to allow the compiler to use SIMD intrinsics.
  • A lot of work has been done in reducing synchronization and limiting context switching. For instance, #[thread_local] is heavily relied upon.

Q: Aren't you re-inventing the wheel?

  • No, we rely on valence-protocol and evenio, an ECS framework created by rj00a the creator of valence.
    • Although we rely on this work, we do not completely depend upon valence as it is currently being rewritten to use evenio due to (among other things) performance limitations using bevy.

Q: What is the goal of this project? Making valence 2.0?

  • Nope, the goal of this project is to break the Guinness World Record. Everything else is secondary.
  • We are not implementing a 1:1 with a vanilla Minecraft server. We are only implementing enough to support the event which will have 10k players.

Q: How will this handle 10k players given the network requirements?

  • The current idea is to have load balancers which do encryption/decryption and compression/decompression with a direct link to hyperion.

Q: Why not just use a distributed server?

  • This adds a lot of complexity and there are always trade-offs. Of course given an event with 10k players real-world players are needed to see if a server can truly handle them (bots only are so realistic). I suppose if there is some inherent limiting factor, this could be distributed, but given current performance estimations, I highly doubt making the server distributed will be the best path of action—in particular because there will most likely not be isolated regions in the world.

hyperion's People

Contributors

andrewgazelka avatar testingplant avatar ruben2424 avatar eoghanmc22 avatar eduxstad avatar loofifteen avatar herin049 avatar

Watchers

 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.