Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Runtime Dynamic Components and Systems ( To Support Scripting Initiatives ) #142

Closed
zicklag opened this issue Aug 12, 2020 · 5 comments
Labels
A-ECS Entities, components, systems, and events C-Enhancement A new feature S-Needs-Design-Doc This issue or PR is particularly complex, and needs an approved design doc before it can be merged

Comments

@zicklag
Copy link
Member

zicklag commented Aug 12, 2020

This continues from #114 (comment).

The Goal

First off, for this issue, the purpose is not to create a scripting system for bevy. A scripting system that allows you to use other languages for programming Bevy games is, in the context of the official Bevy engine, outside of scope ( reference: #114 (comment) ). This will not include an FFI, or anything other than a Rust API.

What we are trying to do is add to the existing bevy Rust API the ability to register components and systems at runtime with the purpose of allowing other projects to implement different forms of scripting/modding/FFI themselves.

Next Steps

The next step is to come up with an API proposal. The goal is to make a simple API and avoid imposing any extra cruft or otherwise stuff to think about for users that have absolutely no interest in scripting. Keep things ergonomic whether you are scripting or not.

I'm going to do some looking into the bevy_ecs and getting a feel for how things are currently setup. I'll probably be creating a draft PR as soon as I can, regardless of how unready it is, that will show what I'm thinking.


Edit: There's now a PR for this: #623.

@karroffel karroffel added A-ECS Entities, components, systems, and events C-Enhancement A new feature labels Aug 12, 2020
@StarArawn
Copy link
Contributor

I'm interested in this as I would like to create a bevy_wren plugin for my own purposes and perhaps share for other people to use.

We would need a way of registering and un-registering ecs at runtime if we want to support hot-reloading I think.

@zicklag
Copy link
Member Author

zicklag commented Aug 17, 2020

That would be cool. :)

That's funny, though, I hadn't thought about un-registering yet. I doubt it will be much more difficult to implement or anything, but I'll keep that in mind.

If you're interested in helping this effort, right now our next step is some brainstorming around ComponentId ideas here: #32 (comment).

@zicklag
Copy link
Member Author

zicklag commented Oct 10, 2020

I think #623 is getting pretty close to addressing the bulk of this! 🎉 I think it manages a design that will allow for runtime queries and systems without hurting the typical static queries and systems. It could use review from anybody who can manage to take a look!

@alice-i-cecile alice-i-cecile added the A-Core Common functionality for all bevy apps label Feb 17, 2021
@zicklag
Copy link
Member Author

zicklag commented Mar 11, 2021

Latest updates on this ( see #623 (comment) for details ): some thought has gone into dynamic components ( #1527, notes ) and #623 is being closed in favor of more targeted developments.

@alice-i-cecile alice-i-cecile added the S-Needs-Design-Doc This issue or PR is particularly complex, and needs an approved design doc before it can be merged label Jul 17, 2021
@alice-i-cecile alice-i-cecile added A-App Bevy apps and plugins and removed A-Core Common functionality for all bevy apps A-App Bevy apps and plugins labels Mar 5, 2022
@zicklag
Copy link
Member Author

zicklag commented Aug 8, 2022

With the release of Bevy 0.8 and it's addition dynamic ECS features, and the demonstration of them in https://github.com/jakobhellermann/bevy_mod_js_scripting, we're well on our way to full blown scripting and modding ability!

Things I haven't tested yet:

That said, I think we can close this in favor of tracking specific issues, and we can open new issues if necessary.

I'm super excited that this is becoming possible! 🥳

Thank you everybody for all your great work! 🌟

@zicklag zicklag closed this as completed Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Enhancement A new feature S-Needs-Design-Doc This issue or PR is particularly complex, and needs an approved design doc before it can be merged
Projects
None yet
Development

No branches or pull requests

4 participants