lucasb-eyer / mwdns

Memory Which Does Not Suck - play turn-based and realtime memory with your friends in the browser.
12 stars 2 forks source link

Who sets color&name? #15

Closed lucasb-eyer closed 11 years ago

lucasb-eyer commented 11 years ago

Currently I think it looks like this:

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?

lucasb-eyer commented 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.

vsupalov commented 11 years ago

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 :).

lucasb-eyer commented 11 years ago

Good point. Open a second ticket for the userid so we can discuss that.

lucasb-eyer commented 11 years ago

just for the record: working on this.

lucasb-eyer commented 11 years ago

21 Days later: fixed the colors in 02b9af2d0f

vsupalov commented 11 years ago

Sometimes it takes 21 days and a new library to get things done.