Working with Unity and WebGL.
The new WebGL build feature from Unity is pretty cool and – at the same time – somewhat overdue. Huge thanks to Unity for putting so much effort into it and pushing forward!
However, when playing around with first WebGL builds, we’ve come across some drawbacks:
- Long build time: you can’t just try out a new feature or test a changed setting quickly. We have not measured the build time for Volley Brawl yet, but have the feeling that it really takes quite long. Also, the system seems to be halting for a moment (even the mouse pointer stops moving). Maybe this is just now at the beginning, because we have to try out a lot with this new technique. We are looking forward to the cloud build feature for WebGL as announced for Unity 5.3 which does the builds automatically in the background to save you build time and resources.
- Keyboard input: keyboard input is possible with WebGL – no issues so far. But we have interferences with browser hotkeys. We haven’t found the ultimate solution to avoid collision of browser hotkeys and game keyboard controls, so actually we are using an odd keyboard layout. For the release, we have to find ways to optimize this, most likely by writing a browser hotkey suppression in JS.
Currently we are mainly focussing on optimizing two crucial JS libraries into our WebGL build:
- PeerJS – to implement peer to peer browser communication for PvP
- ParseJS – for storing user information, player progress and matchmaking
We’ve achieved nice first results for both, but there are still some must have features that we need to implement for the release.
Updates are to follow,
Your Fantasy Arts Team