For many industries HTML5 is the ideal solution enabling developers to create a simpler and more seamless experience, across all mobile and web platforms. Within the game industry there has been a great deal of discussions on the expectations of HTML5. But yet, there has been relatively few actual large scale productions in HTML5 compared to Flash.
That’s because HTML5 for games is more complex. The code may work across all platforms but this doesn’t mean that the game will actually be enjoyable or playable on all devices. Players interact with each device differently and that has to be taken into consideration. For example on a PC you precisely click where you want to, but on a smartphone you’re at the mercy of clicking with the not so always accurate tap of a finger. Why should fat fingers stop you from getting a fat score? This together with other differences in the capacity to process data requires a substantial level of customization to make games available across multiple platforms.
In May, King.com launched our first game for Facebook written in HTML5, Pyramid Solitaire Saga. In less than a month following the launch, the game surpassed one million daily active users (According to AppStats) and became the number one solitaire game and the third largest card game on Facebook. Throughout the development of this game we have learned many things about the possibilities of HTML5 and have pushed the boundaries forward. There are still many obstacles to overcome and, as far as games go, HTML5 may have a long road before it is the single platform solution for desktop, web and mobile web.
Of course, almost all of the challenges exist because HTML5 is a technique that is fairly new. Flash is much more mature, certain and equipped with several game engines and libraries for developers – none or few of which is in place for HTML5. The most prominent challenges that we had to overcome were:
- Not all browsers support HTML5 (e.g. IE8 and earlier versions of IE.). Being the largest casual social games maker, we cannot neglect those users since we build games for such a large target group, many of whom rely on these browsers
- Only high-end cellphone’s browsers have HTML5 support. Again, we need to build for the largest possible audience
- More optimization is required during the development phase to achieve an acceptable performance level
- Audio and sound effects are important for games but are not yet mature for HTML5 when targeting major modern browsers
Why Develop on HTML5?
You may ask why we pushed for development on HTML5 given these and other challenges. As a leading casual social games developer we aim to remain in the forefront of cross platform innovation and development strategy. HTML5 clearly shows a great deal of promise in that area with a potential that could not be ignored. We had four main reasons for developing Pyramid Solitaire Saga in HTML5:
- Determining if HTML5 would actually be a viable gaming platform
- Aiming for a cross-platform gaming experience for the player while also reducing development friction between desktop and mobile
- Enabling accessibility to our games without native download on mobile and leverage mobile distribution through Social Networks
- Using solid frameworks that allow you to replace Flash for some casual games titles
Pushing New Boundaries
We made some progress during our development experience. For example, we were able to overcome the lack of HTML5 compatibility in Internet Explorer 8 and its earlier versions. This was achieved by working closely with Google and their open source project PlayN (a framework to help build HTML5 games). We also developed our own game framework, Wrath, which is a layer on top of PlayN that further eases game development. Wrath combined with PlayN helped us to build a single game and use the code base for all devices (i.e. no more need for Flash for web, C++ for iOS, etc.). Wrath will be the first open source contribution from King.com.
Ultimately, our decision to develop in HTML5 means that we don’t have to start over if we want to publish Pyramid Solitaire Saga as a mobile game. As a result of these efforts, we feel we have proven that HTML5 works and is suitable for games with a larger audience – across all browsers. However, at this point the majority of mobile devices today are not suitable for HTML5 games. But, with HTML5, PlayN and Wrath we now have a system for single-source development that equals ‘build once and deploy everywhere’. That means we write our game once, and publish it to many platforms. Through PlayN we can publish the same code to native iOS and android apps, for desktop browsers to HTML5 and even to deliver a great experience to players using Flash compatible browsers. Then when mobile devices have reached an acceptable maturity and penetration we have the option to publishing HTML5 as mobile web even for them.
Ultimately, HTML5 is not ready for delivering a great games experience to the mobile web. Nor are the majority of mobile devices ready for HTML5 games. As developers we will continue to explore the boundaries in an effort to make HTML5 game development a truly efficient model, one that enables consumers to access their favorite games anywhere and anytime with a seamless gameplay experience.
About the author: Levina Nilsson is the producer for King.com’s Pyramid Solitaire Saga and a veteran of multiple online business and startups.