Bevy: [Feature] Runtime Dynamic Components and Systems ( To Support Scripting Initiatives )

Created on 12 Aug 2020  路  3Comments  路  Source: bevyengine/bevy

This continues from https://github.com/bevyengine/bevy/issues/114#issuecomment-672622816.

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: https://github.com/bevyengine/bevy/issues/114#issuecomment-672397351 ). 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.

ecs enhancement

Most helpful comment

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.

All 3 comments

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.

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: https://github.com/bevyengine/bevy/issues/32#issuecomment-674588684.

I think #623 is getting pretty close to addressing the bulk of this! :tada: 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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TehPers picture TehPers  路  4Comments

cart picture cart  路  3Comments

atsuzaki picture atsuzaki  路  4Comments

PradeepKumarRajamanickam picture PradeepKumarRajamanickam  路  4Comments

StarArawn picture StarArawn  路  4Comments