Skip to content

how to handle different client viewports? #34

@DavidScales

Description

@DavidScales

Filing this bug for easier reference in inline notes. Basically, since different clients could have different widths, its nontrivial to assign "spawning ranges", etc.

For example, if the spawning range for a player is 0 > x > 1000, but that player's viewport is only 600 wide, they could spawn at 800 and not see themselves. Similarly, if we spawn objects in a more limited range, players with wide monitors will have a large empty space on their viewport.

For the player themselves, we could track viewport size via socket data, to ensure that players only spawn in their field of view. However for objects and enemies, thats not the case, since these are shared among all viewers.

For now, I think we should

  • assume a small screen for player spawns, and spawn them in the centerish of that small screen, since spawning offscreen is a much more critical bug.
  • assume most players on a laptop, and set range for enemies & obstacles to be around that size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions