You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few days ago I brainstormed what a Bevy VSCode extension could do, and these are my (slightly disorganized) thoughts. If you particularly like / dislike a feature, or want to discuss, please feel free in the comments below!
Snippets
Snippets are the equivalent of multi-line autocomplete. It would be quite easy to support snippets for:
Components
Resources
Plugins
Apps
I'm thinking a very simple App::new().run() in this case.
Systems may also be possible, but more difficult.
App introspection
I can see many scenarios where it would be useful to extract information from a the App:
Plugin tree
If the information is available, this could display which PluginGroups added which plugins.
When plugin dependencies is implemented, this could also be displayed.
Schedule graph
System(set) ordering
System piping
If debug info can be discovered (maybe through Location), then you could automatically jump to the file and line number of a system.
Resource viewer
It may not be possible to view all added resources, since some are added after plugins are built. (Such as the Startup schedule.)
Observer viewer
Event viewer
Especially useful for visualizing the new event features.
Type registry viewer (reflection)
One possible solution to accomplish this task could be:
Define a VSCodePlugin and manually add it to the App.
When the bevy-vscode/debug-introspection flag is enabled, the plugin will collect a bunch of data and save it to a JSON file within target/bevy-vscode. It will then call std::process::exit(0).
The VSCode extension will run the app with this flag (terminating it if it takes too long), then parse the exported JSON data.
Higher-level system editor
I could see a system editor that auto-discovers system parameters within your function body. I'm not sure how this could be accomplished, but it may be useful for automating the repetitive aspects of systems.
PBR material editor
This may be stepping into Blender's territory, but it should be possible to create a PBR editor view that can then export the code into your editor. In the future this could also load existing material definitions, though that may require a Rust interpreter.
Example runner
Quite often I find myself copying over Bevy's examples, but it takes quite a lot of navigation to get to the correct branch. It would be really nice to have a VSCode command that can automatically download and run these examples for you, detecting the Bevy version in Cargo.toml.
Feature solver
It seems I just can't escape feature flags... :P
When preparing a game for production, it is common to disable all of Bevy's features and manually specify the ones needed. While this is probably out of scope, it would be nice to automate this by progressively removing features and testing if the code still compiles. It would probably need some hard-coded feature information (especially for file format features), but it would be handy.
So yeah, these are a few of my ideas that may actually be useful. I think the easiest to implement are snippets and the example runner, though app introspection would be the most useful.
Please tell me your thoughts, I'm curious what you all think of this!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
A few days ago I brainstormed what a Bevy VSCode extension could do, and these are my (slightly disorganized) thoughts. If you particularly like / dislike a feature, or want to discuss, please feel free in the comments below!
Snippets
Snippets are the equivalent of multi-line autocomplete. It would be quite easy to support snippets for:
App::new().run()
in this case.Systems may also be possible, but more difficult.
App introspection
I can see many scenarios where it would be useful to extract information from a the
App
:PluginGroup
s added which plugins.Location
), then you could automatically jump to the file and line number of a system.Startup
schedule.)One possible solution to accomplish this task could be:
VSCodePlugin
and manually add it to theApp
.bevy-vscode/debug-introspection
flag is enabled, the plugin will collect a bunch of data and save it to a JSON file withintarget/bevy-vscode
. It will then callstd::process::exit(0)
.Higher-level system editor
I could see a system editor that auto-discovers system parameters within your function body. I'm not sure how this could be accomplished, but it may be useful for automating the repetitive aspects of systems.
PBR material editor
This may be stepping into Blender's territory, but it should be possible to create a PBR editor view that can then export the code into your editor. In the future this could also load existing material definitions, though that may require a Rust interpreter.
Example runner
Quite often I find myself copying over Bevy's examples, but it takes quite a lot of navigation to get to the correct branch. It would be really nice to have a VSCode command that can automatically download and run these examples for you, detecting the Bevy version in
Cargo.toml
.Feature solver
It seems I just can't escape feature flags... :P
When preparing a game for production, it is common to disable all of Bevy's features and manually specify the ones needed. While this is probably out of scope, it would be nice to automate this by progressively removing features and testing if the code still compiles. It would probably need some hard-coded feature information (especially for file format features), but it would be handy.
So yeah, these are a few of my ideas that may actually be useful. I think the easiest to implement are snippets and the example runner, though app introspection would be the most useful.
Please tell me your thoughts, I'm curious what you all think of this!
Beta Was this translation helpful? Give feedback.
All reactions