Comments (7)
@Xaeroxe We should abstract away from any particular data formats where possible (and doesn't hit performance). Loading entities from any serde::Deserializer
is better than just .ron
And I'd recommend using binary formats in production.
from amethyst.
Remark: Relevant specs issue amethyst/specs#18
from amethyst.
After taking a look at the ability to load a world/map in #145, I'm wondering how this will work for that use case. Using this approach for loading individual entities seems fine, but I think doesn't address the overall question of how to load a game world. It seems like we can proxy off most/all of the "real work" of loading entities/components to specs-rs
, so if this looks right from Amethyst's POV, I can go propose this over there to see if there's any interest. Basically, it would look something like this:
impl State for SomeExample {
fn on_start(&mut self, ctx: &mut Context, world: &mut World) {
// other init code...
let world_yaml = load_some_yaml_file("example");
world.register_component(Component1, "component1");
world.register_component(Component2, "component2");
world.from_yaml(world_yaml["entities"]);
}
}
With a resources/worlds/example.yml
file that looks like this:
---
textures:
# ...
entities:
- component1:
field1: true
field2: 'value'
field3: [1.0, 2.1]
- component1:
field1: false
field2: 'value'
field3: [1.0, 2.1]
component2:
field1: []
Also, I can move this to a new ticket if it seems off-topic from loading entities from yaml specifically.
from amethyst.
Same as #122 (comment)
from amethyst.
Ron is ready to use at this point and we've decided in other threads that's what we're going to be using, so I changed the issue title.
from amethyst.
I'm downgrading this to "Important" because while valuable, this isn't something we can take immediate action on.
from amethyst.
I don't see how this is much different from #122, but I think it can be closed, too.
from amethyst.
Related Issues (20)
- Pong game breaks when using Airpods Pros HOT 5
- Derive proc_macros unnecessarily require the user to import apparently arbitrary types HOT 1
- RenderingBundle has undocumented dependency when used with ApplicationBuilder HOT 2
- RenderToWindow::from_config_path - Parse Errors include filename that couldn't be parsed HOT 2
- Include brew dependencies for MacOS HOT 1
- update amethyst_rendy to use rendy 0.5.1 HOT 1
- Reduce friction to use register_asset_type! macro HOT 1
- Allow use of legion system macros without needing to manually add legion crate HOT 1
- Add example how to add thread local bundle / system with object which can not be send between threads HOT 3
- Most Examples Are breaking, With missing imports HOT 1
- supported platforms? HOT 1
- Examples fail to run second time with error: failed to load manifest for workspace member .assets_db HOT 1
- Custom pipeline properties for rendering (3D-related)
- [Question] is there a way to download all of amethyst for convenient offline use
- the focus screen functionality does not work at all HOT 9
- Amethyst rendy is broken, the build is broken and has been broken for more than a year HOT 4
- Amethyst Roadmaps not updated to reflect project discontinuation
- amethyst was deprecated? if yes, why? HOT 3
- Make tiled windows fullscreen
- Wide layout not resizing with new windows. Requires relaunching.
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 amethyst.