A Fruit Ninja–style game for LG webOS TVs, controlled with the Magic Remote's motion sensor. A test project, built purely out of curiosity.
the brief
This one exists because I wanted to know whether the LG Magic Remote's motion sensor could be read from a webOS app, and whether it would feel good enough to play with.
It can, and it does. Fruit Slash is a full motion-controlled slicing game, packaged as an installable IPK, running entirely on the TV.
the tricky bit
A television is a hostile place to build a game. The runtime is an old Chromium, there is no touchscreen, the player is three metres away, and the only pointing device is a remote that may or may not expose its gyroscope.
Get any of that wrong and the game is unplayable rather than merely bad.
what I did
Motion comes from the remote's accelerometer through the webOS luna service, mapped straight to an on-screen blade. If the sensor is unavailable it falls back to the remote's pointer automatically and tells the player what happened.
Everything runs on the TV with no server. Sound effects are synthesised in Web Audio rather than shipped as files, so the whole package stays tiny.