wiremod / wirebox

Wire for S&Box. Early WIP.
MIT License
37 stars 8 forks source link

Debugger: Add wire connection visualization #30

Open Nebual opened 1 year ago

Nebual commented 1 year ago

It'd be nice to have a more visual indication in the debugger of which inputs/outputs are wired together. Maybe we can draw lines/arrows between all wired ports of currently debuggered ents, like a UML diagram.

Nebual commented 11 months ago

I spotted this game Plasma in the Wire discord, which has an interesting wiring demonstration in the trailer I think we could consider stealing:

2023_09_08_16-31-09_firefox 2023_09_08_16-35-57_firefox

The wiring panel has Inputs, Outputs, and Config(?) which can be manually edited in the UI (replacing most of the need for Constant Value gates, and providing a smarter home for everything previously configured in the Tool Panel). The Configs also work as Inputs, so you can wire to override them. I'm not sure if we actually need to distinguish between Config and Inputs for most Wire ents though, so maybe its not worth inventing a distinction, we can just allow all Inputs to be configured (and if you happen to manually enter something into "Clk", well, it'll activate once, which is probably not very useful but exactly what you'd expect). This "all inputs can be configured" would also save us a lot of effort making Tool Panels, since all of this would be generically handled. We just build controls for each of the Types, and then we don't really need the Ranger tool to have checkboxes for "Default to 0" and "Range", we can just configure those in the debugger.

Plus, they have cool "click and drag" to form wires between inputs and outputs, which could be cool if we built that into the debugger or something.

I'm kinda picturing, as an alternative to the Wiring Tool, if you debugger 3 unwired ents, you'd see UI like this, and can thus create/remove/change wires and values right from that UI. If it works well, I could see people not even bothering to use the classic Wiring tool.