ncm123

Phaser OR Unity For HTML5 Games

Recommended Posts

Hi,
We have built many kids apps till now and published on google play and iOS app store. Now I wish to create a website with the kids games. 

I expect about 75% of the users to be from desktop/tablet/chromebooks. 25% visitors will be from mobile browsers.

Here is a small video which shows the games
https://www.youtube.com/watch?v=UH4ttjxyY9A

I have two options of conversion into HTML5.
1) Phaser
2) Unity (I prefer this because this gives me the unity build also- so it kills two birds with one stone).

The problem with Unity is that it does not support Webgl in mobiles. But I tested a few games and they work OK on my android device.  I know that Phaser will probably give better performance in mobile browsers, but with Unity I get the advantage of being able to use the codebase later on with other projects. Is this a bad compromise to make?

But I still need your opinion especially of experienced people in this. Which is the way to go - Phaser or Unity?

Thanks and Regards
 

Share this post


Link to post
Share on other sites

I wouldn't rely on Unity if I really target for the web. Whenever you hit problems about WebGL or Canvas, it's much easier to resolve with Phaser or another HTML5 framework. Web is hard in itself, thanks to modern browsers with different engines. 

In my last workplace we had restrictions for each project like: not having more than 2MB build(which loads projects pretty fast). We were making bitmaptexts, sprite compression and custom builds with Phaser which you'd have kilobytes of projects. Of course, you'd do some of them with Unity too, but not reliable and you are not controlling it most of the time. Unity has tiny mode for the web but use cases are pretty limited as of now.

Yes, the tradeoff is different codebases, longer development but you'd have more opportunities, more reliable environment rather than depending on Unity, which is a blackbox.

Still, I'd try out some web builds on Unity to see how it goes. I don't know if it got any better. My thoughts are mostly from last year which may not be accurate anymore.

 

Share this post


Link to post
Share on other sites
18 minutes ago, Kael01 said:

I wouldn't rely on Unity if I really target for the web. Whenever you hit problems about WebGL or Canvas, it's much easier to resolve with Phaser or another HTML5 framework. Web is hard in itself, thanks to modern browsers with different engines. 

In my last workplace we had restrictions for each project like: not having more than 2MB build(which loads projects pretty fast). We were making bitmaptexts, sprite compression and custom builds with Phaser which you'd have kilobytes of projects. Of course, you'd do some of them with Unity too, but not reliable and you are not controlling it most of the time. Unity has tiny mode for the web but use cases are pretty limited as of now.

Yes, the tradeoff is different codebases, longer development but you'd have more opportunities, more reliable environment rather than depending on Unity, which is a blackbox.

Still, I'd try out some web builds on Unity to see how it goes. I don't know if it got any better. My thoughts are mostly from last year which may not be accurate anymore.

 

Yes, I am trying out a few games in Unity just to be sure. I have already got phaser games done and they work fine. Am really hoping that Unity works because in any case I want to port my existing games to unity and this will save me quite a lot of time and money.

Share this post


Link to post
Share on other sites

Phaser is not really a Unity equivalent (framework vs full featured game development platform) - so comparing apples with oranges may be misleading?

For the @ncm123 use case, I'd say go with Unity.  Reads like OP is semi-convinced already - and it's unlikely to be a terrible choice as Unity (and mobile devices) evolve so fast that issues of today will unlikely be the same issue tomorrow?  Unity's less than optimal mobile-web complications can be bypassed by providing the games as "apps" via Unity iOS and Android builds (as I assume is currently the case?).

If the priority had been mobile-web, my answer would be different - I would suggest a web stack.  For school deployed educational resources perhaps it is unwise to under prioritise mobile-web and Chromebooks?

 

Edited by b10b

Share this post


Link to post
Share on other sites
On 5/15/2020 at 9:02 PM, b10b said:

Phaser is not really a Unity equivalent (framework vs full featured game development platform) - so comparing apples with oranges may be misleading?

For the @ncm123 use case, I'd say go with Unity.  Reads like OP is semi-convinced already - and it's unlikely to be a terrible choice as Unity (and mobile devices) evolve so fast that issues of today will unlikely be the same issue tomorrow?  Unity's less than optimal mobile-web complications can be bypassed by providing the games as "apps" via Unity iOS and Android builds (as I assume is currently the case?).

