• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Melee Online: Why it isn't an option right now.

Massive

Smash Champion
Joined
Aug 11, 2006
Messages
2,833
Location
Kansas City, MO
I've seen the same idea posted about 5 or 6 times now and I've tried to refute them adequately but I figure an actual thread to point to will be more convenient at this point.

Melee cannot currently be played properly online via Dolphin with it's included netplay or any other service.

Here's why:

The way netplay is currently handled for gamecube games involves sending control pad data. Right now a buffer is created for your controller inputs and that buffer is sent to a server, where it is then sent to the other player.

If you have very low latency, that is, less than a 17ms ping (or about one frame) it may play acceptably for a short period of time.

Both games are running independently on different timers. Even if your game clocks are matching perfectly, the internal clock is still going to be off by a large enough margin to disrupt when your button inputs go through and differ the random seed on all events.

A very tiny delay in transmission can mean the difference between shielding and getting hit, and that is enough to cause a desync and make the games different from one another.

There is another issue, randomness within characters. Peach, Luigi, and Game and Watch all have moves which are based on "random" events. Stages like Pokemon Stadium or Fountain of Dreams change based on a "random" timer which will not be the same between two different machines.

There is a solution to this, but it is complicated and time consuming to implement.

In order to prevent desyncs, game memory state data would need to be sent almost every frame. The gamecube memory size is 43MB, which even compressed still weighs in around 15MB. 15MB cannot be sent in 1/60 of a second over nearly any internet connection you will encounter (do you have a 7.03 Gb/s synchronous connection? NOPE.) Luckily we only need a very small chunk of it (the player location, state, and stage data), but isolating that chunk is the hardest part. Until someone invests the time to find the memory locations of level and character data within the memory and alters the dolphin netcode to send and receive memory information there will not be truly functional melee net play.
 

Strife

Banned via Warnings
Joined
Mar 17, 2011
Messages
786
This is too bad. If Melee had online play like Gamecube games should have had then it the melee scene may still been very strong even now.
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
Dolphin Netplay no longer relies on an external server. The data is sent direct to IP.

That being said, you may not be right about the input buffer. Based on my observations, the emulator waits to receive input before advancing the game, therefore trading the desync with lag. In other words, if one's ping is >17ms, both games will stutter heavily as they wait to receive input data between each frame. However, this removes any possible desync that would be caused by non-random events, such as power-shielding a projectile.

Also, I've been working on isolating memory addresses of player data. If I make significant progress then I'll see to creating a Melee-specific Dolphin build which implements memory synchronization.
 

DerfMidWest

Fresh ******
Joined
Mar 31, 2011
Messages
4,063
Location
Cleveland, OH
Slippi.gg
SOFA#941
the melee scene is still strong .-.
and, @Pi, Melee, for starters, requires much faster button inputs than SSB64. Lag makes a bigger difference in Melee than it does in 64.
 

Massive

Smash Champion
Joined
Aug 11, 2006
Messages
2,833
Location
Kansas City, MO
That being said, you may not be right about the input buffer. Based on my observations, the emulator waits to receive input before advancing the game, therefore trading the desync with lag. In other words, if one's ping is >17ms, both games will stutter heavily as they wait to receive input data between each frame. However, this removes any possible desync that would be caused by non-random events, such as power-shielding a projectile.
Taken directly from the most up-to-date code, the buffer takes the pad data data, loads it into a byte-array of the size specified by the netplay host (based on ping) and causes a delay in processing based on the ping before sending.

If the both games were started at exactly the same time on identically powerful machines this may line up, but otherwise there are going to be instantaneous sync issues from the get go because the memory is not synced, nor is the game clock. You can very likely get a bit better performance by starting both sides from the same save state, but similar issues will result from performance lag.

Also, I've been working on isolating memory addresses of player data. If I make significant progress then I'll see to creating a Melee-specific Dolphin build which implements memory synchronization.
Me too, it's not very easy to sift through 43MB of assembler and HEX values.
If you come across anything, let me know and I'll be more than willing to help you isolate the necessary memlocs and code.

At this point I don't know if it would be easier to write an external trainer for the dolphin netcode or contribute it to the project itself.
 

Glöwworm

Smash Lord
Joined
Jun 23, 2010
Messages
1,417
Location
CA
I've stated this in the other thread:

If you would like an incentive to take on the project of making Dolphin more optimized for online play, then ask for donations and surely people will donate money (such as myself).
 

Massive

Smash Champion
Joined
Aug 11, 2006
Messages
2,833
Location
Kansas City, MO
I've stated this in the other thread:

