Skip to content

RFC Gap: Room protocol remaining details (port allocation, game message payloads, NPS-MCOTS integration) #2806

@drazisil

Description

@drazisil

Summary

Follow-up to #2805. The docs/room-game-server-protocol.md file addresses most room protocol questions, but a few details remain undocumented.

Remaining Gaps

1. Port Allocation Algorithm

Current state: Section 13 note 2 says "port selection is server-side" but doesn't specify the algorithm.

Questions:

  • How does the server decide which port (9000-9014) to assign for a new game server?
  • Is it round-robin, first-available, or based on some other criteria?
  • What happens when all ports are in use?

2. In-Race Game Message Payloads (0x80-0x87)

Current state: Section 3 lists the game message opcodes but not their payload structures.

Opcode Name Payload Structure
0x80 NPS_SEND_ALL ?
0x82 NPS_SEND_GAME_READY_LIST ?
0x83 NPS_SEND_LIST ?
0x86 NPS_SEND_SINGLE ?
0x87 NPS_SEND_NOT_SINGLE ?

Questions:

  • What is the payload format for each message type?
  • How is game state (position, speed, collisions) encoded?
  • What's the difference between TCP (channel 0) and UDP (channel 1) message contents?

3. NPS-MCOTS Integration

Current state: The room protocol doc covers NPS flow. The RFC covers MCOTS race flow. The integration between them is unclear.

Questions:

  • When a player sends MC_RACE_JOIN (218) on port 43300, does this trigger any NPS room activity?
  • Does MC_RACE_START (232) on MCOTS trigger NPS_START_GAME_SERVER (0x10A) on NPS, or are they independent?
  • Is the race password from MC_RACE_CREATE_OK (223) the same password used in NPS_OPEN_COMM_CHANNEL (0x106)?
  • What's the sequencing between MCOTS and NPS messages during race setup?

Priority

These gaps are lower priority than the main room protocol documentation. They may become blocking during implementation of:

  • Multi-player race synchronization
  • In-race position/state updates
  • Complete race lifecycle

Related Files

  • docs/room-game-server-protocol.md - Room protocol documentation
  • docs/MCO_PROTOCOL_RFC.md - MCOTS protocol documentation
  • packages/lobby/src/handlers/handleStartGameServer.ts - Game server start (stub)

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions