Closed lucasb-eyer closed 11 years ago
Now that the server (potentially) knows of a maximum number of players, he could just generate the distinct colors. I want hue might come in handy.
I love that idea. The allknowing server of greater color mastery, as well as the usage of offline storage. In addition to this, I would like to introduce a unique client id, which can be used to identify with to the server, so people can reconnect to games without hassle (or security :).
Good point. Open a second ticket for the userid so we can discuss that.
just for the record: working on this.
21 Days later: fixed the colors in 02b9af2d0f
Sometimes it takes 21 days and a new library to get things done.
Currently I think it looks like this:
newplayer
message.newplayer
, generates his own color/namewantChangeName
andwantChangeColor
playerinfo
playerinfo
I think the color is the server's task (pre-generate as many distinct happy colors as max players) and the name should be server-random too, but the player can change it after the fact.
We could then store a player-selected name clientside in an offline-storage and the next time he connects he will request a namechange automatically.
How does that sound?