My Ideas About Multiplayer

Discuss anything about DraStic here.
User avatar
ericbazinga
Posts:1123
Joined:Mon Apr 13, 2015 6:46 pm
Location:Somewhere in VRchat
Contact:
My Ideas About Multiplayer

Post by ericbazinga » Thu Jun 18, 2015 8:54 pm

Exophase wrote:Nintendo DS's wifi hardware has two use cases and a bunch of different modes to support both. One we'll call "infrastructure", where it's used to connect to some Nintendo server. This is supported by something like a few dozen games. DeSmuME supported this way back when although it was pretty buggy, but I hear it plays a lot better with the custom servers (makes sense since they can willingly optimize both sides for it)

The other mode is where multiple DS's talk to each other in close range, which I've called "NiFi." This mode requires an extremely low latency connection, and uses a lot of hardware features that aren't completely understood. And I don't think DeSmuME's support for this works yet. It was our focus to try to get it to work somehow because of the Nintendo servers closing (but this was before the custom servers), but we haven't been able to get it to do much in emulation, and we couldn't even get a tunnel working with DSes in the same room going over a wired ethernet and shielded DS compatible wifi dongles. I think even if we could get that working we wouldn't be able to emulate it well with a direct connection because the latency requirements are so ridiculously high.

What I think is the best potential path for NiFi emulation is the same that I think is the best method for Gameboy and GBA link emulation: emulate two instances of the DS on one machine and synchronize button presses across the network instead of the NiFi connection (with the NiFi connection emulated locally). This would allow it to be used over the internet to some extent, especially if the use is things like trading Pokemon. But there'd be a large performance overhead emulating two DSes, even where you could get away without emulating video and such on the other one. And it'd require a big rewrite to support this. That, and we still don't really understand the hardware enough to get emulation working.

