How to bundle a HTML5 JavaScript game as native Windows application?

| | August 4, 2015

As the web browsers evolve, HTML5 game development with JavaScript, Canvas, webgl is increasingly becoming popular. The advantage of web-based games compared to native apps is that they run on multiple platforms, and you don’t have to fiddle with OS-specific libraries or programming environments.

You can already sell your web games via the chrome web store, but I think it’s too unpopular yet for being profitable for indie game developers.

I think you may reach a larger crowd by selling your games at the Mac App Store or Steam, but therefore you have to bundle it as standalone application.

For mac, you can easily bundle your HTML5 games as native app by using the Apple’s WebView component. Here is an example on how to do that.

Now I wonder: is there an equivalent way for Windows platform?

4 Responses to “How to bundle a HTML5 JavaScript game as native Windows application?”

  1. I’ve been targeting node-webkit for my html5/js game. Most of my code runs browser-side, so the node.js aspects are mostly because its simple enough to have it run a small server and send down the html/js code to the embedded browser.

    A good demo of a fast-paced game is, “A Wizard’s Lizard”. They talk about their success on reddit, and they apparently use node-webkit.

    The people behind “Gamedev Tycoon” released their steamworks integration api as open source. It lets you interact with steam’s innards from node-webkit.

    A popular (read: newbie friendly) game development platform “Construct 2” lets you create simplistic games using html5/canvas behind the scenes. They also use node-webkit to package up the game as an executable. My non-programmer friend with an digital-media background picked it up fairly quickly. I hosted a small demo of his first test game as an example.

    Another option, if you don’t want to go with html/javascript (but still want a browser based game) is to use either the Unity framework or the Unreal Engine. The Unreal Engine may not have full support currently, but according to their roadmap it is becoming a first class feature. It was fairly easy to integrate serverside stuff with them and the engines both have great integration with popular services and can be made to interact with server-side elements quite easily. You can read more about how they are integrating with the web on mozilla’s new blog post on the subject.

    All of these work well with – which is where I’m hoping to publish.

  2. Titanium Desktop offers a HTML5 CSS3 Javascript plataform for making native apps for Windows,
    the only disadvantage is that the source code of the app stays totally open for anyone to edit or see.

  3. You can use Qt with the QtWebkit widget, which will work on all major platforms.

  4. If I’m not mistaken, the Winforms API in the .NET Framework has a web browser component that you can add to an application, to display HTML content, and modify via a simple interface. It relies on an already installed web browser (usually IE), so you’d have to verify that the user has everything necessary to view your game, but other than that, I don’t see why it wouldn’t work.

    This looks promising. Hope I helped :)

Leave a Reply