Comments (12)
@thiolliere I believe you are mistaking decomposability for monolithic design. Personally, I believe that amethyst_engine
should have the ECS as a hard dependency because it affects so many other parts of the engine that it's essentially inseparable. However, if people want to use the engine with something else, they should be able to use the sub-crates individually with their own solution.
I do not believe that something as complex as an ECS, which is essentially a game-making approach, can be hot-plugged without becoming a tangled mess of dependencies, e.g. Piston.
However, I agree with you on all other points. The engine would contain very basic resource management, configuration loading (config.yml
), and game loop, with everything else dictated by Cargo features that let people switch functionality on or off at compile-time.
from amethyst.
I don't understand what kind of engine you have in mind. Do you want to create a monolithic game engine such as Unity or UnrealEngine ?
My vision about this project wasn't a monolithic game engine.
It was a core engine containing almost nothing but the ECS engine.
and some 'shards':
- Audios
- Physics
- Renders
- Inputs
and the developer had to choose some shards:
basic-audio, 3D-physics ...
all shards can be configurable in config.yml
but without interdependency
- audio:
- default general volume
- default music volume
- default sound effect volume
- physic:
- gravitation
- ...
and they can contains traditional crate feature but also component, system and entities.
- 2D-basic-physic for example have:
- component
- dynamic-component
- static-component
- kinetic-component
- system
- world update
- component
- basic-audio doesn't have any ECS things but just a global access to sound output that would be initiated at the start of the game and then accessed globally like:
sound.play_effect(effect::boom,x,y,z)
in this vision amethyst would only be
- a core engine that starts global things like window, sound according to config.yml
- lots of 'shards' with
- ECS implementing the core ECS trait
- global access
- functions
from amethyst.
Any suggestions on missed tasks or redundant tasks are hihgly welcomed!
That's an extremely early draft of something Amethyst will be built on, so we need to come to conclussions and discover missing parts.
from amethyst.
@White-Oak Looks pretty good so far. There are a few points that I'm not quite clear on:
- Aren't shards supposed to be based on Cargo features, not Rust modules?
- I didn't really intend for the ECS to be a shard separate from the engine. This is why
entities
andprefabs
are folders included by default in empty game projects. However, I did intend for processors and their on-disk resources to be shards. - I'm not completely familiar with Cargo features by any means, but aren't they processed at compile time? If so, how could third-party shards be installed and created without delving into the engine code itself and adding
#[cfg(...)]
markers directly?
from amethyst.
- Yes, you are right. I'm not sure how to reword a title. Packages? Subsystems?
- What if ECS doesn't suit my needs?
- I think they can't be called shards anymore, you are right. More like third-party extensions/libraries. i'll edit this out.
from amethyst.
- I'd say that these are technically packages or extensions that implement specific functionality in the engine. Amethyst would come supplied with several basic shards by default, and users can tear out those that they don't use. The packaging standard for shards must be detailed enough, however, that it would be possible for people to write their own. All in all, very similar to Cargo subcommands.
- While I agree that being able to replace the ECS would be great, I think that doing so would complicate things a lot since a large number shards would be reliant on this particular ECS shard. And if someone wrote an alternative ECS shard, how would one make sure that all the other dependent shards were compatible with it?
- They can still be called "shards." 😄 I think that we could work around this compile-time problem by having all shards, third-party or not follow standard feature names (e.g. all rendering shards would obey the "renderer" feature, all audio-related shards would obey the "audio" feature, and so on). Replacing Amethyst's built-in shards with a third-party one would then involve making your own shard package according to the spec and hooking it up with the appropriate feature name.
from amethyst.
2,3. Hm. I had in mind that shards would not be designed to be fullfully interchangeable. I mean if I don't want to use Amethyst's ECS I can either use some other little bit different ECS as a replacement shard or I could just use some other completely different system and it would be my responsibility to glue it with renderer etc.
from amethyst.
As being disscussed in Gitter we are still not sure on whether shards should be added via amethyst add/remove <name>
or amethyst shard add/remove <name>
Points about the latter form:
- It is longer
- It will allow for some extensions for shards CLI like
amethyst shard info <name>
- If somewhere in the future CLI would have some other things to
add/remove
it won't cause a confusion.
from amethyst.
As I see it, our ECS should be a separate and independent crate so that it could be used with other projects and game engines, and our Amethyst should depend on it. However, I don't see it as an optional dependency (same as renderer, audio, etc), because all except the most basic games are going to use entities, audio and graphics (but probably not AI). In the end, a game engine's purpose is to provide game developer with the most essential APIs for games, which include graphics and logic/ECS. Because of this, I don't fully understand the necessity for shards. If there are going to be other shards which will be truly optional, please, give an example.
But for now, I'm against that idea, as it introduces additional complexity both for game ("why do I need to explicitly add all these basic subsystems which needed for every game anyway?") and engine ("can't I assume that ECS library is already included?") developers.
from amethyst.
All in all, after a discussion in Gitter, I came to a thought, that maybe none of this is needed. ECS, Graphics, Audio are all must-have for every video game, so why bother with 'shards'. It sounds cool, it looks cool, but for the simplicity sake and as common sense tells, it's better just to have monolithic game engine. It will ease interdependencies and all.
from amethyst.
I would think of it the same way, the 'Engine' should be an ECS/Event or similar driven engine with others 'Shards' that add components and systems, whether Scenegraph (octree systems, portal systems, etc... and related components), OGL/Vulkan/DX Rendering systems (or none for, say, a headless server, heck someone could make a Console rendering system that dumps information to the console or over SSH or so). Just simple addable parts to let people add and use only what they need.
from amethyst.
We're pretty unlikely to implement this at this point. No one is motivated to do so and we have cargo features and modularization if anyone really needs to do something like this. So I'm closing this.
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.