Getting infrastructure to work so it matches up with DeSmuME's support and can work decently with custom servers is probably a better thing to focus on. That does however mean that patched ROMs need to be used, because they're normally hardcoded to only work with the WFC server (they need the right SSL keys that can't be faked) I think we would need an autopatcher at the very least, and one that requires as little user setup as possible, or we'd be inundated with people asking us how to use it..

But at least the custom servers have some support for Pokemon (presumably for trading?), which is mostly what anyone wants wifi for. At least according to the list here: https://github.com/polaris-/dwc_network ... patibility So that's promising.
So, I hve been thinking a lot about DraStic Multiplayer recently, and I came up with an idea. In the post mentioned above, Exophase said that there was a latency issue with multiplayer, and that he couldn't get it to work as if the two Android devices were both DSes.
Well, consider this: all you'd need to do is take the DS multiplayer signal, adjust the latency to a sendable form, send that to the other device using WiFi/Bluetooth/etc., and then re-adjust the signal to its original state.
(reader's mind explodes :P )
So, Exophase, does that solve the issue?
Image

You can also find me on Reddit (u/Ericbazinga) and Discord (in the DraStic Discord server). You'll find me in those places almost daily and here almost never.

reeve
Posts:38
Joined:Wed Mar 26, 2014 6:44 pm

Re: Multiplayer Breakthrough!

Post by reeve » Thu Jun 18, 2015 11:26 pm

...you should probably avoid commenting on technical aspects you don't understand. The implementation of the "re-adjust the signal to its original state" part would probably require the creation of a time travel device to remove the latency from the signal lol.

User avatar
ericbazinga
Posts:1123
Joined:Mon Apr 13, 2015 6:46 pm
Location:Somewhere in VRchat
Contact:

Re: Multiplayer Breakthrough!

Post by ericbazinga » Fri Jun 19, 2015 12:01 am

reeve wrote:...you should probably avoid commenting on technical aspects you don't understand. The implementation of the "re-adjust the signal to its original state" part would probably require the creation of a time travel device to remove the latency from the signal lol.
Oh. Well, let me rephrase the sentence: You'd be adjusting the already-modified signal so it would be usable by the emulator.
Image

You can also find me on Reddit (u/Ericbazinga) and Discord (in the DraStic Discord server). You'll find me in those places almost daily and here almost never.

User avatar
beansta
Posts:375
Joined:Wed Aug 07, 2013 9:39 pm

Re: Multiplayer Breakthrough!

Post by beansta » Fri Jun 19, 2015 8:48 am

This sounds promising. I only require the 'multiplayer over wifi' emulation so i can play mario kart DS (and pokemon, obviously) online.
Devices running Android:

- Samsung Galaxy Note 4 (CM12.1, overclocked, undervolted)
- Asus Nexus 7 2013 (Stock Marshmallow...to play Pokemon GO on...)
- Tenfifteen QW09 SmartWatch (Kitkat)
- Fujitsu Lifebook T4410 Touchscreen Laptop (Remix OS 3.0)

User avatar
ericbazinga
Posts:1123
Joined:Mon Apr 13, 2015 6:46 pm
Location:Somewhere in VRchat
Contact:

Re: Multiplayer Breakthrough!

Post by ericbazinga » Fri Jun 19, 2015 9:31 am

beansta wrote:This sounds promising. I only require the 'multiplayer over wifi' emulation so i can play mario kart DS (and pokemon, obviously) online.
I'm glad you think this is good, it feels awesome to hear you say that.
For WiFi, all you'd need to do is just send the signal a farther distance (using WiFi of course) to a server (perhaps a special DraStic server?), and then send the signal to the other device/devices.
(reader's mind explodes again)
Image

You can also find me on Reddit (u/Ericbazinga) and Discord (in the DraStic Discord server). You'll find me in those places almost daily and here almost never.

Exophase
Posts:1715
Joined:Mon Aug 05, 2013 9:08 pm

Re: Multiplayer Breakthrough!

Post by Exophase » Fri Jun 19, 2015 4:36 pm

Sorry, but what you're saying doesn't make any sense.

Latency is detected in round trip travel. A sends a message to B, B responds to A. So long as A has a correct notion of the passage of time you can't fool it into thinking less time passed between the send and receive than really did.

There's really only two ways to get around this that I can think of:

1) Slow down the emulation of A and B so that the overage of latency doesn't occur while the emulation occurs. While this could make the game functional it would become unplayable.
2) Emulate A and B on the same device, emulate A' and B' on another device, and synchronize them at a higher level (button presses). This shifts the latency to button lag, which the user can feel but the game doesn't know about because it has no idea what the user is doing, unless it requires a fast response time from the user to work. This is the method I described in the post you quoted.

If you don't understand either these explanations then that's a probably a good sign that you won't be able to propose an alternative.

User avatar
ericbazinga
Posts:1123
Joined:Mon Apr 13, 2015 6:46 pm
Location:Somewhere in VRchat
Contact:

Re: Multiplayer Breakthrough!

Post by ericbazinga » Fri Jun 19, 2015 5:06 pm

Exophase wrote:Sorry, but what you're saying doesn't make any sense.

Latency is detected in round trip travel. A sends a message to B, B responds to A. So long as A has a correct notion of the passage of time you can't fool it into thinking less time passed between the send and receive than really did.

There's really only two ways to get around this that I can think of:

1) Slow down the emulation of A and B so that the overage of latency doesn't occur while the emulation occurs. While this could make the game functional it would become unplayable.
2) Emulate A and B on the same device, emulate A' and B' on another device, and synchronize them at a higher level (button presses). This shifts the latency to button lag, which the user can feel but the game doesn't know about because it has no idea what the user is doing, unless it requires a fast response time from the user to work. This is the method I described in the post you quoted.

