Commit Graph

20 Commits

Author SHA1 Message Date
Tangent Wantwight 2c4753e1b9 Bump tokio/warp versions 2021-02-13 15:01: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 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 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