[Game] Button to return to lobby #75

Open
opened 2024-05-18 17:51:16 +00:00 by Erzangel · 4 comments
Owner

I would link this to routing personally, a game should not be in the same route

I would link this to routing personally, a game should not be in the same route
Fhuris added this to the 1.1 milestone 2024-05-18 17:57:51 +00:00
legonzaur added the enhancement label 2024-05-19 20:43:52 +00:00
legonzaur added this to the HeronSkyMap project 2024-05-19 20:49:14 +00:00
legonzaur added a new dependency 2024-05-19 20:54:12 +00:00
legonzaur removed a dependency 2024-05-19 20:54:17 +00:00
Owner

Cleaner way would be to add #26 as a dependency but we might want to implement a a workaround without routes before 2.0

Cleaner way would be to add #26 as a dependency but we might want to implement a a workaround without routes before 2.0
Author
Owner

@legonzaur, how dirty would it be in the frontend code to do something like "goStore.context = lobby"? I see that all "page transitions" are done with a call to the websocket, but when we leave a game I suppose we do not need such a thing

@legonzaur, how dirty would it be in the frontend code to do something like "goStore.context = lobby"? I see that all "page transitions" are done with a call to the websocket, but when we leave a game I suppose we do not need such a thing
Erzangel added the question label 2024-05-22 17:54:36 +00:00
Owner

@legonzaur, how dirty would it be in the frontend code to do something like "goStore.context = lobby"? I see that all "page transitions" are done with a call to the websocket, but when we leave a game I suppose we do not need such a thing

With how the websocket currently works, it is not possible at all. Context is sent by the backend and represents a set of available calls that the backend can currently accept from the client. It is not possible to change this on the client side.

A cleaner solution would be to wait for 2.0. As I will implement multiplexing, the context property shouldn't be used anymore.

> @legonzaur, how dirty would it be in the frontend code to do something like "goStore.context = lobby"? I see that all "page transitions" are done with a call to the websocket, but when we leave a game I suppose we do not need such a thing With how the websocket currently works, it is not possible at all. Context is sent by the backend and represents a set of available calls that the backend can currently accept from the client. It is not possible to change this on the client side. A cleaner solution would be to wait for 2.0. As I will implement multiplexing, the context property shouldn't be used anymore.
Owner

A workaround before 2.0 to return to the lobby would be to reload the page.

A workaround before 2.0 to return to the lobby would be to reload the page.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: heronfief/front#75