Converting Unity Games to HTML5

12 posts (showing 1-12)
FGL_Aaron

FGL AdminCommunity Level 7
1060 posts

We discussed this a bit with developers at GDC this year and heard that it is possible to build a game in Unity and output it as HTML5 with the right set of tools. Unfortunately we didn't get enough specifics to know how they were doing this.

A quick Google search for Unity to HTML5 reveals that there have been several attempts at automating this over the last year, so I thought I'd ask here. Have any of you Unity developers looked into this yet? If so, is there a viable option?

Considering we're paying up to $200 per HTML5 game to implement our API due to the high demand from publishers, this could be a great way to monetize your Unity made games!

posted 2014-03-22T22:31:36-07:00
GameOp

Market Level 3Community Level 3
206 posts

@FGL_Aaron

I read that it requires webgl which may be an issue for older devices that don't support it but other then that it seems more then possible. The developers at unity are interested in this form of web publishing since  it removes the hassle of downloading the unity web player and allows cross-platform. 

The official post can be found here:

http://blogs.unity3d.com/2014/04/29/on-the-future-of-web-publishing-in-unity/

Here's the link on the topic of how to export to html5:

http://forum.unity3d.com/threads/179720-Export-HTML5-content-from-Unity-editor

Has anyone currently tried this? It will benefit unity developers looking for sponsors. I would have tried it myself if my unity games were more complete and optimized.

posted 2014-04-30T17:08:48-07:00 | edited 2014-04-30T17:10:18-07:00
GameOp

Market Level 3Community Level 3
206 posts

Here's a link to all browsers that support Webgl:

http://caniuse.com/webgl

There seems to be some lack of support for it currently with the exception of the higher-end devices, but I'd imagine that webgl would be more supported in the near future for more devices.  

posted 2014-04-30T17:14:32-07:00 | edited 2014-04-30T17:19:34-07:00
Lord_Garland

Market Level 4Community Level 9
1873 posts

Well that would kill flash in a heart beat. 

posted 2014-05-01T01:55:53-07:00
Ultima2876

Market Level 4Community Level 10
2409 posts

I'm not all that sure that it would kill Flash in a heartbeat. Heck, last year Unity could output flash games and that didn't make a significant dent in Flash's install/userbase; in fact, Unity ended up backing off and removing the feature.

posted 2014-05-02T22:17:58-07:00
Lord_Garland

Market Level 4Community Level 9
1873 posts

Adobe wouldn't support unity in flash so they dropped it.

posted 2014-05-03T00:04:21-07:00
Ultima2876

Market Level 4Community Level 10
2409 posts

Still, it had a good few months to make an impact.

posted 2014-05-03T02:34:20-07:00
GameOp

Market Level 3Community Level 3
206 posts

I think flash will go strong for a couple more years, but it might be best to look into other forms of technology when deciding your long term plan. I'm personally not a flash programmer but I test flash games since there generally higher quality although it has less limitations unlike Html5. Html5 is arising and there seems to be greater support for it so it should be a bit more in demand in the future then it currently is.

posted 2014-05-03T19:52:32-07:00 | edited 2014-05-07T15:13:28-07:00
molegato

Market Level 0Community Level 1
29 posts

After a bit of tutorial-reading and nighttime-thinking, I just asked to myself: Once the unity game is exported, how to integrate the fgl mobile platform sdk on it? As It would have to be after the exporting and not during the game making, it could get confusing. Anyone tried it yet?

posted 2014-06-09T12:06:36-07:00
FGL_Aaron

FGL AdminCommunity Level 7
1060 posts

molegato said:

After a bit of tutorial-reading and nighttime-thinking, I just asked to myself: Once the unity game is exported, how to integrate the fgl mobile platform sdk on it? As It would have to be after the exporting and not during the game making, it could get confusing. Anyone tried it yet?

I think that's a good question that could likely be answered if we knew that devs were porting from Unity to HTML5. Ultimately, the FGL SDK should be fairly simple to integrate into any HTML5 game, so it's just a matter of figuring out how it should be done in the ported code. 

Definitely seems possible, just need more info about whether or not devs have been able to easily port from Unity to HTML5.

posted 2014-06-09T13:57:21-07:00
GameOp

Market Level 3Community Level 3
206 posts

It is possible but developers mainly just do a direct export and build a .apk or .ipa file for android or ios through unity.

I could give the unity html export a shot but the major downside I'm seeing is that you need webgl to run the games which isn't available on all devices, also performance takes quite a hit on regular browsers on mobile devices after exporting from unity. Although I heard that Unity Technologies were working on a direct export for html5.

I'd have to do some web searching to find the source on the exact date when its released. Although you don't really need this export though to build the file since theres enough sources out there to get developers started without it.

But are you mainly looking for 2D or 3D games from unity? Or both?

Currently with 2D games I believe you can rely on Canvas 2D when WebGL context in unavailable so 2D games would probably be fine for html5. For 3D you need to rely on Webgl. 

I'm mainly waiting for unity to get more html5 support for 3D so I can do more testing. I'm also waiting for more devices to have better webgl support. IOS 8 recently launched and seems to have full webgl support so we can assume it should be close for all newer devices to have it.

On Jun 09, 2014, FGL_Aaron said:

molegato said:

After a bit of tutorial-reading and nighttime-thinking, I just asked to myself: Once the unity game is exported, how to integrate the fgl mobile platform sdk on it? As It would have to be after the exporting and not during the game making, it could get confusing. Anyone tried it yet?

I think that's a good question that could likely be answered if we knew that devs were porting from Unity to HTML5. Ultimately, the FGL SDK should be fairly simple to integrate into any HTML5 game, so it's just a matter of figuring out how it should be done in the ported code. 

Definitely seems possible, just need more info about whether or not devs have been able to easily port from Unity to HTML5.

posted 2014-06-12T05:04:30-07:00 | edited 2014-06-12T05:53:57-07:00
GameOp

Market Level 3Community Level 3
206 posts

I haven't  tried it, but Unity scripting supports javascript as one of its programming languages so I believe you could just do regular function calls to the fgl sdk through monodevelop while working on the game. And then just create and edit an html file that includes the fgl.js sdk through a line of code. Then once your finished, drag the fgl.js file to the game folder where the html file is located.

I mainly use C# with unity so I'm no expert, but I would assume its the same as regularly integrating the sdk with javascript with any framework or game engine if you don't use a plugin. But then again I'm not to sure since I'm still fairly new to it and mainly use C# with unity, although I do have some javascript knowledge, so I think this is how it would be done.

On Jun 09, 2014, molegato said:

After a bit of tutorial-reading and nighttime-thinking, I just asked to myself: Once the unity game is exported, how to integrate the fgl mobile platform sdk on it? As It would have to be after the exporting and not during the game making, it could get confusing. Anyone tried it yet?

posted 2014-06-12T05:14:24-07:00 | edited 2014-06-18T04:35:29-07:00