If the priority had been mobile-web, my answer would be different - I would suggest a web stack.  For school deployed educational resources perhaps it is unwise to under prioritise mobile-web and Chromebooks?

 

Thanks for the reply. 
I did not understand what you are trying to say here - For school deployed educational resources perhaps it is unwise to under prioritise mobile-web and Chromebooks

Share this post


Link to post
Share on other sites
On 5/15/2020 at 4:57 AM, ncm123 said:

I expect about 75% of the users to be from desktop/tablet/chromebooks. 25% visitors will be from mobile browsers.

Sorry if I was unclear, I was reacting to this.  I find it odd to separate desktop/tablet/chromebooks vs mobile browsers.  Instead I'd look at the lowest common denominator platform (which is web, specifically mobile-web).  My understanding of the K-12 educational market (North America) is that tablets and chromebooks are now prevalent and becoming more-so, therefore web applications (vs native) are gaining most onboarding and traction?  So in summary, I would deploy to web-stack purely based on audience habit (and nothing to do with technological or gamesdev preferences).  But a thorough business plan would be more useful than my ramblings :)

Share this post


Link to post
Share on other sites
Quote

Unity WebGL content is not currently supported on mobile devices

This is a quote from the Unity documentation: https://docs.unity3d.com/Manual/webgl-browsercompatibility.html

We can use Unity native builds for desktop computers, mobiles devices and desktop browser. Phaser for 2D and Babylon.js/Three.js for 3D. But there are a lot of another WebGL frameworks: 

Edited by 8Observer8

Share this post


Link to post
Share on other sites
On 5/18/2020 at 11:21 PM, b10b said:

Sorry if I was unclear, I was reacting to this.  I find it odd to separate desktop/tablet/chromebooks vs mobile browsers.  Instead I'd look at the lowest common denominator platform (which is web, specifically mobile-web).  My understanding of the K-12 educational market (North America) is that tablets and chromebooks are now prevalent and becoming more-so, therefore web applications (vs native) are gaining most onboarding and traction?  So in summary, I would deploy to web-stack purely based on audience habit (and nothing to do with technological or gamesdev preferences).  But a thorough business plan would be more useful than my ramblings :)

From what I understood from your message is that you are conveying that we should be probably using phaser as it will work well for mobile web also.

Share this post


Link to post
Share on other sites
7 hours ago, ncm123 said:

From what I understood from your message is that you are conveying that we should be probably using phaser as it will work well for mobile web also.

There are many mobile-web friendly gamedev alternatives to Phaser.  If you're comfortable with Phaser and it ticks your boxes then embrace it.  But like you say, Phaser 2 vs Phaser 3, then whether to use Typescript or not, then which web bundler, etc ...

Share this post


Link to post
Share on other sites
On 5/22/2020 at 8:29 PM, b10b said:

There are many mobile-web friendly gamedev alternatives to Phaser.  If you're comfortable with Phaser and it ticks your boxes then embrace it.  But like you say, Phaser 2 vs Phaser 3, then whether to use Typescript or not, then which web bundler, etc ...

I got another suggestion from someone. That since all my games are in Flash (Animate). Its a good idea to use Haxe to convert the games into HTML5. The games need not be completely re-coded. What is your opinion about Haxe? Do games coded in haxe work smoothly ?

Share this post


Link to post
Share on other sites
3 hours ago, ncm123 said:

What is your opinion about Haxe? Do games coded in haxe work smoothly ?

I've been using Haxe professionally since 2008 - it's typically my preference, I'm a little biased?  Even if using Phaser or Unity I'd still use Haxe.

To ask whether games coded in Haxe work smoothly may reveal a misunderstanding of what Haxe is.  Haxe is a language and transcompiler, it targets many platforms and embraces many libraries - it can be used in a multitude of different ways.  I especially like Haxe's macro functionality which can set it apart from other transcompilers (e.g. Typescript).

In ~2010-~2015 Haxe had a semi-unique proposition for people moving away from Flash (in particular a library called NME and then OpenFL which provides a substitute Flash API for Haxe's none-SWF targets).  But the Haxe landscape was and is so much more than that with many dedicated games frameworks ... just as a modern web-game is so much more than a port of a retro Flash-game.

I don't apologise for not providing a more specific guide on how to make a game with Haxe.  How someone chooses to use Haxe is down to them (it really is a broad purpose platform so must be unopinionated).

Edited by b10b
typo

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.