Comments (5)
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.
why store the unique identifier in a component instead of a tag?
from legion.
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.
@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.
@TomGillen I see. Is there any documentation that talks about this?
from legion.
Related Issues (20)
- Should maybe_changed always match at least once?
- Failed World::clone_from(), because of missing Duplicate::register_clone(), asserts
- Include license file in legion_codegen crate
- Make `KnownLength` public
- Using systems and scheduler in wasm? HOT 1
- Idiomatic way of removing specific entities HOT 3
- How to apply Filter in #[system] with Query<(Entity, &Component)> HOT 3
- Resources are marked as !Send and !Sync? HOT 2
- Game map questions (Resource vs Entity) HOT 1
- how to remove/stop system? HOT 2
- How to get component/components from a particular entity? HOT 2
- Fallible systems
- Is there way to push entities with dynamic components?
- Query with ordering / sorting?
- Prototype game no longer working in browser after adding legion
- Delete entities based on component? HOT 2
- Is project dead? HOT 2
- Linking legion entities with rapier2d colliders.
- can't build at webassembly
- crossbeam-0.1.6 cannot transmute between types of different sizes, or dependently-sized types
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from legion.