Update .gitignore to exclude TypeScript build info and add dist directory. Expand README with project overview, technology stack, prerequisites, and instructions for running and testing the application.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
namespace HSchool.Protocol;
|
||||
|
||||
/// <summary>First frame from the client: protocol version handshake plus display name.</summary>
|
||||
public readonly record struct ClientHelloMessage(byte ProtocolVersion, string PlayerName);
|
||||
|
||||
/// <summary>
|
||||
/// Movement intent for one client frame. <paramref name="Sequence"/> is echoed back
|
||||
/// in future snapshots once client-side prediction lands.
|
||||
/// </summary>
|
||||
public readonly record struct ClientInputMessage(uint Sequence, InputButtons Buttons);
|
||||
|
||||
/// <summary>Round-trip probe; the server mirrors <paramref name="ClientTimeMs"/> back untouched.</summary>
|
||||
public readonly record struct ClientPingMessage(long ClientTimeMs);
|
||||
|
||||
/// <summary>
|
||||
/// Sent once per connection, before the first snapshot.
|
||||
/// <paramref name="PlayerEntityId"/> is the replication id of this client's own avatar,
|
||||
/// so the renderer can tell it apart from everyone else.
|
||||
/// </summary>
|
||||
public readonly record struct ServerWelcomeMessage(
|
||||
byte ProtocolVersion,
|
||||
uint PlayerEntityId,
|
||||
byte TickRate,
|
||||
float WorldWidth,
|
||||
float WorldHeight);
|
||||
|
||||
/// <summary>One entity inside a snapshot. Kept flat and blittable on purpose.</summary>
|
||||
public readonly record struct EntitySnapshot(
|
||||
uint Id,
|
||||
EntityKind Kind,
|
||||
float X,
|
||||
float Y,
|
||||
float Radius,
|
||||
uint Color);
|
||||
|
||||
/// <summary>Answer to <see cref="ClientPingMessage"/>, carrying the current server tick.</summary>
|
||||
public readonly record struct ServerPongMessage(long ClientTimeMs, uint ServerTick);
|
||||
Reference in New Issue
Block a user