Open bhowl opened 2 years ago
Good stuff! So our backend and frontend should communicate via WebSockets. It would be ideal to use Socket.io (which is built on top of the WebSocket protocol) to have the long-polling fallback for older browsers and automatic reconnection.
Northern guild folks appear to be working with Socket.io too:
Been working with Socket.io, pretty cool stuff I must say 🤔 pic.twitter.com/sOUJ8UweC3
— The BrunoDB3 (@brunodb_3) April 15, 2022
potentially useful go libraries: go-socket.io fiber-websocket
Here is a good article explaining client-server game architecture: https://www.gabrielgambetta.com/client-server-game-architecture.html
& here is a ru·di·men·ta·ry drawing on my very ru·di·men·ta·ry understanding of how turtles may stack:
Socket.io sounds good to me! turtles are looking well balanced.
It would be interesting down the line to look into the possibility of using websockets as the foundation for security purposes but then implementing webRTC for things like movements so attacks will have more precision. Might not be necessary at all or even possible without jeopardizing security, but it strikes my curiosity.
This is a little off topic for this issue but I don't feel like it merrits another issue, I was poking around in the source code for the demo and i noticed they are using react for the general "web app", and pixijs for the actual game. I think that makes sense and should be added t the tech stack. Additionally i noticed they are using Typescript, which is essentially the standard now for scaleable javascript apps, and so i think we should implement that as well. Its not something initailly vital though and its easy enough to add types later, but something to keep in mind at least.
How do we make our game multiplayer? What parts of the stack are directly involved?
Lastly, here is the github catalog of websocket apis for golang... but I'm kind of confused on where this needs to be impemented. Maybe a js websocket API would do or we don't need one at all because of the go fiber framework? maybe if someone could draw a picture of turtles stacked on top of one another i would understand
also some WebRTC