Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Known issues, too may to list
(1) Issues with socket.io after time, hanging clients. Prevents new clients from connecting. I had this issue with the old GUI before the refactor, after multiple attach/detaches but couldn't figure out what was going on. Should really upgrade to engine.io, far more consistent (would require entire blinken websockets refactor) ... This has apparently been an issue with socket.io since 2011, still an issue as of 10 days ago (socketio/socket.io#430)
I have fixed this temporarily with an ugly ping/pong workaround (no pun intended)
(2) Countdown only happens once, conditions are skipped likely due to hanging clients.
(3) Sometimes it will start playing, but controls won't work.
(4) Paddle sends repetitive data, should only send when the value has changed (it's normalized, so it may send the same pos more than once in sequence.)
(5) One oft he paddles is backwards. Someone over there needs to determine which one, and it's a relatively easy fix.
(6) If a client/leaves or joins during certain states, it gets glitchy (edge cases)
Solutions, tomorrow
(1) Remove auto-attach, replace with idle/waiting attach (fixes at least 3 of those)
(2) Debug states further (it's not the correct solution, but didn't have the time to do game state management correctly)
(3) Fix paddle sequential send
(4) All else fails, turn it off and on again :)
That said, it works...kinda
GUI is in pong2.html.
Again it's buggy, will do my best to fix tomorrow. Looked at snake again, feel good about it. One player, super simple, no backend refactor required for GUI