Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
The intention was to make a pirate ship runner-like game controlled by a wheel. I don't currently have arduino or some other decent device, but I have this small toy-microcontroller. It can't work as a hid, but it can write to serial port, and has an accelerometer, which I'm using here. Microbit is connected to pc using usb, and acts as a serial port. Every 20 ms it writes accelerometer's x value to serial. On pc I'm running a simple node js backend app, which reads on that serial port, and also runs a websocket server, that basically broadcasts that data to every connected client, as soon as the data is received. I modified coppercube source files to include a websocket client https://github.com/dhbaird/easywsclient. It was actually much easier then I thought. I'm also not sure why I didn't done that before - multiplayer is much easier if you can use websocket. https://youtu.be/OABv9CYJJRI |
||||
|
nice! |
||||
|
This is amazing, one can also use their Android device to do stuff like this if they don't own the Arduino or Other micro controllers. you can use android's accelerometer(gyroscopic) features over wifi (same network) or via usb cable to control stuff in your game. @okeoke, doing it with websocket is just amazing, and the demo you have shown is just wonderful, great job mate. |
||||
|
How far ccan this go - could it do like wii sport with a tennis racket/bowling-ball for example? Do you remember JediKnight with the lightsabers? That would be insane to see on coppercube, controlled by a microchip! |
||||
|
Hey, thanks for the responses:) I guess, with that particular device you can't do that much. Accelerometer actually works pretty nice, but it can only detect moving up/down, and tiling it left/right and forward/backwards. It is enough for for some 2d controls. Like you can make a game there you need to run a ball in a labyrinth, but racket or saber seem to be little too complex. |
||||
|
|