By Paul Bakaus on Tuesday, November 1st, 2011 8:22 AM PST

Zynga has always been a strong proponent of open source technology and uses a Linux, Apache, Memcached, MySQL, PHP (LAMMP) stack throughout its games. In the past, we have focused our development efforts in particular on PHP and Memcache and have contributed back to the open source communities in those areas.

Now, we’ve begun extending our open source contributions into HTML5 and JavaScript. We are avid believers in the future of HTML5. In fact, the promise of HTML5 game development is pretty clear to us: rich, high-quality games built on one code base that can reach across many screens, devices and platforms. The tough part is to actually make it work. Thus, we have been busy conducting R&D work, with the goal to create a game engine capable of showing high-quality, interactive and even isometric games. We even have an internal demo area we call ‘HTML5Ville’, where we’re testing fully-functional game prototypes.

We haven’t been idling on the HTML5 game front either: In a first step towards HTML5 games and following Facebook’s launch of its mobile apps and site, Zynga launched three HTML5 games: Zynga Poker Mobile Web, Words With Friends HTML5 and FarmVille Express. As a great example of what HTML5 can give us, those games specifically deliver faster loading times than their native/Flash counterparts. We have also started integrating slick, new features such as Web sockets and CSS Transforms that we learned to utilize well through our research. Check out some of key learnings from Zynga Poker Mobile Web development.

On our way to creating a great framework for our studios, we’ve found out that some of the JavaScript parts can be isolated from the rest of the engine, and are probably helpful in a much broader context. Therefore, we have decided to start open sourcing mission-critical software that is actively used in our games. In September, we soft-launched our first two open source projects around HTML5 on Github: Zynga Scroller and Zynga Viewporter.

Zynga Scroller

In a nutshell, Zynga Scroller addresses the common problem of making content pannable and zoomable. With it, you can enable smooth scrolling and zooming of content areas on your site across multiple devices, and it’s specifically well suited for games: Since it’s designed as a pure logic component (in a callback, you decide who to apply the pan/zoom values), it works for both HTML, Canvas, SVG or WebGL – anything that runs on the open web stack.


Zynga Viewporter

Zynga Viewporter is a small utility that once plugged into your mobile website, starts managing the viewport, meaning the actual browser size, automatically. It automatically scrolls away URL bars to maximize the area you have for your content, triggers the native device pixel resolution for performance reasons and knows what to do when you rotate your device.

Stay tuned for more Zynga open source contributions in HTML5 and JavaScript. For now, sound off with any questions or comments below.



Leave a Reply

Connect with Facebook