HTML5 Frogger
Level: 1
1
0pts
To use your mobile phone as a joystick,
please go to http://demo.kaazing.com/frogger/ws and enter the following pin:

The Kaazing Platform Powers The New Living Web!

This demo is an example of a living web application that connects different browsers together directly, essentially providing peer to peer connectivity. The only requirement is to run a Kaazing message gateway to broker the messages in between the various browsers. In this case, we are running the Kaazing JMS gateway to broker the messages in between the mobile phone joystick and your game browser, but there is no server side code to run the game, the game is running 100% in the browser as HTML5 and Javascript code.

By sampling the tilt level every 100 milisconds, we are able to leverage your mobile phone as a joystick even if the messages flow over the internet. That way, we give you more control to be able to avoid objects even if there is some latency over the internet. If it wasn't for Kaazing's highly scalable gateway, it would not be possible to use an iPhone as a joystick, because the latency would be too great.

From a development point of view, all the code is written entirely in Javascript. We did not have to write one single line of server side code, there are no server side scripts or programs that process any of the messages flowing through the gateway. Essentially, HTML5, web sockets and Kaazing combine together bring the power of pure peer to peer programming to the world wide web. Let your imagination go wild as to the types of applications that are now possible. In this way, the Kaazing platform can power a whole new generation of applications, the sky is the limit.

Credits: This game is based on the code from Brian Stoner who was kind enough to donate the code for this demo. All modifications to this game are released under the Apache Version 2 License., but we ask that you give credit to the original authors, Brian Stoner for the HTML5 canvas and Axel Kratel for the websockets and JMS code.

If you have an HTML5 demo and you would like to re-use this code to add your own websocketa joystick, please let us know and we can give you access to our joystick gateway and a topic. Then, all you need is to write some Javascript to get up and running.

Copyright © 2013 Kaazing Corporation,   All Rights Reserved.