If you would like an incentive to take on the project of making Dolphin more optimized for online play, then ask for donations and surely people will donate money (such as myself).
If I had the memory locations found and was in the process of writing the netplay code this would be more feasible. I'm not a fan of taking anybody's money though, especially when the functional netplay option is still so nebulously floating in the pre-design stages.

My name isn't Lyle Lanley and I don't want to sell anyone a monorail.
 

Battlecow

Play to Win
Joined
May 19, 2009
Messages
8,746
Location
Chicago
PJ64k ds's an annoying amount as well, and there are always 9 CS majors hanging around the boards and whining about how bad kaillera's code is and how someone should fix it. It's at least playable, though; even on server and with your connection type on LAN, you can usually get 3-4 games off before you get ****ed by desynch. My understanding is that Melee is a different kettle of fish (desynching every other stock or something) because it's got a lot more random **** in it.
 

Glöwworm

Smash Lord
Joined
Jun 23, 2010
Messages
1,417
Location
CA
My understanding is that Melee is a different kettle of fish (desynching every other stock or something) because it's got a lot more random **** in it.
Did you not read the OP? :laugh:

Also, P2P fixes the constant desync.
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
Melee Online...

a dream that seems so close...

yet so far away...
Not quite. We're a lot closer than you think.


I've been messing around in the emulator, and I discovered something interesting. Massive stated that syncing memory would involve sending about 15MB of data to the other player multiple times per second. I've discovered, however, that as much as 98.5% of this memory does not change while in-game. That reduces the amount of bandwidth required by a ton.

Without manually sifting through the remaining 1.5% and assuming we just send it all over, you'd be sending about 330kB of memory to be synced. Sending this 60 times per second is not feasible, but the memory would sync much less often than that, since controller input is already synced 60 times per second. Memory would sync 10 times per second, perhaps.

This still equals a bandwidth not feasible for most of us (>3MB/sec), but it's a LOT closer than what Massive originally claimed. In fact, a good chunk of that memory is probably related to graphics and unnecessary stage data and thus could be reduced further. Or, memory could simply be synced slightly less often for a more manageable bandwidth. It's all customizable, really.

This is incredibly feasible and can happen in a matter of months, or weeks, if we get the right people to work on it.
 

Johnknight1

Upward and Forward, Positive and Persistent
Joined
Feb 25, 2007
Messages
18,966
Location
Livermore, the Bay repping NorCal Smash!
NNID
Johnknight1
3DS FC
3540-0575-1486
Shoot if it only takes a couple of months, why hasn't it happened before=??? (other than that Phantasy Star Online glitched up online)

Also, would that stop such a proposed online system have random de-synching issues like Smash 64 does with Project 64=???

If this were to become a reality, I would face all ya'll in this thread!
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
Shoot if it only takes a couple of months, why hasn't it happened before=??? (other than that Phantasy Star Online glitched up online)

Also, would that stop such a proposed online system have random de-synching issues like Smash 64 does with Project 64=???

If this were to become a reality, I would face all ya'll in this thread!
It hasn't happened because the Melee community is rather small, and the Dolphin emulator community is rather small, and therefore the two don't exactly intersect. Netplay exists for Dolphin, but we're talking about a Melee-optimized build. The tools and power that make this easy haven't been available until somewhat recently (past couple years), so it's just that no one has gotten around to it yet.

De-syncing is the enemy, and we'd do everything we can to prevent it. Ideally, the game would very rarely desync, since we'd be keeping the important memory addresses synchronized between the two clients. However, there could be a number of unforeseen desync issues that would take a while to iron out. The tools we'll be using are open source, so that will help us very much. The problem with Smash 64 is that netplay works under Kaillera, which is not open source. So, there's no way of seeing if Kaillera is optimized for Smash 64, or how much. Furthermore, it's impossible for anyone to contribute or create a Smash 64-optimized build. In our case, we'll be optimizing the Melee netplay as much as we can.
 

Crusayer

Smash Lord
Joined
Dec 18, 2009
Messages
1,451
I am pretty surprised that no one in this community has really put time towards making netplay available for melee.

Recently, PCSX2 got netplay up and running. It's actually quite good as an early build. I didn't desync with a friend for over 5 hours of constant gameplay with only roughly 4 delay. Is the GC engine that hard to emulate as compared to a PS2 engine?
 

Massive

Smash Champion
Joined
Aug 11, 2006
Messages
2,833
Location
Kansas City, MO
It'd be really cool if GGPO could sort out the issues with Melee online.
I looked into this last night. GGPO won't work any better than netplay we have now, GGPO uses Kalliera as a backend and adds a set amount of lag before your inputs go through to mask lag that may occur afterwards.

