Multi-player and screen capture using a Chrome app

Continuing from the discussion of using a USB host or peer-to-peer, I have written a Chrome app which allows you stream serial data from one Arduboy to an unlimited number of Arduboys and screen capture from the Arduboy to the computer.




Screen capture:


Cool thing you made @davidperrenoud, you should make a very simple pong version as a first test !

1 Like

If someone wants to have a look or make a pull request, here is the source:

Does the Arduboy need to request the data from the server, or do you just stream all data to all ports?

All data is streamed to all ports (except the port from which the data is coming).

I would advise to define the first Arduboy to start multiplayer as the “server”: it would manage the game logic, receive keypresses from the other Arduboys and send them data.

1 Like

Coming soon…



LOL. Ok, I’m totally interested in a network game for Arduboy now that I know Chrome can do serial port communication. Could imagine a big game with a web UI that showed overall progress while each played was plugged into USB and had their own individual view of the world.


Cool to see you posting again @Dreamer3!

Indeed, I am still waiting for the first multiplayer game, but you could do much more advanced stuff (online multiplayer, streaming data, etc.) and it only takes a couple dozens lines of code to use Chrome’s Serial interface.

Oh boy, what’s the simplest version of that that could be fun?

Ok … on TEAM a.r.g. 's to do list: Pixel Fighter redacted multiplayer

Moderator Note:
Links to Team ARG’s website have been removed due to malicious new owners.

1 Like

I finally updated the Chrome app with the image streaming that you can see in the video above!

As always, you can stream text to other Arduboys with Serial.println() and receive with Serial.readStringUntil('\n').

But now, you can also send the content of your Arduboy screen to the computer by changing these lines in Arduboy.cpp to:

void Arduboy::display()
  Serial.write(sBuffer, 128 * 64 / 8);

Cool, I suppose this could be used to raw dump a screenshot or output the game to a video file on a PC?

Exactly. :wink:

You have an example in the video above.

1 Like

lol I completely missed that, sorry, browsing in work is a pain as it blocks loads of scripts/sites/etc!

Cool multiplayer for arduboy not sure if I have the concept but could you use this for teeny tank?

Yes, of course. You can just send values or keys back and forth between the two Arduboys. Have a look at this for an example:

I also began to make a Ukulele Champion game but never finished it.

cool good code but could you modify teeny tank and use this code

I won’t have the time, but maybe try to convince @Jezzamon? I can give my support for any technical question.

Seems like an interesting idea, although the original idea of TeenyTank was to make a game that was multiplayer with just one Arduboy. As it’s turn-based, the pass-and-play style makes more sense there, I think.

It’s probably not too hard to do, but I am also not very time-free at the moment. The code is available at Github, if you want to have a go at modifying it yourself:

I think what you’d want to do is to use the concept that @davidperrenoud posted above, and edit the updateAim() function so that it either takes input from the buttons or from the Serial port depending on which player is playing. Then you just need something to figure out which player is going to be first.

1 Like

After getting this to stream, can I make a request?
Is it possible to have some sort of frame reset option? every now and then, the display goes a bit wonky if there is any sort of interruption in the data.

1 Like