DonjuanChu / Lightstreamer-example-RoomBall-client-javascript

A simple gaming/collaborative HTML5 application fed in real time via a Lightstreamer server

Repository from Github https://github.comDonjuanChu/Lightstreamer-example-RoomBall-client-javascriptRepository from Github https://github.comDonjuanChu/Lightstreamer-example-RoomBall-client-javascript

Lightstreamer - Room-Ball Demo - HTML Client

This project includes a web client front-end example for the Lightstreamer - Room-Ball Demo - Java Adapter.

Live Demo

screenshot
### View live demo

Details

This Room-Ball Demo implements a simple gaming/collaborative application fed in real time via a Lightstreamer server.
Once logged in, the user can start move his or her avatar in the room and exchange messages with every other user present in the demo. For each user is created an avatar of a specific background color, on top of which the nickname chosen by the user is displayed and the balloon with the last typed message appears to the right.
User messages are broadcasted as you type, character by character, to all other users.
The red ball is a passive object that you can push in different directions with your avatar.

The demo includes the following client-side functionalities:

Install

Before you can run the demo some dependencies need to be solved:

  • Get the lightstreamer.js file from the latest Lightstreamer distribution and put it in the src/js folder of the demo. Alternatively you can build a lightstreamer.js file from the online generator. In that case be sure to include the LightstreamerClient, Subscription, DynaGrid, and StatusWidget modules and to use the "Use AMD" version.
  • Get the require.js file from requirejs.org and put it in the src/js folder of the demo.
  • Get the jquery.qtip-1.0.0-rc3.min.js file from qtip download page and put it in the src/js folder of the demo.
  • Please note that the demo uses a jQuery customized theme, included in this project.

You can deploy this demo in order to use the Lightstreamer server as Web server or in any external Web Server you are running. If you choose the former case please note that in the <LS_HOME>/pages/demos/ folder there is a copy of the /src directory of this project, if this is non your case please create the folders <LS_HOME>/pages/demos/RoomBallDemo then copy here the contents of the /src folder of this project.
The client demo configuration assumes that Lightstreamer Server, Lightstreamer Adapters and this client are launched on the local machine. If you need to targeting a different Lightstreamer server open js/Constants.js file an change the SERVER property accordingly.

 SERVER: protocolToUse+"//localhost:8080"

Anyway the ROOMBALL Adapters have to be deployed in your Lightstreamer server instance. The demo is now ready to be launched.

See Also

Lightstreamer Adapters Needed by This Client

Related Projects

Lightstreamer Compatibility Notes

  • Compatible with Lightstreamer JavaScript Client library version 6.0 or newer.

About

A simple gaming/collaborative HTML5 application fed in real time via a Lightstreamer server

License:Apache License 2.0