The Multiplayer Darts implements a multiplayer, Leap Motion controlled, dart game running in the browser and using Lightstreamer for its real-time communication needs.
This project shows the Data Adapter and Metadata Adapters for the Multiplayer Darts and how they can be plugged into Lightstreamer Server.
As example of a client using this adapter, you may refer to the Multiplayer Darts - HTML (LeapJS, Three.js) Client and view the corresponding Live Demo.
If you want to install a version of this demo in your local Lightstreamer Server, follow these steps
- Download Lightstreamer Server Vivace (make sure you use Vivace edition, otherwise you will see a limit on the event rate; Lightstreamer Server comes with a free non-expiring demo license for 20 connected users) from Lightstreamer Download page, and install it, as explained in the
GETTING_STARTED.TXTfile in the installation home directory. - Get the
deploy.zipfile of the latest release, unzip it and copy the just unzippedDartfolder into theadaptersfolder of your Lightstreamer Server installation. - Download croftsoft library and compile a
croftsoft-math.jarversion. Please make sure to include: applet, io, inlp, lang and math packages. - Copy the just compiled
croftsoft-math.jarfile in theBananaDart/libfolder. - Launch Lightstreamer Server.
- Launch a client like the Multiplayer Darts - HTML (LeapJS, Three.js) Client.
To build your own version of LS_darts_adapters.jar, instead of using the one provided in the deploy.zip file from the Install section above, follow these steps:
- Clone this project
- Get the
ls-adapter-interface.jar,ls-generic-adapters.jar, andlog4j-1.2.15.jarfrom the Lightstreamer distribution and copy them into thelibfolder.. - Download croftsoft library and compile a
croftsoft-math.jarversion. Please make sure to include: applet, io, inlp, lang and math packages. - Put the just compiled
croftsoft-math.jarfile in thelibfolder. - Build the java source files in the
srcfolder into aLS_darts_adapters.jarfile. Here is an example for that:
> javac -classpath ./lib/croftsoft-math.jar;./lib/ls-adapter-interface.jar;./lib/ls-generic-adapters.jar;./lib/log4j.jar -d ./classes ./src/com/lightstreamer/adapters/Dart/*.java ./src/com/lightstreamer/adapters/Dart/engine3D/*.java ./src/com/lightstreamer/adapters/Dart/room/*.java
> jar cvf LS_darts_adapters.jar -C tmp_classes com
- Copy the just compiled
LS_darts_adapters.jarin theadapters/Dart/libfolder of your Lightstreamer Server installation.
- Compatible with Lightstreamer SDK for Java Adapters since 5.1