Rebuilding An HTML5 Game In Unity
smashingmagazine.com
smashingmagazine.com
But, anyway, yeah, it's well know the WebView on Android is a disaster. A top Facebook guy famously gave a key note at Android DevCon about why they switched to more native on mobile and said, "We don't hate the web [and HTML], we hate the webview." after going through countless bugs and performance problems they encountered trying to do HTML on Android.
> A mechanism such as CSS to style items generated through code would be welcome.
Maybe they didn't know, but this is mostly ameliorated by just having an example object setup however you like in the Unity Editor and then in your code you always just clone the example and place it instead of creating some new object. The example is basically your "style" and even non-coders on the team are usually fine with tweaking it.
I mean, the guys of windows phone made it. It is awesome and with great performance... why android and ios that came up in the market way before have still not implemented it?
Most "web apps" work worse than most apps we had two decades earlier, both in terms of design and performance. If you want people to pay for software on the app store, it helps if you put some effort into making your app responsive and exploiting the machine you are on. The only way to do this is with native applications.
Do you have some examples of this performance claim? Particularly games of the sort built with Unity? I've searched around and found no examples, though maybe I'm looking in the wrong places.
The other "walled garden" comments are curious, especially given that we're talking about Unity which can target just about anything with equal ease. Even going to raw metal, a significant portion of a game written for iOS can be easily ported to Android and the NDK, or Blackberry OS, or various other systems. The basic standards of C/C++, standard libraries, and OpenGL, mean that there is very broad "standardization".
For those who want cross-platform targeting, a cross-platform tool is critical - build an HTML5 app for Windows Phone and you have built an app that is just for Windows Phone. That it is built on web technologies is no more magical than being built on C++/OpenGL. There are tools like Intel's XDK if you want actual cross platform HTML5 support.
Microsoft made HTML/JS a first class platform for Windows 8 and Windows Mobile, so they don't have that problem - as long as you put your browser app inside their walled garden (so it goes on the store), they don't mind at all that it's a browser app.
Ludei built CocoonJS with games in mind. It's definitely not perfect, and somethings can be tricky to debug & figure out, but I think it's the better alternative out there.
Me personally, I'm just not big on using unity. I think it's a really awesome tool, but it's just not for me.
https://hacks.mozilla.org/2014/04/html-out-of-the-browser/
The idea is to rely on the Firefox runtime for your app, rather than the horrible buggy Webview, in order to make a more consistent experience across devices.
My major gripe, much like the author's, is the Asset Store. It's full of garbage with no real demo or refund system. There's also a lot of assets that were built with old versions of Unity with no real way to identify them as such. This especially sucks for 2D games, as the Unity2D system is pretty new.
There's also no great GUI system built into the framework yet, so you're stuck buying nGUI or dfGUI.
You can get near-native performance with Ejecta, which is something like a WebGL enhanced Canvas-only version of a web browser to put the game on the App Store.
(Note: not affiliated, I just like the engine)
I'm not sold on Ejecta though. I spent some time with it and found it debilitatingly difficult to debug issues, especially performance problems.
I'm basically trying to see if I should bet that mobile browsers will mature enough or if I should simply invest my time in learning native mobile dev
I don't like it when companies complain about having to pay for code, assets, etc. Not everything should be open source, not everything should be free, sometimes people should be able to be paid for the work that they do for your benefit.
Sadly, Unity still can't "export" to html and requires the user to install a plugin for web, which is not available for linux.