Tangent Wantwight
1fdea3e454
Move client message processing into client agent
2021-02-13 22:23:24 -05:00
Tangent Wantwight
b6c3c69777
Create struct for client agent
2021-02-13 21:48:29 -05:00
Tangent Wantwight
3f6b55dcc4
Start breaking the handle-client task into its own module
2021-02-13 21:28:45 -05:00
Tangent Wantwight
2c4753e1b9
Bump tokio/warp versions
2021-02-13 15:01:28 -05:00
Tangent Wantwight
1ef5565be1
Update dependencies
2020-11-06 12:52:28 -05:00
Tangent Wantwight
f624148464
Switch to processing connections via unified message select-loop
2020-07-09 22:02:30 -04:00
Tangent Wantwight
82f1f81760
Adapt the socket in main without having to split it
2020-06-19 00:53:06 -04:00
Tangent Wantwight
ea2770105a
Update input & state in response to client messages!
2020-06-08 22:58:42 -04:00
Tangent Wantwight
334ecc6eaf
update player_id in sent-out SetState messages
2020-06-08 22:08:36 -04:00
Tangent Wantwight
9fcbc42a41
Send input state out to clients every tick
2020-06-08 20:09:31 -04:00
Tangent Wantwight
a16bd95c6a
Store input state for each player
2020-06-08 20:06:02 -04:00
Tangent Wantwight
0c9e2e2a0e
Accurately inform each connected player of their player id
2020-06-08 19:56:48 -04:00
Tangent Wantwight
a7dc49996f
Give the message structs friendlier field names on the Rust side, because Serde lets us do that
2020-06-08 19:50:56 -04:00
Tangent Wantwight
c199e14435
Make the heartbeat task call the server's tick() method regularly.
...
The plumbing to get the tick task a reference to a server handle is a bit ugly;
some of the server methods should probably move to the handle impl instead.
2020-06-08 09:33:15 -04:00
Tangent Wantwight
3f07748abd
Sync TICK_LENGTH constant between client & server
2020-06-07 01:56:06 -04:00
Tangent Wantwight
d2fe79b55c
Spawn a heartbeat task while players are connected to the server, aborting it once they're off.
2020-06-05 22:14:28 -04:00
Tangent Wantwight
9239c19cbe
Abort the "send to client" task when the websocket is closed
2020-06-03 00:50:12 -04:00
Tangent Wantwight
dacb031443
Remove some generics & make some typedefs.
2020-05-30 20:08:02 -04:00
Tangent Wantwight
eee34eb3ff
tidy up
2020-05-30 19:16:50 -04:00
Tangent Wantwight
43babbbfab
Maintain state records for connected players
2020-05-30 16:10:55 -04:00
Tangent Wantwight
750cfe1630
Create a PlayerId typedef, don't overload -1 for unassigned.
2020-05-26 23:32:28 -04:00
Tangent Wantwight
764e4d85cf
Build out skeleton of server message processing flow
2020-05-25 23:38:18 -04:00
Tangent Wantwight
48ab9547ed
Bizarre hack that seems to fix the type_length_limit error, but I'm not sure why
2020-05-25 23:24:55 -04:00
Tangent Wantwight
319f082d53
move client logic into one async fn
2020-05-25 22:17:44 -04:00
Tangent Wantwight
eb7ea021b0
hide some generics that don't need to be generic
2020-05-24 23:14:25 -04:00
Tangent Wantwight
03e4512839
Move greeting into its own function, tidy up error path.
2020-05-24 20:53:30 -04:00
Tangent Wantwight
cf513ace26
Move HELO to actually come from the server
2020-05-23 14:24:49 -04:00
Tangent Wantwight
0fab0e8c56
Create Serde structs for messages
2020-05-18 22:12:11 -04:00
Tangent Wantwight
e9c73ae998
Implement connection to websocket server
2020-05-17 23:47:50 -04:00
Tangent Wantwight
6491588223
Add proper "helo" message to protocol so client can be sure server is ready to receive input.
2020-05-17 23:39:28 -04:00
Tangent Wantwight
ca5bf65e9d
Change message type enum to serde-friendly strings; remove unused Ping message
2020-05-12 23:00:06 -04:00
Tangent Wantwight
5c9552fe49
lowercase folders for Rust convention compatibility
2020-05-10 18:47:03 -04:00