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

Basic ws server #903

Merged
merged 35 commits into from
Dec 4, 2023
Merged

Basic ws server #903

merged 35 commits into from
Dec 4, 2023

Conversation

ddimaria
Copy link
Collaborator

@ddimaria ddimaria commented Nov 29, 2023

  • TS types for messages
  • TS should only send messages once during its update loop (currently set to 15 messages/second)
  • basic mulitplayer cursor
  • basic multiplayer selection
  • Basic shell of a websocket server
  • Shared state
  • EnterRoom endpoint + code
  • MouseMove endpoint + code
  • Integration tests

For a separate PR

  • transaction sharing
  • multiplayer cursor shouldn't show when hovering over UI elements
  • better uuid for User (right now it's changed to a string)
  • auto generate TS types using ts-rs
  • Mock the socket in tests

Copy link

vercel bot commented Nov 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quadratic ✅ Ready (Inspect) Visit Preview Dec 4, 2023 9:36pm

@ddimaria ddimaria changed the base branch from main to a-team November 29, 2023 23:07
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 November 29, 2023 23:08 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 November 30, 2023 15:26 Inactive
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Attention: 60 lines in your changes are missing coverage. Please review.

Comparison is base (7f71bba) 88.18% compared to head (1d2b49b) 88.13%.
Report is 14 commits behind head on a-team.

Files Patch % Lines
quadratic-multiplayer/src/server.rs 77.77% 40 Missing ⚠️
quadratic-multiplayer/src/message.rs 91.78% 12 Missing ⚠️
quadratic-multiplayer/src/main.rs 0.00% 3 Missing ⚠️
quadratic-multiplayer/src/test_util.rs 92.50% 3 Missing ⚠️
quadratic-multiplayer/src/state.rs 96.15% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           a-team     #903      +/-   ##
==========================================
- Coverage   88.18%   88.13%   -0.05%     
==========================================
  Files          99      105       +6     
  Lines       17327    17762     +435     
==========================================
+ Hits        15280    15655     +375     
- Misses       2047     2107      +60     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 November 30, 2023 15:37 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 November 30, 2023 15:50 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 November 30, 2023 19:09 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 November 30, 2023 19:50 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 November 30, 2023 19:59 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 November 30, 2023 21:45 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 December 4, 2023 15:49 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 December 4, 2023 16:15 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 December 4, 2023 16:26 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 December 4, 2023 16:47 Inactive
@@ -0,0 +1,2 @@
HOST=127.0.0.1
PORT=3001
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think port 443 is the one people use most of the time for WS

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for local dev, so don't want ssl here. We should have ssl/wss for any real usage thought.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. sounds good. I'll add an item to a-team so we remember before shipping

multiplayer.sendMouseMove();
}}
onPointerMove={(e) => {
console.log('hi');
Copy link
Collaborator

@davidkircos davidkircos Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup before merge

@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 December 4, 2023 20:27 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 December 4, 2023 21:25 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-903 December 4, 2023 21:32 Inactive
@davidkircos davidkircos merged commit 031d51c into a-team Dec 4, 2023
4 of 9 checks passed
@davidkircos davidkircos deleted the basic-ws-server branch December 4, 2023 22:06
@ddimaria ddimaria mentioned this pull request Dec 6, 2023
28 tasks
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.

3 participants