Tuesday, 9 April 2013

WebGL: 3D Gaming on the Web Arrives

The Web and 3D have been to the dance many times together before, but they just never really hit it off. Sure, there were some successes which resulted in VRML in the mid 1990?s and Second Life in the early 2000?s. But numerous other attempts by countless startups didn?t make it. The reasons were many, but mostly there just wasn?t a real solid business case for 3D in the browser. It was complicated to program, expensive to develop models, performance was spotty, and ensuring that all browsers would render the content the same way was certainly not guaranteed.


There was one place, however, where 3D made business sense: gaming (well, native gaming). 3D enjoyed, and still enjoys, a happy existence on PC and Console platforms. The question I always wondered was when will 3D in the browser be of high enough performance and quality across all platforms and browsers to support a solid business case for 3D on the Web? I believe the time has finally come. The confluence of mobile gaming, mobile Web app development, and a solid javascript API called WebGL (a biding to the powerful and ubiquitous OpenGL), is fueling its arrival. I?m proud to say that BlackBerry has been very active in providing one of the first complete mobile WebGL implementations on the BlackBerry PlayBook, and has also brought this capability to BlackBerry 10.



WebGL provides developers with the ability to write immersive, high-performance, console-quality, 2D and 3D games accessible directly on your BlackBerry 10 smartphone. This could be done directly though the browser, or even better, directly by a BlackBerry HTML5/WebWorks application. By building and packaging your HTML5 application into a bar file (a BlackBerry app file container), it enjoys the same rights and privileges as a native application. These apps look, feel, and behave as native apps, as they don?t run inside a browser context. They don?t need to be online to work, and they can leverage great BlackBerry services like the Payment Services SDK and the BBM APIs. BlackBerry WebWorks apps can also be certified as Built for BlackBerry affording them additional advantages.


The game shown below is called ?Pearl Boy? and is a great example of what a WebGL application can do. It was developed by Goo Technologies, makers of the Goo Engine for GDC this year. It?s a 100% Web application, written using HTML5, Javascript, and of course, WebGL. The graphics and performance on the BlackBerry Z10 look great. Reflections, environment maps, pixel shaders, they?re all there. WebGL is the real deal.



If you want to learn more about programming with WebGL on BlackBerry, check out these additional WebGL resources on the BlackBerry DevBlog. I also recommend you check out the O?Reilly book, ?WebGL: Up and Running? by Toni Parisi.



No comments:

Post a Comment