Multi-player linked Arduboys via a USB host (PC)

I’ll take a look this evening. I recently lost a hard drive that wasn’t backed up and it may have been on there. It was relatively simple. It followed a lot of the principles of sockets which is used for regular networking but used serial connections instead of socket connections. The biggest issue for anything larger is making sure Python keeps the correct data types as Python doesn’t allow data type to be declared.

In the future it could be possible to leverage a relatively infinite source of processing power in the server to do all calculations for more complex games with the Arduboy being just a video output and button input.

@bateske A bit overkill, but you should also be able use my multi-player Chrome app on a Raspberry Pi.

That’s awesome, had no idea Chrome was capable of serial communication. Guess what they say is right. It’s practically an operating system by itself these days. Would you be willing to offer the source?

@Wozza a bit scrolling didn’t hurt anybody yet :wink:

http://community.arduboy.com/t/multi-player-using-a-chrome-app/553/3

1 Like

I made below. Is it ok?:

Multi-Player linked Arduboys via a Raspberry pi USB host

Here is a code:

9 Likes

In addition, I tried this Chrome App from @davidperrenoud with my clients.
It also went well :slight_smile:

2 Likes

I think another simple device which has enough USB ports and can send the messages from 1 to all would be OK. That can be done with another Arduino and maybe on a future model developers can use the I2C port.

were you able to actually test it? I scrolled down but couldn’t find a report.

1 Like

Did anyone ever end up writing something for this (in this thread or elsewhere)? I’m working on a tiny RTS and wouldn’t mind implementing something like this later on down the road (either branching off to make a secondary multiplayer version once I finish what I have or writing it for the next gen Arduboy once that comes out).

I briefly managed to get a game of noughts & crosses sort of working over USB between an Arduboy and a Pokitto because I was planning to develop a serial communication protocol, but I gave up on it and forgot about it.

In case it helps, my serial bridge was based on this:

Part of the reason I gave up was because I was trying to solve too many problems at once.

I wasn’t just happy with getting it working,
I was also trying to find ways to detect cheating,
which to be honest is probably kind of an impossible task.

1 Like

Thanks! I definitely wouldn’t be opposed to trying to pick this up or make something for it myself (once I’ve worked my way up to it), but if thats the case id rather hold off for the next gen Arduboy for sure (just because the finer details are still up in the air, would rather it be more optimized/compatible with that then have to rewrite). So either way, I’ll definitely return to that, thanks!

i thinked about it (7 pins usb C)…and start the video output as it was done with the Gameduino TV Adapter - by Myndale

Could a PC reading out serial data be used to scan RAM? The goal is to integrate the actual Arduboy device with retroachievements.org. That way one could “collect” game achievements without having to run the game in an emulator.

Or would the game itself have to be responsible for sending the RAM data over serial? I was hoping that it was some kind of “debugging” feature.

Yes, the game would have to do so.

No, it’s not like JTAG. As far as I’m aware, the Arduboy doesn’t have any kind of hardware debugging functionality.

Usually people just intert Serial.println or arduboy.println statements when they need to debug something, and then read the text output either on the screen or with a serial monitor.

(You can read progmem and EEPROM out in bootloader mode, and even modify them, but it’s not the same thing as hardware debugging.)

Serial communication is more comparable to ethernet - aribitrary bytes of data sent over a wire, and the receiving software must decode it. But that’s precisely why it’s possible to use it to do multiplayer - it’s not peeking at RAM addresses, the games are sending byte streams (or even data packets) of their own construction.

A game with built-in achievements could push notifications out over serial, but that requires designing/modifying the game to do so.

I had a quick look at the datasheet and it seems the ATmega32u4 does support JTAG, so it might be possible to use JTAG to inspect RAM, but I’m fairly certain that you’d have to open up the shell to connect some wires to the right areas.

The 4 lines for the JTAG interface are on the pins used for the 4 buttons of the D-PAD, so you wouldn’t be able to use it during game play.

Also, you would need to use an In-Circuit Serial Programmer (ICSP) to set the JTAGEN fuse to enable the JTAG interface. This fuse is not set for the Arduboy.

1 Like