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. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

Please do you think WebGL could be ready for production (Unity5beta)?

Discussion in 'Unity 5 Pre-order Beta' started by SLASH24, Feb 1, 2015.

  1. SLASH24

    SLASH24

    Joined:
    Sep 20, 2012
    Posts:
    144
    hi, I'm about to test unity 5 beta because I'm interested in WebGL publishing right now... but I would like to know about everything before buying!
    -limitations?
    -build size of the exported compiled games?
    -is build size reduced if I use just basic 2D functions api ? if I don't make extensive use of all the core & high function of the engine the build size should be smaller ? will the build only use the bare minimum technology required to run or the full engine will be exported as well even for tiny 2D games???
    -is the WWW class or equivalent available?
    -is it ready for production for simple 2d puzzle games, basic 2d games/gameplay in your opinion?
    -what about sound & music ?
    -can we stream media, music from web easily?
    -WHAT about crossdomains policy issues ????
    - and is there a "work around" solution to get it a bit working in internet Explorer ?
    -browsers
    ?
    also feel free to mention any specification that your aware of about this platform ! so that I can decide, and know everything about it....
    THANKS IN ADVANCE !!!
     
    Last edited: Feb 1, 2015
  2. SLASH24

    SLASH24

    Joined:
    Sep 20, 2012
    Posts:
    144
    i'm asking this, because the story is that my customer is not happy with the idea of players required to install unity web player before actually enjoy the product/game ! so I thought that webgl could be a good a replacement ... ?
     
  3. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Plugin is getting killed anyways soon by some browsers. I think the bigger issue to you and your customer might be stable support for WEBGL and stuff related to it in the end-users browsers than U5 webgl and its features. You can do pretty good projects with it already and best to try it yourself.

    Size is of course bigger than with a plugin but too hard to say what it will be end but I guess the core engine will always take 3-5mb in real projects. It works with IE too but sound support are lacking for example there and might be that Microsoft will bring proper support only with Win10 and the project spartan browser.
     
  4. SLASH24

    SLASH24

    Joined:
    Sep 20, 2012
    Posts:
    144
    "Size is of course bigger than with a plugin but too hard to say what it will be end but I guess the core engine will always take 3-5mb in real projects."

    in real projects, ok but what about tiny 2d games ? its way to much 3 mb ! no ? no options to compile only needed features i guess?

    -I've read here and there good things about webGL and unity themselves decided to work on it, so why is it "getting killed anyways soon by some browsers..." ?

    -and do you think it has enough stable functionnality to professionally talking produce a tiny game based on stop motion moving picture , gameplay lasting 25 s, just an 2D UI Canvas based game?

    also, I have tested the games shown by unity, and they are amazing seems to be features complete, but my concern is build Size !! has someone managed to get it working and compiled in less than 2.0mb ????

    Thanks for the reply... :)
     
    Last edited: Feb 1, 2015
  5. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Web plugin is getting killed by chrome and later by firefox etc but not webgl, just said it as plugin might not be an option at all anymore for your customer even if accepted install.

    Empty project with default scene is around 4-5mb with max optimization for me with one of the latest betas. With real projects I mean complete games, even 2d. It's still a preview version of webgl and could be same for months.
     
  6. SLASH24

    SLASH24

    Joined:
    Sep 20, 2012
    Posts:
    144
    empty project with *empty* scene ? Wow its too big not aimed at tiny games ! And what about documentation is there some documentation provided with the 5 beta or just this: http://unity3d.com/unity/beta/5.0 ???? thanks a lot more !
     
  7. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    I don't know if they are stripping out of things like whole physics engine code or whole sound engine if no physics or sound used. I don't know if they even ever can do it but U5 is still beta and WEBGL is preview version so they are mainly focusing getting important features added and stuff working and not optimize too much yet.

    Docs are included with the beta5 install only.
     
  8. SLASH24

    SLASH24

    Joined:
    Sep 20, 2012
    Posts:
    144
    "I don't know if they are stripping out of things like whole physics engine code or whole sound engine if no physics or sound used"

    ah? so you haven't really tested this case? could you see if it change something when say "you have active rigid bodies in scene & then compile" and "without anything in scene and then compile" ....???

    - because I'm sure it can be lighter, there's no reason to not be lighter when there's only the minimum to be in game .... hopefully it will change to something better !

    thanks in advance :)
     
  9. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    I have already tested WebGL with my existing projects, rotating cube, empty etc. while I tried to get smallest size possible and so on and the 4-5mb was smallest I could get with latest versions. If you look at posts by devs like @RalphH or jonas echterhoff you can find a lot of info about WebGL.

    I don't think there is an extensive stripping implemented yet for various engine parts or is it even possible.
     
  10. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,874
    You must take into account that build size is different from what really is downloaded by the browser. I'm not sure but I read recently that the real payload to run the game is a lot less than the build size in WebGL project.
     
  11. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    The download size is pretty much exactly what the file sizes are in the output folder, you either pick uncompressed or compressed files based on what you can use with your server. Maybe you were referring to the compression?
     
  12. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,874
    Exactly.
     
  13. liyong79623

    liyong79623

    Joined:
    Feb 2, 2015
    Posts:
    14
    I have built my game in webgl recently. i really worry about the huge asm.js code, about 3 millions lines of js code! i watched chrome allocate about 1-2G mem to load the huge js code. then the chrome memory decrease to normal level.
    maybe i am wrong,but the huge js file will cause huge client memory reqiurements and slow load delay?
     
  14. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Yes thats how it goes depending how the client browser handles the whole process. I haven't tried with the latest versions but earlier it took around 1-2gb mem in ffox and chrome to load a simple scene. It was less than 1gb in IE but it takes a lot longer to load it.

    Generally it's not only the memory you but also decent computer. A cheap laptop with 4gb it takes a bunch of time as it starts memory swapping due low mem and generally the cpu strain is a lot for it do some precompile/cache with the .js

    I don't think Unity will drop the preview name out of WebGL for some time as browsers need to improve a bit more too.
     
  15. SLASH24

    SLASH24

    Joined:
    Sep 20, 2012
    Posts:
    144
    OK, so I understand that Unity's WebGL will do for good games but not for tiny games, hopefully in a future they will strip out only the bare minimum from the full engine n order to adapt & fit final build requirements: I mean that a tiny game would be tiny also in size and a bigger game wich uses for example Global Illumination would be bigger because the engine woyld strip out the G.I. byte code and so on...
     
  16. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    I guess they are already stripping most they can of engine features (and generally it might not be technically possible to strip out every part):

    http://forum.unity3d.com/threads/webgl-delays.292693/#post-1930819
     
  17. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,381
    I'm curious why all the fear of the build size minimum being around 5mb for this... Thats <10 seconds to download even for crappy internet.
     
    Meltdown likes this.
  18. melkior

    melkior

    Joined:
    Jul 20, 2013
    Posts:
    199
    Random made up statistic: many users wont wait more than 3 seconds for something to load then leave your page?
     
  19. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,797
    I disagree, the wait time a user will wait for something is proportional to their interest in that something.
    If you have a great looking game, and they really want to play it, and you show the user progress that the game is downloading, most (even with crappy internet), will go grab a cup of tea and wait.

    - Make your game worth the wait! (My infamous WebGL one-liner)
     
    SLASH24 likes this.
  20. melkior

    melkior

    Joined:
    Jul 20, 2013
    Posts:
    199
    Just a few results out of hundreds of hits on the topic. I certainly want my game to be so awesome people will wait , but OP's concern about not needing to load extra MB's in an effort to optimize seems warranted IMO.

    http://pearanalytics.com/blog/2009/how-webpage-load-time-related-to-visitor-loss/

    http://www.nytimes.com/2012/03/01/t...e-slow-loading-sites.html?pagewanted=all&_r=0

    https://blog.kissmetrics.com/loading-time/
     
  21. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    Warranted if you are making a click-bait title, not warranted if you make a good game and market it to your target audience. Games != Webpages.

    My 2 pence.

    Edit:
    Also you could just use streaming scenes, then the initial wait time will be far less than 3 seconds. (As far as I'm aware the feature still works in WebGL? )
     
  22. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    I think the original point was that its pretty large download with an empty scene. When you add your game logic and art or stream other scene it still takes a lot of time. Note that after download it will still take several seconds to browser get the scene up and running. Depending of your target region your app could be slow to download if the total size is big and if you are doing work for your customer who is used on fast loading flash games there no way to argument that everyone has a fast connection.
     
  23. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    Ah I see. I'm under the impression that Unity are still aiming to reduce the base build size of WebGL as they have stated several times before (I think once at unite and maybe again in a blog somewhere?). I'm not sure if this is still the case, but it is still a beta, this is what it is for.

    I should also state that I'm still amazed they've got it this small, no minor task for what you get.
     
  24. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,381
    Hopefully we don't need to be obvious and outline the differences between flash and WebGL to anyone. If a mandatory 3-5mb stacked on to a build is a problem for your client's web deployment and then maybe they need to reconsider what they're doing.

    Now, compression beyond that sure, you want to minimize size as much as possible for assets but I don't see why everyone gets so upset about this tiny bit of space, especially considering what you get in return.

    These are articles about metrics related to searching, browsing, and general loading time caused by crappy website design. I don't think the same metrics can be applied to someone expecting to play a nice game in their web browser.

    More realistic metrics would probably be the ones you find on Kongregate or Newgrounds, places where people actually play games in their browser and where they're expecting to wait for a game to download and their maximum wait time is probably directly connected to their personal internet speed. People with slow internet are accustomed to waiting longer and they will, whereas people with fast internet expect it to be faster, and it will... So really, there doesn't seem to be much practical correlation in those metrics.
     
    Meltdown likes this.
  25. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Luckily I'm not doing any webplugin/webgl work for customers myself but I've partly helped others in the past and it's a pain to get a customer to change his mind or understanding about things if he has been mainly an end user. All they see with web for example is that there are small (Flash) games that load up fast and work on every computer. There is nothing you can do and say that Flash is dead soon as there is no hard evidence about it on desktops. Chrome might be killing Unity plugin but they will still have their integrated Flash.

    I'm assuming the OP could be facing the same problem or other problems with Flash vs WebGL as latter one is still evolving a lot.
     
  26. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,381
    Flash isn't really even a supported platform for Unity anymore, so maybe the the base size of Unity builds in WebGL is a moot point if Flash is the only comparison. I suppose thats something you have to clarify with your client if they're looking at using Unity WebGL.
     
  27. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Yeah but generally customers don't know or care about what tech you use as they just want x product delivered with y features and requirements :)

    This is the reason why people who are doing contract jobs currently might have problem in the coming year if they try to get everything done with Unity which is (thankfully) one of the early birds with complex WebGL solutions. Sadly some people only live only out of the contract works and they might lose jobs to competition who offer doing the same with Flash. Note that file size is just on piece of the picture in the original question.
     
  28. liyong79623

    liyong79623

    Joined:
    Feb 2, 2015
    Posts:
    14
    i just gave up unity 5 webgl for now. huge memory requirements (at least 2G) and out of memory crash...
    i think no serious game can run without big update to unity webgl or browser support. it is not mature enough.
    i don't know after chrome throw off web player, what can we do ?
     
  29. liyong79623

    liyong79623

    Joined:
    Feb 2, 2015
    Posts:
    14
    i never care about the bundle size.i care about the huge memory requirements and the slow js compiling and so slow building and so many out of memory crashes.

    so who really run a real game in webgl?
     
  30. liyong79623

    liyong79623

    Joined:
    Feb 2, 2015
    Posts:
    14
    i have spent two weeks to try let my game run but it failed. web player build is really great..
     
  31. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Remember to set mem requirement in the player settings to something realistic. 256mb seems to be a lot for app to ask if you have other stuff running in the browser.