godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.59k stars 170 forks source link

Create `EditorControlSocket` Plugin for the Godot Editor #318

Open DaelonSuzuka opened 2 years ago

DaelonSuzuka commented 2 years ago

I've started working on a plugin to expose editor functionality to a websocket control interface, similar to obs-websocket. This will allow bidirectional communication and unlock new functionality without trying to shoehorn things into the Language Server. This plugin won't be vscode/godot-tools specific, but would allow other text editors/software to control the godot editor or react to events from it.

Some open issues can be resolved using this interface.

Uses I've thought of so far:

DaelonSuzuka commented 2 years ago

Phase one trials of the EditorControlSocket plugin:

https://user-images.githubusercontent.com/18042232/153750270-5761f6c8-5ff9-4528-9cdd-2c2705d2a398.mp4

Calinou commented 2 years ago

If this WebSocket server is to be a built-in feature of the Godot editor, please open a proposal on the Godot proposals repository :slightly_smiling_face:

I like the idea, but I'm not sure how often it will be used in practice. It's definitely useful for "Twitch plays Godot Engine"-style stuff, but we need to see more "serious" use cases emerge first.

DaelonSuzuka commented 2 years ago

No, it's not supposed to be a built-in editor feature. The point is that it allows building features for godot-tools that do things the Language Server doesn't support yet, or shouldn't support. Additionally, it unlocks godot-tools from the editor's release schedule, meaning that bugs can fixed without waiting (potentially years) for patches to make it through to editor releases.

There's already several "serious" use cases in open issues, like #211, which I can fix today using this control socket plugin.