Why HTML5?

For discussions about game development that does not fit in any of the other topics.
Post Reply
User avatar
Gunner
Posts: 276
Joined: Sun Aug 14, 2011 12:07 am

Why HTML5?

Post by Gunner »

Hey guys, just out of curiousity, I wanna ask some stuff about HTML5.

1. Why does everybody love HTML5 so much? Just with the fact that it can run games on browsers? I also noticed that you get a LOT less performance when running a HTML5 games on the browser.. :?

2. I heard HTML5 games can be wrapped as a stand-alone .exe for windows, and for linux and mac osx as well as android even, is this true? If it is, is it actually legit? How is the performance? Is it gonna bottleneck?

3. IF number 2 is true, do you have to code your game from scratch to be able to do it? Would using engines like Unity that support HTML5 export make it a lot harder to wrap its HTML5 version to stand-alone app?

Thanks everyone for stopping by. :D
Skype: mrvictordiaz
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Why HTML5?

Post by hallsofvallhalla »

HTML5 is the shiznight. You got to understand the alternatives to understand why it is so great. Before HTML 5 we were stuck with things like flash and embedded java.
Websockets, Canvas, WebGL, better media streamng are just a few of the features of HTML5 that has changed the world of browsers.

I am not sure why anyone would want to wrap a HTML5 app in an EXE.
User avatar
Gunner
Posts: 276
Joined: Sun Aug 14, 2011 12:07 am

Re: Why HTML5?

Post by Gunner »

To be able to run natively? We need to wrap our HTML5 game first before getting it to Steam, for example.. Also, I think traditional programs that run natively 'sometimes' better than the browser based one, especially stuff like games that you keep on opening and have everything organized.
Skype: mrvictordiaz
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: Why HTML5?

Post by vitinho444 »

Yeah but if you plan to go Steam, why use HTML5 (which translates to JS basically) in the first place? Why not a dedicated standalone engine? Or C++..
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Why HTML5?

Post by hallsofvallhalla »

Use Unity if you do not have a specific need for using javascript. Then deploy on any platform.
User avatar
a_bertrand
Posts: 1537
Joined: Mon Feb 25, 2013 1:46 pm

Re: Why HTML5?

Post by a_bertrand »

HTML5 offers a few advantages over traditional C/C++ or other technologies: it's truly platform independent as the browser makes the abstraction for you. Also a lot of features like rendering and layout is simplified (not fully solved but simplified).

Speed today is not bad, I mean, sure it is not pure assembler and it will never be, but you can get great results with this technology. Even with my own engine as test bed, I can tell you that reaching 60FPS for all the operation done behind is nothing short of amazing. Should I do it in .NET I would not get much better performances.

With Cordova for example you can build iOS or Android apps out of your HTML5 app. I use it again with my engine to let you produce standalone APP out of your games. Speed wise if you use the latest API is again nothing short of amazing. You could still keep the 60 FPS.

For the standalone EXE, well, this is another cool trick. Beside publishing to steam, using nw.js you can create great software which would run on any platform supported by nw.js (Windows, OSX, Linux). Visual Studio Code uses that for example, and I plan to use it as well to offer standalone experiences, allowing you to work offline and have a few other goodies like drag drop with your OS.

The first things you should understand when developing with HTML5 in a more traditional way, is that as soon as you deploy your update to the server people will be able to use it. No need to re-install or upgrade local copies. In a corporate environment this is of high value, like for us we have more than 3000 computers, keeping them in sync is a huge work and can break things. If your soft runs within the browser all this is done for free. For a game the same apply, if you get the latest version just by reloading the page you will be much faster to deploy new versions and your players can enjoy basically a new release every day.

Is HTML5 the answer to all? Certainly not. But as I focus myself to mainly web development, having all those options are great to me.
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
Gunner
Posts: 276
Joined: Sun Aug 14, 2011 12:07 am

Re: Why HTML5?

Post by Gunner »

