h0uter / galgo

1 stars 1 forks source link

feat: Introduce play over network mode #7

Open bobluppes opened 1 month ago

bobluppes commented 1 month ago

The goal of this issue is to introduce a "play over network mode". In this mode, 2 players play against each other over the network. One player takes on the role of "Word Master" and comes up with the word to guess, while to other player takes on the role of "Guessing Player" and submits guesses to the Word Master until they either win or lose the game. (These names are probably quite bad, so any ideas are more than welcome).

We have a PoC PR (#3) which introduces this. However, this solely serves as a PoC and we will introduce new (smaller scoped) PRs targeting main to introduce the feature properly. In order to get this feature to main, the proposal of this issue is to make the following incremental improvements:

Preparation for working in parallel

Parallel stream 1: local 2 player mode

Parallel stream 2: transport layer

Integration

h0uter commented 1 month ago

some ideas in no particular order:

bobluppes commented 1 month ago

some ideas in no particular order:

* Instead of doing the low-level networking ourselves we could also use [zenoh](https://docs.rs/zenoh/latest/zenoh/) to perform the interfacing using higher level pub sub pattern. What would we rather learn how to use?

Personally, I would be very interested in learning the TCP stack which rust implements in the standard library (tried this in the PoC and it is actually very doable).

But why don't we do both! Pub sub sounds interesting as well! If we introduce the correct abstractions at the interface layer we could always swap one implementation for the other if we feel like it :)