First Unity game in WebGL: Owlchemy Labs’ conversion of Aaaaa! to asm.js

October 14, 2014 in Technology

Starting today, Aaaaa! for the Awesome is the first commercially available Unity WebGL game! It’s been a long ride for Unity WebGL tools and Owlchemy Labs have been along for a fairly sizable chunk of it. You can get the fruits of their collaboration with Dejobaan Games along with other exciting new WebGL games in the Humble Mozilla Bundle.

“Working with super early versions of the Unity WebGL exporter was a surprisingly smooth experience overall!,” writes Alex Schwartz, the CEO of Owlchemy Labs, on the Mozilla blog.

“Jonas Echterhoff, Ralph Hauwert and the rest of the team over at Unity did such an incredible job getting the core engine running with asm.js and playing Unity content in the browser at incredible speeds, it’s pretty staggering. When you look at the scope of the problem and what technical magic was needed to go all the way from C# scripting down to the final 1-million-plus-line js file, it’s mind boggling”.

But getting the game to compile in this new build target wasn’t as easy as hitting the big WebGL export button and sitting back. While Unity did they care of a lot of the heavy lifting under the hood, there were some significant challenges that we worked together with Owlchemy to overcome.

The porting process began in June 2014  when Owlchemy gained access to the WIP WebGL exporter available to the alpha group. Was a complex game like Aaaaa! for the Awesome going to be portable within the limited time frame and using such an early framework?

“After two days of mucking about with the exporter, we knew it would be doable (and had content actually running in-browser!) but as with all tech endeavors like this, we were walking in blind as to the scope of the entire port that was ahead of us. Would we hit one or two bugs? Hundreds? Could it be completed in the short timespan we were given? Thankfully we made it out alive and dozens of bug reports and fixes later, we have a working game!”

Thanks to all those bug reports, developers using the current and future version of the tools will get all of these fixes built in from the start and can benefit from a better pipeline from Unity to WebGL.

Alex sees the web as a very good place for ambitious Unity projects. “You can expect Owlchemy Labs to bring more of their games to the web in the near future, so keep an eye out for those! ;) With our content running at almost the same speed as native desktop builds, we definitely have a revolution on our hands when it comes to portability of content, empowering game developers with another outlet for their creative content, which is always a good thing.”

More than two years have passed since the initial WebGL experiments at our HackWeek in Copenhagen. We’re extremely happy about the journey so far, the collaboration with our alpha and beta groups and our partners including Mozilla. We’re having loads of fun playing Aaaaa! for the Awesome and everybody’s looking forward to other upcoming Unity WebGL games. But we absolutely can’t wait to see what you all make with our Unity WebGL tools once Unity 5 is out!

Comments (29)