This works great on other fighting games mostly because of how most of them use buffered inputs and are slightly slower paced than melee. If you desync in another fighting game, as long as your health bars aren't different per machine you can both stop doing inputs for a second and the game will catch back up and resync, in melee the speed of the inputs and the randomness inherant in levels and characters causes small desyncs all the time.

Most other games have far fewer variables to lose synchronicity than melee.

avalancer988 said:
I remember reading about this melee online hack somewhere in 2005. I didn't try it because you needed a broadband adapter (srsly, I couldn't find them in stores anywhere), PSO, Action replay, NTSC version, etc.

Sources:
Video showing gameplay
How to website (waybackmachine'd, may be slow)

Is this legit?
Yes, this is legit.
It is an old hack that just forwards your controller inputs to another gamecube, which is a relatively simple task using the same pathway they rip gamecube ISOs through.

It works by the same method that dolphin netplay currently does though, so it's not really any better than what we have now.

The Linked Article said:
NOTE: You will not want to set up any match in which something random might happen(IE: using G&W's >B move; picking Pokemon Stadium, Icicle Mountain, or Dream Land, or other certain levels, having items turned on, etc..) whatever has a random occurance, do not do a match with it. this is to prevent desyncing the game.
Despite some of the small progress IE and I made last night I'm still very reticent to put any kind of timeframe on any of this. It's just something we really want to pull off, and it's not going to be particularly easy.
 

Glöwworm

Smash Lord
Joined
Jun 23, 2010
Messages
1,417
Location
CA
It hasn't happened because the Melee community is rather small, and the Dolphin emulator community is rather small, and therefore the two don't exactly intersect. Netplay exists for Dolphin, but we're talking about a Melee-optimized build. The tools and power that make this easy haven't been available until somewhat recently (past couple years), so it's just that no one has gotten around to it yet.

De-syncing is the enemy, and we'd do everything we can to prevent it. Ideally, the game would very rarely desync, since we'd be keeping the important memory addresses synchronized between the two clients. However, there could be a number of unforeseen desync issues that would take a while to iron out. The tools we'll be using are open source, so that will help us very much. The problem with Smash 64 is that netplay works under Kaillera, which is not open source. So, there's no way of seeing if Kaillera is optimized for Smash 64, or how much. Furthermore, it's impossible for anyone to contribute or create a Smash 64-optimized build. In our case, we'll be optimizing the Melee netplay as much as we can.
Kaillera is open source iirc. Well, recently it has been. Anything in specific you need? I might be able to dig it up. I want to contribute with you guys but sadly, I am not a programmer :(
 

Bones0

Smash Legend
Joined
Aug 31, 2005
Messages
11,153
Location
Jarrettsville, MD
Couldn't you use mods to eliminate randomness from being an issue in the first place? Sort of like with Action Replay, you can stop Poke Stadium from transforming or stop the wind on Dream Land. I can't imagine making Peach only pull regular turnips or Luigi never misfire (or give G&W 9s everytime LOL) would be that much more difficult.

If I'm oversimplifying the whole thing, just lmk that it's more complicated than that. LOL

Either way, GOD SPEED to you men.
 

Massive

Smash Champion
Joined
Aug 11, 2006
Messages
2,833
Location
Kansas City, MO
Couldn't you use mods to eliminate randomness from being an issue in the first place? Sort of like with Action Replay, you can stop Poke Stadium from transforming or stop the wind on Dream Land. I can't imagine making Peach only pull regular turnips or Luigi never misfire (or give G&W 9s everytime LOL) would be that much more difficult.
We can remove a lot of the randomness, but it would eventually desync anyway due to minute variations in timing.

Also, I feel like if we're doing this we should do it right and not cop out. A memory synced version of melee is the goal here.

It's been said before I think but how does Brawl handle these random events?
I don't know for sure, I can't look at the brawl code.

It is built-in functionality though, so they very likely just sync the necessary game variables as part of the net code. It's very easy to incorporate when you're making the game originally. We're kind of working backwards here.

If memory serves, brawl online was also pretty terrible.
 

Bones0

Smash Legend
Joined
Aug 31, 2005
Messages
11,153
Location
Jarrettsville, MD
Is memory syncing the only thing holding people back from hopping on a powerful comp, plugging their controller into some USB doohickey, and playing someone online?
 

Massive

Smash Champion
Joined
Aug 11, 2006
Messages
2,833
Location
Kansas City, MO
Is memory syncing the only thing holding people back from hopping on a powerful comp, plugging their controller into some USB doohickey, and playing someone online?
Basically, Yes.

Not only that, it would allow people with less powerful, but still capable computers to play melee online as well since the games would still sync regardless of how choppy the other person's render is.
 

Massive

Smash Champion
Joined
Aug 11, 2006
Messages
2,833
Location
Kansas City, MO
The ideal scenario is to load the exe from memory off a cloud server.

Hrm.
I wouldn't call that ideal.
Cloud gaming is pretty rough as far as latency goes, especially since most schemes end up sending compressed video streams which add compression delay on top of regular transmission latency. They also pad the compression time and introduce extra lag in the front so it looks like the compression always takes the same amount of time.

This isn't even getting into the sticky wicket of compression issues.
 

TheCrimsonBlur

Smash Master
Joined
Jan 2, 2005
Messages
3,407
Location
LA, CA near Santa Monica
There are rather good encoding schemes on cloud services nowadays so I think the compression issue is overstated, but there nonetheless. However, Gamecube emulation's steep hardware requirements would be eliminated, and we wouldn't have to deal with issues like software updates/incompatibilities, and (ideally) could even make a more powerful, custom emulator.

Latency is a huge issue, and cloud would only compound that, but I'm not sure what can be done with that...

I don't think Melee can be played online no matter how good the netcode is; Melee is too damn quick. A cloud version would drop that purpose entirely, and rather give players a lobby to join to do things like test, mess around, etc. Imagine a smashboards conversation between person A and B. Person A claims Marth can DI out of Falcon's dthrow knee at 60. Person B disagrees. So they go on the cloud to test it. Thats pretty cool I think. Not as cool as being able to do lagless 1v1s but hey, its 2011 not 2030 lol.

What would you propose?
 

The Star King

Smash Hero
Joined
Nov 6, 2007
Messages
9,681
PJ64k ds's an annoying amount as well, and there are always 9 CS majors hanging around the boards and whining about how bad kaillera's code is and how someone should fix it. It's at least playable, though; even on server and with your connection type on LAN, you can usually get 3-4 games off before you get ****ed by desynch. My understanding is that Melee is a different kettle of fish (desynching every other stock or something) because it's got a lot more random **** in it.
What are you talking about? The only person I can think of whining is dandan (I think), and I remember Firo defending it by pointing out it is extremely good in terms of frame delay.

On P2P, and hell, even on server sometimes, I have played for over an hour without ds. With most people this is not the case, though, so I'm wondering what causes ds.
 

Battlecow

Play to Win
Joined
May 19, 2009
Messages
8,746
Location
Chicago
9 may have been an exaggeration and "Whining" was probably a bad word, post Gestapo.

You get lucky runs of no DS, more on p2p than server. It's random afaict.
 

The Star King

Smash Hero
Joined
Nov 6, 2007
Messages
9,681
I really don't think so. With some people I DS like every other game (Killer, SilentSlayers, JimmyJoe, Sin), even if there's no lag, and some I pretty much don't DS at all. I don't think it's luck based because I seem to consistently get a lot of DS with some people every time I play them - this isn't based off of single sessions.
 

Massive

Smash Champion
Joined
Aug 11, 2006
Messages
2,833
Location
Kansas City, MO
I really don't think so. With some people I DS like every other game (Killer, SilentSlayers, JimmyJoe, Sin), even if there's no lag, and some I pretty much don't DS at all. I don't think it's luck based because I seem to consistently get a lot of DS with some people every time I play them - this isn't based off of single sessions.
From what I've gathered I'm willing to suspect that most N64 emulation isn't syncing memory either.

What we're doing could be a first for emulated fighting games; neat.
 

The Star King

Smash Hero
Joined
Nov 6, 2007
Messages
9,681
There is an input plugin called "AQZ" kind of like P2P, except that it never desynchs. I've never used and am not quite sure how it works, though.
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
There is an input plugin called "AQZ" kind of like P2P, except that it never desynchs. I've never used and am not quite sure how it works, though.
It's capable of desyncing. The creator simply claimed that he hasn't experienced a desync in Project64 1.7, specifically. He said he's desynced in other versions, meaning it's technically possible. I think netplay that works purely on input always has a chance of desyncing no matter what. But, we're getting a little closer to memory synchronization, which would solve that problem, at least for Melee.
 

Glöwworm

Smash Lord
Joined
Jun 23, 2010
Messages
1,417
Location
CA
Yeah, I think others can agree that we don't generally care about online compatibility for other games but Melee. So yeah, a Dolphin build just for Melee sounds really awesome.

Actually, MKDD!! would be kicka*s as well.
 
Top Bottom