goto-bus-stop / dprun

DPRun is a standalone C Windows/Wine utility for starting DirectPlay lobbyable applications.
GNU General Public License v3.0
10 stars 5 forks source link

Adding a restore option? #6

Open mandai2 opened 2 years ago

mandai2 commented 2 years ago

Hi, games like AOE2 and SWGB have an option to restore a saved game (for example if a player has disconnected or the game went out of sync, or someone made a manual save). Is there some way that this can be added? From what I can see it would just be needed for the host to start in restore mode, then once they have chosen their file the other players can join normally.

goto-bus-stop commented 2 years ago

If I remember correctly restores work by GETPROPERTY calls. this tool replies to each GETPROPERTY call with an UNSUPPORTED response: https://github.com/playage/dprun/blob/0f3c5c00bb562315984e1850384d8dc64bd213ac/cli/main.c#L222-L233

to make restores work, either this tool would need a special feature for it, but restores are implemented differently in different applications. the more flexible approach would be to proxy the calls that the application makes through dprun to the host application. I started working on doing that with JSON RPC over standard i/o back then on the https://github.com/playage/dprun/tree/jsonrpc branch. that would be the most flexible. But it's pretty far from complete and i haven't done anything with directplay in a few years :(