Subscribe to comments
  1. Tomasz Kielski

    December 10, 2014 at 8:37 am / 

    I have tried to build just an empty scene from a new empty project to WebGL.
    I have tried these settings from the above picture and I can’t!.
    That’s what I am getting:
    Error building Player: Exception: Failed building WebGL Player: “C:\Program Files\Unity 5.0.0b14\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe” “C:\Program Files\Unity 5.0.0b14\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc” @”G:/unity5/project/New Unity Project/Assets/../Temp/emcc_arguments.resp”

    – with the b14 version

  2. Jorge

    November 14, 2014 at 12:05 pm / 

    I´m from Cuba. My name is Jorge and have 14 years old. I am developing a game but with the Unity 3.5 I wanted to be developer of games of Unity

  3. Beebo

    November 6, 2014 at 7:43 am / 

    Our initial tests are showing very good results with webgl. Any word on when the webgl export will go beyond (preview) and be deployable?

  4. Kuroato

    October 30, 2014 at 4:48 am / 

    MijiKai Games planes to bring Heroes of Rune http://heroesofrune.com/ to WebGL with Photon Unity Networking! If anyone from Unity, or ExitGames can give us a helping hand to get a head start, that would be awesome! ^_^

  5. Marcius Oliveira

    October 25, 2014 at 1:33 am / 

    My Firefox OS say “Thanks” I ll back play mobile games :D

  6. UnityDEv

    October 19, 2014 at 11:24 am / 

    it’s not fair! when we will get UNITY 5???

    I paid for both versions (unity 4 &5) and waiting more than half year and how long more?

    what will be when someone is paying by subscription for unity 4&5? if you don’t release unity 5 before subscription ends?

  7. tj

    October 19, 2014 at 4:46 am / 

    Is WebGL available for everyone with access to U5 Beta?

    1. SergeyEvseev

      October 20, 2014 at 1:28 pm / 

      Yes, it is.

  8. Paul Jacobs

    October 17, 2014 at 8:08 pm / 

  9. Blue Bean Apps

    October 17, 2014 at 12:08 am / 

    I could really use WebGL now, so I can’t wait for Unity 5 to come out! I’m still having fun with the new/improved UI in 4.6 beta! I’m keeping high hopes for Unity 5!

    – Chris

  10. Samuel

    October 15, 2014 at 5:03 pm / 

    Good news.
    I want to port the game I am developing for three years now to WebGL.

  11. Psionic Games

    October 15, 2014 at 11:11 am / 

    This is great news, looking forward to working with Unity & HTML 5

  12. Roland

    October 15, 2014 at 11:08 am / 

    Who needs this webGL? Give us updated mono with .net 4.5 libraries !

    1. koblavi

      October 15, 2014 at 1:05 pm / 

      While I’m tempted to say ‘Everybody but you’, I’m not exactly a big fan of trolling on the blogs, so I won’t. That said, If you’ve been following the roadmap closely, you’d know of a spin off project from the Web GL experiments that is going to make it possible to use the latest and greatest version of mono/.Net. It’s called IL2CPP . So if anything, you should be thankful that WebGL is coming.

      Language features are a nice-to-have. But WebGL is something that affects your bottom line directly: getting your games into the hands of many users on as many platforms as possible. I stand to be corrected though, that may not be yours :-P

  13. jdmulti

    October 15, 2014 at 9:15 am / 

    I’m really exciting about this web-GL feature. I wonder what kind of Unity features I could use in this web-GL version, because I had some really challenging projects before with the webplayer which amazed my clients.

    I had to create huge landscapes which houses, props and such to illustrate an excisting project. The challenge there was the amount of terrains, houses, props, realtime lighting and water reflections. It’s good to read this kind of articles before Unity 5.0 is being released. This way I can read what difficulties others have and what there solutions are. Before Unity 5.0 comes out, I can already think of how to create such a project without the webplayer but with Web-GL. Especially that last part is what I missed in this article, but when I did read the official blogpost of Owlchemy I found what I hoped for.

    I would suggest Unity to share this kind of information a bit more. It gives us a good view of what would be possible, how others pushed the limits and how they solved certain issues. I can’t wait to get my hands dirty on this Web-GL, I which I was in this Alpha. >:)

  14. schmosef

    October 15, 2014 at 7:54 am / 

    Those Owlchemy Labs guys are aweome. I’ve learned a lot from their Unite videos.

    One of the reasons I’m planning on attending Unite next year is to meet them and buy them all a drink.

    1. Blue Bean Apps

      October 17, 2014 at 12:11 am / 

      Just a drink? I would buy them all luxury cars if I had the money… and have a drink or two with them in their new Lexus LFA!

  15. Chris Shead

    October 15, 2014 at 7:14 am / 

    Thats really cool turbo boost add on to an already fantastic Game Engine.

  16. Taylor Ringo

    October 15, 2014 at 6:14 am / 

    Wait, isn’t WebGL out for Unity 5? Or was it releasing for the 4.x.x?

    1. Jonas Echterhoff

      October 15, 2014 at 7:25 am / 

      This was made with a 5.0 beta.

  17. UNKNOWN

    October 14, 2014 at 9:42 pm / 

    HI ITS THE BEST MAKER FOR VEDIO GAMES THANK YOU BECAUSE ITS FREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

  18. Fernando

    October 14, 2014 at 9:04 pm / 

    In the current version of WebGL exporter there is a big limitation that causes a non self explained compile error when the first parameter of a extension method is a generic T, or when there is a “where” using generics.
    This is a big limitation because it prevents us from using a lot of third party code, as well as Unity framework code like the Linq library which does not work with WebGL.
    I want to know if that will be fixed, because the Flash exporter had the same issue and was never fixed, probably because porting that C# features to other lenguages that don’t have it must be very difficult or impossible.

    1. Josh Peterson

      October 15, 2014 at 2:39 pm / 

      @Fernando Both of these cases should be working now. I’ve just tried them with the latest 5.0 beta, and they seem to compile and run correctly with WebGL. We have made a number of improvements recently, with which version did you experience this problem?

      If it does still happen, could you please submit a bug with a project to reproduce the problem? We would like to correct it. Thanks.

      1. Fernando

        October 16, 2014 at 8:13 pm / 

        I experienced the problem using Unity 5 beta 6. I was using a friend’s copy in his house because I don’t have access to the private beta, so It’s complicated for me to send a bug report.
        It was fixed on beta 7 and 8? I Didn’t have the chance to test these builds.

        1. Fernando

          October 24, 2014 at 3:30 am / 

          Confirmed! still not working in the last version, beta 9.

  19. Aaron

    October 14, 2014 at 8:41 pm / 

    @CHRIS HENDRICKS , nice one :)

  20. Chris Hendricks

    October 14, 2014 at 8:20 pm / 

    The first Unity WebGL game is “Aaaaa! for Awesome”? What, are we converting the games in alphabetical order or something?

    1. koblavi

      October 15, 2014 at 1:09 pm / 

      +1 nice one! haha

    2. Blue Bean Apps

      October 17, 2014 at 12:17 am / 

      The next game would be “Best Game Engine” and the one after that would be “Coolest Game Engine” and the final one would be “D*MN GOOD GAME ENGINE!!.” After the final game, Unity would begin work on making their d*mn good game engine even better. Can’t wait for Unity 19! :P

Comments are closed.