Might be completely out of scope but online co-op would be nice and all you'd theoretically have to synchronize is the save file, inputs and random determinism, I do not know hades, it could be an absolute nightmare to get the game to act in the described way but i've implemented delay based netcode in other projects before and its pretty easy to work with.
A nice proof of concept would be the training area working.
If you aren't very knowledgeable of delay based netcode:
- You'd have make the games core update logic a fixed timestep system.
- The game would capture your inputs, send it over the network with the attached frame id and input data, while storing the input data in an dictionary / array with the corresponding key (frame id + delay), and whenever the game reaches that frame id, it uses the input data from that dictionary.
- Prevent the game from updating if the frame id was to exceed a remotes last synchronized frame id.
- Prevent "Deadlocking" which is where you and a remote are on the same frame id, causing neither clients to progress, its pretty simple, just continue capturing and sending inputs even if the game isnt progressing.
- Ping pong packet
- Make delay manually configurable
Optional Quality of Life:
- Calculate ping and display it above players heads,
- Automatically set the amount of delay to the highest ping out of all remotes, rounding to ceiling (HighestRemotePing / FixedFrameRate)
I do not know C++ so I cannot really help with the C++ side.
I have done Lua for about 5 years though.
Provided C# code examples
https://github.com/nptnk/TSBRaylib/blob/main/TSB/src/Engine/Handlers/UpdateHandler.cs
https://github.com/nptnk/TSBRaylib/blob/main/TSB/src/Engine/Networking/DelayNetcodeImplement.cs
https://github.com/nptnk/TSBRaylib/blob/main/TSB/src/Game/Input/InputValue.cs
https://github.com/nptnk/TSBRaylib/blob/main/TSB/src/Engine/Input/TickBasedInput.cs
Might be completely out of scope but online co-op would be nice and all you'd theoretically have to synchronize is the save file, inputs and random determinism, I do not know hades, it could be an absolute nightmare to get the game to act in the described way but i've implemented delay based netcode in other projects before and its pretty easy to work with.
A nice proof of concept would be the training area working.
If you aren't very knowledgeable of delay based netcode:
Optional Quality of Life:
I do not know C++ so I cannot really help with the C++ side.
I have done Lua for about 5 years though.
Provided C# code examples
https://github.com/nptnk/TSBRaylib/blob/main/TSB/src/Engine/Handlers/UpdateHandler.cs
https://github.com/nptnk/TSBRaylib/blob/main/TSB/src/Engine/Networking/DelayNetcodeImplement.cs
https://github.com/nptnk/TSBRaylib/blob/main/TSB/src/Game/Input/InputValue.cs
https://github.com/nptnk/TSBRaylib/blob/main/TSB/src/Engine/Input/TickBasedInput.cs