Jump to content
  • Advertisement
  • 08/24/18 08:34 AM

    Unity WebGL vs Native JavaScript 3D Framework

    Engines and Middleware

    Alexander Kovelenov

    We’re often asked about the differences between the native JavaScript 3D frameworks and the WebGL version of the popular game engine Unity. To answer this question, I used the official Unity3D manual and some information found on their community forums and compared certain aspects of our own Verge3D engine and Unity WebGL. This article can be applied to other native WebGL frameworks such as Three.js, Babylon.js and others.

    Performance

    Verge3D is initially written in JavaScript, a programming language that is native to the Web. As such, the engine works very fast and is compact in regard to both file size and memory footprint.

    farmer-mobile.jpg

    As a consequence of being a native WebGL engine, Verge3D works well even on low-end mobile devices while Unity3D apps often crash mobile browsers.

    Unity3D historically was working on the Internet as a browser plug-in. After all browser vendors began dropping plug-ins in favor of HTML5, Unity has been offering its  WebGL bundle  compiled to JavaScript using a 2-stage language translator (C# to C++ and finally to JavaScript). Notwithstanding the company’s efforts in optimizing this bundle, it is still rather big for the Web (up to 5 Mb compressed Unity3D vs 230kB compressed Verge3D) and shows not that good performance.

    As a yet another illustration of above-mentioned differences, Verge3D works smoothly in the Chrome browser, while Unity’s compiled code works better on Firefox, the JavaScript engine of which was specifically optimized for running transpiled code.

    Asset pipeline

    In Verge3D content is created using your favorite 3D editing software such as 3ds Max or Blender. This has benefits of a streamlined graphics pipeline without redundant imports/exports so that models can be tweaked/edited right in place. This also significantly reduces learning time, as a 3D artist can already be familiar with the material/lighting/animation system of the corresponding 3D suite and developed working skills in the past.

    farmer-blender.jpg

    Everything in one place.

    Unity3D is a game engine with its own editor that is tailored to game development. Models are usually imported in the editor from external 3D packages and often require certain tweaks before they can be used in the engine. It also offers its own material/lighting/animation system to be learned and dealt with.

    Memory management

    Being a native JavaScript engine, Verge3D enjoys automatic and effective memory management provided by the modern browsers.

    Contrary to that, Unity developers are themselves responsible for finding and setting correct memory consumption limits for their apps which can sometimes lead to unpredictable behavior and crashes for some users.

    Interactivity

    Verge3D has been offering an intuitive and easy-to-grasp visual logic system called Puzzles. With Puzzles, it is possible to implement complex interactions even if you never programmed before. This logic system additionally offers functionality that is specific for the Web.

    farmer-puzzles.jpg

    Gamedev with no coding.

    Although there are third-party add-ons for Unity3D that allow for adding interactivity without coding, they are primarily aimed at desktop and mobile game development. With Unity3D you have to be a skilled programmer for coding non-trivial stuff.

    External scripting

    Verge3D provides JavaScript API that can be invoked within the same scope as the code of the application and the rest of a web page. This task can also be achieved without much coding with Puzzles.

    Unity3D developers must first define callable API in C# programming language, build the application (a rather prolonged operation) and only then the API becomes available to JavaScript code. The developers are also responsible for respecting data types and even (!) for allocating memory to do type conversion.

    User interface

    Verge3D can leverage native HTML/CSS for creating sophisticated, responsible user interfaces. Buttons, infoboxes, and menus can easily be integrated with the 3D scene with Puzzles to work in a bidirectional manner.

    farmer-ui.jpg

    Help revealed with a button. Everything is plain HTML/CSS.

    It is quite difficult to link a 3D scene to external web page elements in Unity3D. As such, Unity3D developers rather prefer to leverage its internal UI system, which is neither web- nor SEO-friendly.

    Publishing

    Verge3D apps are self-hosted by nature. However, if there is such a need, you can quickly deploy your app on a cloud with a single button click, so that it becomes accessible via a private link, or shareable in social media.

    With Unity3D you are on your own with deploying your apps on the Web.

    In closing

    There are probably many more differences between Unity WebGL and Verge3D left out of the scope of this article. I believe that even Unity fans would agree that if there is a platform-specific solution to a problem (such as creating 3D web interactives), it is most likely to work better than a universal approach that strives to cover all platforms at once. So if you are targeting the Web, choose a web-friendly engine!

    Here is the link to the original article: https://www.soft8soft.com/verge3d-versus-unity-webgl/



      Report Article


    User Feedback


    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Advertisement
  • Advertisement
  • Latest Featured Articles

  • Featured Blogs

  • Advertisement
  • Popular Now

  • Similar Content

    • By horror_man
      Hello, I'm currently searching for additional talented and passionate members for our team that's creating a small horror game.
       
      About the game: The game would be a small sci-fi/post-apocalyptic survival horror 3D game with FPS (First person shooter) mechanics and an original setting and story based in a book (which I'm writing) scene, where a group of prisoners are left behind in an abandoned underground facility. It would play similar to Dead Space combined with Penumbra and SCP: Secret Laboratory, with the option of playing solo or multiplayer.
       
      Engine that'd be used to create the game: Unity
       
      About me: I'm a music composer with more than 4 years of experience and I'm fairly new in this game development world, and I'm currently leading the team that'd be creating this beautiful and horrifying game. I decided that making the book which I'm writing into a game would be really cool, and I got more motivated about doing so some time ago when I got a bunch of expensive Unity assets for a very low price. However, I researched about how to do things right in game development so I reduced the scope of it as much as I could so that's why this game is really based in a scene of the book and not the entire thing. Also I'm currently learning how to use Unity and learning how to program in C#.
       
      Our team right now consists of: Me (Game Designer, Creator, Music Composer, Writer), 2 3D Modelers, 5 Game Programmers, 1 Sound Effect Designer, 1 3D Animator and 2 2D Artists.
       
      Who am I looking for: We are looking for a talented and passionated 3D Environment Artist that's experienced in the modeling of closed environments and is familiar with the horror and sci-fi genre.
      Right now the game is in mid development and you can see more information about it and follow our progress in our game jolt page here: https://gamejolt.com/games/devilspunishment/391190 . We expect to finish some sort of prototype in 3 months from now.
       
      This is a contract rev-share position
       
      If you are interested in joining, contributing or have questions about the project then let's talk. You can message me in Discord: world_creator#9524
    • By INTwindwolf
      THE PROJECT

      INT is a 3D Sci-fi RPG with a strong emphasis on story, role playing, and innovative RPG features such as randomized companions. The focus is on the journey through a war-torn world with fast-paced combat against hordes of enemies. The player must accomplish quests like a traditional RPG, complete objectives, and meet lively crew members who will aid in the player's survival. Throughout the game you can side and complete missions through criminal cartels, and the two major combatants, the UCE and ACP, of the Interstellar Civil War.
      Please note that all of our current positions are remote work. You will not be required to travel.
      For more information about us, follow the links listed below.
      INT Official website
      IndieDB page
      Also follow social media platforms for the latest news regarding our projects.
      Facebook
      Twitter
      CURRENT OPEN POSITIONS
      Website Manager
      3D Character Modeller
      3D Environment Modeller
      3D Animator
      Unity Engine Programmer
      REVENUE-SHARE
      The project is marching increasingly closer to be ready for our crowd-funding campaign. Being an Indie team we do not have the creative restrictions often imposed by publishers or other third parties. We are extremely conscientious of our work and continuously uphold a high level of quality throughout our project.
      We are unable to offer wages or per-item payments at this time. However revenue-sharing from crowd-funding is offered to team members who contribute 15-20 hours per week to company projects, as well as maintain constant communication and adhere to deadlines. Your understanding is dearly appreciated.
      TO APPLY
      Please send your Cover Letter, CV, Portfolio (if applicable), and other relevant documents/information to this email: JohnHR@int-game.net
      Thank you for your time! Please feel free to contact me via the email provided should you have any questions or are interested to apply for this position. We look forward to hearing from you!
      John Shen
      HR Lead
      Starboard Games LLC
    • By slagusev
      Question by Blender 2.8 and ArmorPaint. Made a model (1 screen), decided to try texturing, but in ArmorPaint somehow displays (2 screens). On the forum they write that you need to edit the normals. Corrected, but the effect is zero. In the unit it is displayed normally (3 screens).
      Who can that prompts ?!
       



×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!