If you don't understand either these explanations then that's a probably a good sign that you won't be able to propose an alternative.
Well, forget I mentioned latency- but it does get me thinking again. What if we just GOT RID of that latency? Basically, you'd be converting the emulated DS signal so it could be sent to the reciever, and then convert THAT signal on the reciever's device so that their copy of DraStic could use it.
Just think- by throwing latency OUT of the equation, you could do all sorts of cool stuff. In fact, several cool things come to mind- playing Mario Kart against other users, trading Pokemon with them, and perhaps even the idea of Download Play functionality (Just in case you don't have the right ROM).
Now of course, all this functionality would have to be restricted to DraStic users only, but the possibilities are LITERALLY limitless.
Image

You can also find me on Reddit (u/Ericbazinga) and Discord (in the DraStic Discord server). You'll find me in those places almost daily and here almost never.

Nighti
Posts:1
Joined:Fri Jun 19, 2015 5:19 pm

Re: Multiplayer Breakthrough!

Post by Nighti » Fri Jun 19, 2015 5:37 pm

ericbazinga wrote:What if we just GOT RID of that latency?
Please stop it. It hurts. It's like you are saying: "What if we just GOT RID of that gravity?"

This link describes perfectly the current Wifi DS emulation status. Basically we need a low level Wifi driver to ensure proper timings. But as there are different hardware modules in phones, the only realistic solution was described by Exophase.

User avatar
ericbazinga
Posts:1123
Joined:Mon Apr 13, 2015 6:46 pm
Location:Somewhere in VRchat
Contact:

Re: Multiplayer Breakthrough!

Post by ericbazinga » Fri Jun 19, 2015 6:32 pm

Nighti wrote:
ericbazinga wrote:What if we just GOT RID of that latency?
Please stop it. It hurts. It's like you are saying: "What if we just GOT RID of that gravity?"
Oh sorry. I'll stop.
Nighti wrote:This link describes perfectly the current Wifi DS emulation status. Basically we need a low level Wifi driver to ensure proper timings. But as there are different hardware modules in phones, the only realistic solution was described by Exophase.
Well that sucks, because both of Exo's options would make the emulator super slow and therefore unplayable. But you're actually onto something with that WiFi driver idea. Different phones may have different hardware, but they all run Android, and users of DraStic would have to have good phones in order to run it anyway, so it wouldn't matter.
Image

You can also find me on Reddit (u/Ericbazinga) and Discord (in the DraStic Discord server). You'll find me in those places almost daily and here almost never.

TkSilver
Posts:576
Joined:Wed Mar 25, 2015 3:30 am

Re: Multiplayer Breakthrough!

Post by TkSilver » Fri Jun 19, 2015 8:07 pm

ericbazinga wrote: Well that sucks, because both of Exo's options would make the emulator super slow and therefore unplayable. But you're actually onto something with that WiFi driver idea. Different phones may have different hardware, but they all run Android, and users of DraStic would have to have good phones in order to run it anyway, so it wouldn't matter.
Ok lets make this a little simpler. If Drastic worked on only lets say the oneplus 1and people did not care about using the wifi radio for anything other then Drastic then maybe you could adjust the driver to work as a low latency connection. Assuming that the oneplus 1 or whatever phone/tablet you chose was capable of low latency communication in the first place.

The reason the DS has a low latency local area connection is simple. The wifi radio's are designed both software and hardware to do it. For the most part there are only 2 different wifi chips at work the Nintendo DS one (DS and DS light) amd the DSi one that has a legacy mode to allow it to work with the original DS. Even if you get the software (drivers) to work if you do not have compatabile hardware it won't matter.

If you want a different idea that would be possible on mobile devices (maybe) them the best chance you have is figuring out how to hook up 2 devices with a USB cable and figure out a way to make a fake wifi hardware signal like you would if you ran 2 seprate instances on one device. Of any connection that a mobile phone has the speed of a direct connection like usb would be the lowest latency. I am not advocating this approach nor do I know if you can connect one android device to another through usb-otg bit that seems to be one of the only ways I could see outside of what exo said and even then you would probably have to sync the 2 devices.


Btw playing mario kart against others and some types of trading pokemon is infrastructure (online) play. That would involve the other issues thst exo put in the orriginal post you quoted. It is also the one that would be most likely to ever happen.

Post Reply