beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
222 stars 102 forks source link

Add unsynced `wupget:FileChanged(path)` #1736

Open sprunk opened 4 weeks ago

sprunk commented 4 weeks ago

User stories

1) Develop a wupget, either in SDD folder or as a raw file. Engine doesn't notice changes, so every time you change a file you need to do something to reload it (call some VFS. function if it's a widget, call /reloadceg if it's a CEG, etc). Currently this can't be automated well because you need to poll all potential changed files (load file, compare, reload if different). You can make some assumptions (e.g. force a check on alt-tab) but that is fragile. See e.g. https://github.com/beyond-all-reason/Beyond-All-Reason/pull/3651

2) Have a crude widget that accepts live external input via some .txt file, because files are way more beginner friendly than sockets for multiple reasons. Same story here - you gotta poll the file for changes, you can miss a quick change if the rate is slow and will waste performance if the rate is high.

Proposal