Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement session streaming #18

Open
onkoe opened this issue Apr 12, 2024 · 0 comments
Open

Implement session streaming #18

onkoe opened this issue Apr 12, 2024 · 0 comments

Comments

@onkoe
Copy link
Owner

onkoe commented Apr 12, 2024

To get a game loop going, we'll need to define a 'session' - which is just a fancy term for "singleplayer or multiplayer" save streaming.

In my view, a shared::Session type would be preferable, as both the server and client rely on differentiating the two kinds of sessions.

However, I haven't chosen how I want a session's connection to look. We'll see.

IPC

Previously, I intended to use local WebSockets for local session streaming. After reading into Eclipse Zenoh, though, I think Eclipse iceoryx2 is my preference!

Before, I was thinking that I would likely write a server that mostly focuses on multiplayer, and simply permits singleplayer sessions with local WebSockets. iceoryx2 changes things, though: it may be worth focusing on singleplayer first.

It's also worth noting that iceoryx2 [doesn't currently support iOS/Android](https://github.com/eclipse-iceoryx/iceoryx2, so they may need an IPC-less fallback. To be honest, though, even Bevy has trouble supporting mobile devices...

WAN

For long-distance (i.e., server) connections, I'm not quite sure what I want yet. Here's a list of minor complaints:

  • WebSockets (tungstenite): these are common but use TCP underneath, so they're slooooow
  • gRPC (tonic): uses HTTP/2 :p
  • WebTransport (wtransport): kinda uncommon and based on a draft specification
    • This might be nice if I'm careful with versioning and expectations... 😭

Even with the benefits of WebTransport, it probably won't work right in the browser yet, and I'm still left building a whole web server. Seriously, I might throw something together using a server framework like axum and call it a day. These things are giving me a headache...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant