Open p2r3 opened 3 months ago
One solution that I've only taken a glance at, which also seems too good to be true, is SourceTV. I don't see any documentation of this working on an unmodified Portal 2 client, and I don't really expect it to, either. That's the first thing I'm investigating, because it's the one solution most likely to give a quick, conclusive "yes" or "no" answer.
Another option is... custom VScript magic. This would essentially mean rewriting demos in a way that lets the game state be recorded in a reproducible way and reported through a WebSocket in real-time, which other clients could then subscribe to. This is a major development cost, probably spinning off into its own little project. We won't really know if this is reliable until long after development starts. Managing entities and their properties (creating/destroying props on the fly), synchronization issues, lack of data (things like gel spread or prop velocity) would all be a nightmare. This should be the last option.
Lastly, and this is some purely theoretical grasping at straws, it might be possible to read a demo file as it is being written and reproduce that demo on another client. I don't yet understand demos well enough to know how reasonable this is, but faking a valid header doesn't seem hard, and relying on the already existing demo infrastructure seems more reasonable than reinventing the wheel.
This is less a code issue, more a discussion (or dump) of possible solutions to this problem.
It's essential that Epochtal Live games can be spectated live, at least from some administrative host position, but ideally by pretty much anyone who wishes to watch the game on their client. This issue closes once a viable solution is found, but not necessarily implemented. For tracking implementation, a new issue (or series of issues) should open.