indigo
indigo copied to clipboard
Browser support errors should be displayed to the player
At the moment if we fail to initialise WebGL 1 or 2 due to a browser limitation then we throw an exception. The trouble is, the player then has no idea what's gone wrong and are presented with a blank portion of the page.
We should let them know what the issue is so taht they can then use a different browser, or are made aware that the browser they have is insufficient. I think just rendering a p
tag with a suitable class on it (something like indigo-error
) should suffice so they at least have some feedback. The developer can then style that message to match their game and make the experience a little less jarring for their players
This is broadly a good idea, but I think I'm going to see if I can expand the remit a bit.
Most things in Indigo currently happen inside an Outcome
(not everything but that's something else to work on), and if the engine is going to crash, it's possible to actually recover. At the moment we don't, we just log.
So what we could do (if it's possible) is have essentially a replacement 'game' which takes over when the engine crashes, and displays a message on the screen. Would be really handy during development too.