Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

I hit a roadblock - mobile browser support

Discussion in 'Getting Started' started by weyseal, Jun 16, 2018.

  1. weyseal

    weyseal

    Joined:
    Mar 27, 2016
    Posts:
    5
    Hi guys,

    Let me preface this by saying that I've never made a game in Unity before.

    I started working on a project for an infinite car race game and got pretty far. The game is in 3D. It's supposed to work on a mobile browser, ie, the user doesn't have to download any app. I tried to build a WebGL version of it and to my surprise, I saw that it isn't supported.

    My question is: if I make this game in 2D, will it work on a mobile browser or am I totally out of luck?

    Thanks
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,091
    I'm going to be blunt here. You're wasting your time developing for WebGL. When WebGL first came out it had potential but Khronos has the unfortunate habit of being very sluggish with standards and as a result the next major release took nearly six years.

    That's not the only problem though. JavaScript itself is lacking functionality that is crucial to modern game development with the most notable example being threading. Modern mobile processors aren't very fast per core so they make it up by having multiple cores. Without thread support you can't really use multiple cores and thus make anything complex.

    Finally even though the latest standard has been out for almost one and a half years the only browsers that have added any support for it are the three major browsers on the desktop. Google Chrome, Mozilla Firefox, and Opera. Mobile browsers have basically ignored it and are stuck on the original release from seven years ago.

    Basically if you want to develop a mobile game steer clear of WebGL. Build games natively for the platforms.
     
    Last edited: Jun 16, 2018
    jhocking and verybinary like this.
  3. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    813
    I agree with this assessment but want to clarify one point:

    It's a waste of time to develop for WebGL on mobile. WebGL works well for browser-games on desktop, but is a dead-end on mobile.
     
    Ryiah likes this.