https://github.com/debianmaster/joystick
Turn your android device into a joystick for your HTML5 game , This app opens a socket to server and polls orientation of the deivice. hostname and port are configurable.
https://github.com/debianmaster/joystick
Last synced: 6 months ago
JSON representation
Turn your android device into a joystick for your HTML5 game , This app opens a socket to server and polls orientation of the deivice. hostname and port are configurable.
- Host: GitHub
- URL: https://github.com/debianmaster/joystick
- Owner: debianmaster
- Created: 2013-01-19T11:33:22.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-19T16:58:44.000Z (over 13 years ago)
- Last Synced: 2025-01-29T14:53:42.156Z (over 1 year ago)
- Size: 180 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Turn your android device into a joystick for your HTML5 game , This app opens a socket to server and polls orientation of the deivice.
hostname and port are configurable.
A node server program is provided for testing.
Check list:
For *server-nodejs-program*
1) app.js rename host ip address to appropriate ip address of your server
2) server.js rename host ip address to appropriate ip address of your server
3) Please run server.js first and then app.js to run on node
a) node server.js
b) node app.js
4) in public/index.html change the ip address to your server IP address
var socket = io.connect('http://208.117.34.161'); -- this line
5) node modules that need to be installed
a) socket.io (npm install socket.io)
For *client-android-application*
1) make sure you run server which listens on port 8081 (by default) before using the android application
2) android client sends data to server as follows
For auth :
{"Action":"Auth","User":"tesrusername","Pwd":"testpwd"}
For device orientation change:
{"Action":"Angle","Angle":"246.57813"}
I will be happy to help for further assistance , 9chakri@gmail.com