In November 2016, Google
was working on implementing native WebVR support into Chrome 57,
enabling VR developers to reach users across different headsets with a single web app. We were invited to
access an early version to play with.
An earlier version of Mr Nom Nom included low-poly characters with procedurally generated walk animation.
We wanted to build something simple, for everyone to have fun with
and therefore liked the idea to build a silly game, that works across as many platforms as possible,
from Cardboard to the latest high-end device.
First we developed our own physics simulation, which procedurally animates multiple characters in
three.js without munching up too much performance.
We limited ourself to basic geometric shapes in the character design, which allowed us to
create a simple XML-based character editor. This way we are able to quickly build a variety of
characters and without having to worry about animating them – our simulation takes care
of all their movements procedurally.
On of the characters, called "Giraffe", built out of seven geometric solids. All movements are code generated, so are the legs.
Continuing to prioritise accessibility we created a game mechanic that works without additional
controllers other than the player's head. Players direct Mr Nom Nom to circle the other characters
to trap them with the red scarf. Get close but not too close or risk losing. A mix between Snake and
Pac Man – embodied by a donut with a red scarf – perfect game mechanic stuff.
To further lower the hardware requirements we built a system that measures the user's device framerate on the fly and
switches visual details on or off depending on the current performance of the device. Hence we could ensure that
the experience was fluid, even on low specification devices.
An earlier version of Mr Nom Nom. Including a lovely 3D landscape which was sacrificed later on for the sake of gameplay.
On April 12 2017 the game Mr Nom Nom was released alongside other WebVR experiments by some other fantastic people as part
of Google's WebVR Experiments platform.
The code is open source and available here
under the MIT license.