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

websocket example opens connection on startup #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Heysem
Copy link

@Heysem Heysem commented Dec 26, 2022

Previously the websocket example would ignore the first player input when pressing the button. With this change the game engine will open a websocket connection on startup so the first input will not be ignored.

Previously the websocket example would ignore the first player input when pressing the button. With this change the game engine will open a websocket connection on startup so the first input will not be ignored.
@Heysem
Copy link
Author

Heysem commented Dec 26, 2022

On a second thought this seems like a workaround for a bug in https://github.com/PurpleKingdomGames/indigo/blob/e4a55b6b4cb93d6dd2b162a0ab2773d097d79b8c/indigo/indigo/src/main/scala/indigo/platform/networking/WebSockets.scala#L31
From reading the code a Send should also open a connection if there wasn't one already and then send the message.

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

Successfully merging this pull request may close these issues.

1 participant