anthony Posted July 19, 2013 Share Posted July 19, 2013 Hi all, I'm curious to know how people handle when a Player's browser doesn't support an API that your game might use? To give an example: I have an iPad and an iPhone so I wrote a breakout clone that uses the Web Audio API for handling sounds and it works pretty well on both devices. When I asked some friends to test it on their various Android devices I found out none of their phones support the Web Audio API. I understand there are fallbacks that could be used like maybe SoundManager for audio, but what I'm talking in more general terms of handling feature support. I suppose it is a matter of personal preference, but should you inform the Player that something is missing like that or simply disable functionality using that feature and continue on as normal (provided the game play isn't affected). Thanks, Anthony Quote Link to comment Share on other sites More sharing options...
Chris Posted July 19, 2013 Share Posted July 19, 2013 Well, you could use modernizr to detect features and if something essencially is missing, display a message to the user. Quote Link to comment Share on other sites More sharing options...
RadicalDude Posted July 19, 2013 Share Posted July 19, 2013 WebAudio is a rather new feature. It was just added to iOS Safari with Version 6 afair. You should always use a fallback to normal audio that's for sure. Simply use the default Audio. To position the sound in the fallback (Breakout is a kinda centered game so positioned sound is not tha important, or for what do you use the API in general?) use the volume of a sound. You can check if webaudio is supported via the AudioContext:if(window["webkitAudioContext"]) { // webaudio is supported} else { // webaudio is not supported} Quote Link to comment Share on other sites More sharing options...
anthony Posted July 20, 2013 Author Share Posted July 20, 2013 Thanks for the replies I'm aware of the fallbacks for various functionality. I was wondering in a more general sense what people do when a something just isn't supported. Going forward I intend to disable the unsupported functionality if the game can still be played otherwise display a message that key functionality is missing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.