hallsofvallhalla wrote:Use Unity if you do not have a specific need for using javascript. Then deploy on any platform.
Just curious though, what if engine A can port to say windows, HTML5, and Mac for example. Let's say the mac port ability is trash, it has lots of problems, memory leaks, etc. but the HTML5 port of this so called engine A is perfect. Can I use the HTML5 port and make it a stand-alone native app for the Mac itself and forget the built-in Mac port?

When I say 'can I', I mean.. is it doable for one person without having to redo a huge part of the HTML5 source?
a_bertrand wrote:HTML5 offers a few advantages over traditional C/C++ or other technologies: it's truly platform independent as the browser makes the abstraction for you. Also a lot of features like rendering and layout is simplified (not fully solved but simplified).

Speed today is not bad, I mean, sure it is not pure assembler and it will never be, but you can get great results with this technology. Even with my own engine as test bed, I can tell you that reaching 60FPS for all the operation done behind is nothing short of amazing. Should I do it in .NET I would not get much better performances.

With Cordova for example you can build iOS or Android apps out of your HTML5 app. I use it again with my engine to let you produce standalone APP out of your games. Speed wise if you use the latest API is again nothing short of amazing. You could still keep the 60 FPS.

For the standalone EXE, well, this is another cool trick. Beside publishing to steam, using nw.js you can create great software which would run on any platform supported by nw.js (Windows, OSX, Linux). Visual Studio Code uses that for example, and I plan to use it as well to offer standalone experiences, allowing you to work offline and have a few other goodies like drag drop with your OS.

The first things you should understand when developing with HTML5 in a more traditional way, is that as soon as you deploy your update to the server people will be able to use it. No need to re-install or upgrade local copies. In a corporate environment this is of high value, like for us we have more than 3000 computers, keeping them in sync is a huge work and can break things. If your soft runs within the browser all this is done for free. For a game the same apply, if you get the latest version just by reloading the page you will be much faster to deploy new versions and your players can enjoy basically a new release every day.

Is HTML5 the answer to all? Certainly not. But as I focus myself to mainly web development, having all those options are great to me.
Very nice explanation :D. Yeah I see the future of HTML5 applications is really really promising. But I think not for games.. Are you sure with the performance estimation you're making? (IDK, I haven't tested it yet) but I think it sucks balls for lower end PCs compared to native apps.. :?




Also, another noob question, if engine B says it can port to Ubuntu, does it mean it can port to all Linux distros, or just to Ubuntu and not any other Linux distros too?

If in the end it only supports ubuntu.. Are there workarounds to make it support all the linux distros?

I might be missing a lot of concepts of basic operating system here, but just bear with me here.. :lol:
Skype: mrvictordiaz
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Why HTML5?

Post by Jackolantern »

I think it is possible you may have some issues trying to convert the HTML5 output of an engine to a Mac app. Of course if the HTML5 app was yours, it would be no problem but most game engines that output to HTML5 heavily minify and obfuscate their HTML5 output to prevent rival engines from dissecting it and learning their tricks and trade secrets. And because the HTML5 output is likely going to be expecting to run on a standard browser, there may be some issues there. Even with cross-platform technologies, you typically are going to be doing some custom work to each version so it takes advantage of the underlying platform so not having that option may present some limitations.

On the other hand, it may not be such a huge issue to convert from HTML5 to a desktop platform since the HTML5 output likely assumes a full-screen desktop browser as well as mobile (therefore it may be expecting a mouse and keyboard), but for example if you wanted to add gamepad support for Mac you may find it difficult if the HTML5 does not output it. You would also likely be unable to integrate any Mac Store features in with it which likely come out-of-the-box with the true Mac export. Of course, if this is a push-button export engine you aren't out too much to try.

As far as the Ubuntu export, I don't see why it would run only on Ubuntu unless there is some kind of proprietary Ubuntu game store or something and it packages for that. I honestly wouldn't put it past Ubuntu who has been acting more and more like a major OS corporation than an open source software foundation in the last few years.
The indelible lord of tl;dr
Post Reply

Return to “General Development”