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

Determine legal moves in the webclient #81

Closed
kreibaum opened this issue Oct 17, 2022 · 3 comments
Closed

Determine legal moves in the webclient #81

kreibaum opened this issue Oct 17, 2022 · 3 comments
Labels

Comments

@kreibaum
Copy link
Owner

Use the work done in #68 to determine legal moves in the frontend. This will make the "dots" where you can place the piece appear a lot faster on slow connections.

I should add some "websocket delay" rocket config so I can properly simulate a bad connection.

@kreibaum
Copy link
Owner Author

kreibaum commented Feb 6, 2023

I just played with some other passenger on a train and this one was really missing. So a solution might be brought to you soon courtesy of Deutsche Bahn.

@kreibaum
Copy link
Owner Author

I think this is really two requirements.

Just calculating valid moves in the client reduces network traffic a tiny bit, but the server still needs to acknowledge each action.

However, moving the legal moves into the Frontend makes it possible to optimistically skip the acknowledgement with a letter change.

This would save me from building the optimistic Frontend logic while already reaching into WASM - I can also use that for check warnings that Origami Man asked for.

I recently showed the game to some new players and understood how that would help them.

@kreibaum
Copy link
Owner Author

kreibaum commented Mar 5, 2024

Since I was already optimistically showing the action as executed, it actually wasn't hard to also optimistically determine legal actions.

The behavior on re-connection still isn't great, but at least all the actions are actually retained and just replayed on re-connection.

@kreibaum kreibaum closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant