Dallinger / Griduniverse

Welcome to the Griduniverse.
7 stars 3 forks source link

Use identicons to identify players #125

Closed MatthewWilkes closed 7 years ago

MatthewWilkes commented 7 years ago

This adds a new use_identicons config variable to griduniverse that causes players to be textured with an identicon based on the experiment id and the player id.

It rewrites the shader quite significantly, and changes the general approach to use triangles rather than points. I've tested in Chrome and Firefox and it's working well, but there are warnings generated by WebGL about texture indexes. I suspect this is a race condition, what I've read about this error suggests it manifests as flickering but I don't see that, so I think what's happening is the shaders are being run before the textures are fully uploaded.

MatthewWilkes commented 7 years ago

Hmm, interesting. Are you using a mac? It looks like there is a much lower limit in the mac graphics drivers than Linux.

I'll have to have a think about how to solve this, other than limiting it to 15 visible identicons at once.

suchow commented 7 years ago

@MatthewWilkes Indeed, using a mac, macOS Sierra 10.12.5.

MatthewWilkes commented 7 years ago

Okay, I'll crack a mac out and investigate.

jessesnyder commented 7 years ago

I tried pushing just 10 textures into the all_textures array and this allowed me to move forward with testing. It looks pretty awesome. screen shot 2017-08-04 at 10 42 11 am

MatthewWilkes commented 7 years ago

I think the solution will be to build one very large texture and change the coordinate mapping instead of the chosen texture.

suchow commented 7 years ago

In regard to identicon appearance: the original version had colorful backgrounds and muted shapes, this version has a black background and colorful shapes. I think what we want is a muted background and a colorful shape. That has the benefit of taking up the whole cell (which makes the solid trail more reasonable looking) without the low-contrast issue of the original.

suchow commented 7 years ago

Beautiful:

screenshot 2017-08-22 12 20 43