Giter Site home page Giter Site logo

Comments (5)

TomGillen avatar TomGillen commented on May 9, 2024

Legion has no built-in support for network synchronisation, and support libraries for this are not likely to turn up until Amethyst has began to adopt legion as its ECS. There is some preliminary support for entity serialisation, but it is currently difficult to selectively serialise only some entities, as you would want to do to synchronise simulations between machines. There have been some preliminary discussion on what might be needed in legion to better support uses cases like this, but for now it is best if you do not use Entity as a globally-unique identifier if you are trying to sychronise or transfer entities between different universes. Instead, you may need to define your own unique identifier and store the mapping between that any each local Entity, or store it in a component.

from legion.

SOF3 avatar SOF3 commented on May 9, 2024

why store the unique identifier in a component instead of a tag?

from legion.

MagicRB avatar MagicRB commented on May 9, 2024

You could copy the Entites from the main World, into a temp World and serialize that. Not the best solution but not bad.

from legion.

TomGillen avatar TomGillen commented on May 9, 2024

@SOF3 Tags are best used when you have values which are shared across many entities, especially if you need to be able to filter entities by that value in queries. You should avoid storing anything which is unique to an entity in a tag, as each unique combinations of tag values will get their own storage chunk. If you put a unique ID in a tag, you would end up allocating an entire chunk for every entitity, which is both wasteful of memory and will severely degrade iteration performance.

from legion.

SOF3 avatar SOF3 commented on May 9, 2024

@TomGillen I see. Is there any documentation that talks about this?

from legion.

Related Issues (20)

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.