Oliver-Akins / Phantom-Ink-Online

The online prototype for Resonym's game titled Phantom Ink.
http://phantominkgame.com/
6 stars 2 forks source link

Player Reconnect with Subname #44

Closed Oliver-Akins closed 3 years ago

Oliver-Akins commented 3 years ago

When a player attempts to reconnect with a sub-string name of a player already in the game, it allows them to join the game on the UI side, but the server does not properly provide data to the client as well as the UI breaks a lot. This means that the player can't do anything in the game and it is not a good experience as there's no feedback from the site that it's broken so it seems like the client should be looking like that.

This has been happening on the production site, it hasn't been tested on development at the moment.

If a user does attempt to join with a substring username, it should not permit joining the game and should error with a 403 forbidden message.

Oliver-Akins commented 3 years ago

This seems to have been fixed by shuffling the order in which are instantiating the host's object and checking for the playerData rather than just assuming that a user will only ever attempt to re-join first with the exact same name that they had before.