Chapter 5. Leveraging the Bleeding Edge

So far in the book, we have focused our discussion on topics related to multiplayer game development. This time around, with the exception of WebRTC, we will discuss some of the newest APIs in HTML5 that, by themselves, have very little to do with multiplayer gaming, but they afford great opportunities in the context of game development.

In this chapter, we will discuss the following principles and concepts:

  • Connecting peers directly with WebRTC
  • Adding game pads to your browser-based games
  • Maximizing your games in the fullscreen mode
  • Accessing the user's media devices

HTML5 – the final frontier

Although the technologies with which we'll be experimenting in this chapter are exciting and very promising, we must not as yet get too attached to any one of them. At the very least, we must be cautious about how we use these APIs because they are still either experimental, or the specification is either in the Working Draft or Candidate Recommendation stage. In other words, chances are pretty good that, as of this writing and for the near, foreseeable future after the publication of this book, browser support for each feature may vary, APIs that do support each feature might differ slightly across browsers, and the future of the APIs may be uncertain.

The World Wide Web Consortium (W3C) defines four development stages (also known as maturity levels) that every specification evolves through before the specification is final, stable, and considered to be of the W3C standard. These four stages are Working Draft, Candidate Recommendation, Proposed Recommendation, and W3C Recommendation.

The initial level is Working Draft, in which the community discusses the proposed specification and defines the precise details that they try to accomplish. At this level, the recommendation is very unstable, and its eventual publication is all but guaranteed.

The next one is the Candidate Recommendation level, in which feedback is elicited from groups that implement the recommendation. Here, the standard is still unstable and subject to change (or deprecation, as is sometimes the case), but it tends to change less frequently than when it is at the Working Draft stage.

Once a specification document is published as a Proposed Recommendation, the advisory committee at W3C reviews the proposal. If at least four weeks have gone by since the review period began and the document has received enough endorsement from the community and implementers, the document is forwarded for publication as a recommendation.

Finally, when a specification becomes a W3C Recommendation, it carries with it the stamp of approval from W3C as an endorsed standard. Sadly, even at this point, there are no guarantees that a browser will support a standard or implement it according to the specification. However, in our day and age, all major browsers do a pretty good job of following specifications and implementing all the useful standards that are out there.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.136.84