Sonic Adventure 2: Battle Network is a netplay mod for Sonic Adventure 2 PC which is still very much in early development, and not a Sonic/Mega Man Battle Network crossover, unfortunately.
Originally a stand-alone program, SA2:BN now utilizes the SA2 Mod Loader to check for changed player and input values and synchronizes them with another instance of SA2 over the internet. It also now uses an oh so very slightly modified version of the SFML networking library (to allow seeking in sf::Packet).

Re-open the Mod Manager if you closed it, or just click refresh if it was still open.

Find "SA2 Battle Network" and enable it (by ticking the checkbox to the left)

If you have MainMemory's Character Select mod, disable it if you want spawn points in multiplayer to function correctly.

Usage:

If you know how to run a program with command-line arguments, just scroll down to see them.

In Steam, right click on Sonic Adventure 2, and click "Properties", click the "Local Files" tab, and click "Browse Local Files..."

Create a shortcut to sonic2app.exe and place it wherever you like

Right click the shortcut and click Properties.

In the "Target" box, at the end of the text, add a space followed by the arguments you want (e.g: "sonic2app.exe" -h 27015). Details below.

You must use that shortcut to launch the game in order for it to work. But I know what you're thinking. "Steam has launch options! Can't I just use that?" - but the answer is no. SA2 on Steam will always start the launcher first, so the command line arguments will go to the launcher and not the game.

Note: If you're trying to host and you don't use something like Evolve or Hamachi, you must forward ports on your router for both UDP and TCP protocols (for now). I won't go into detail on how to do this as there are many online resources that give detailed instructions already.

Command line arguments:

--host (or -h) [port] - Hosts a server on the specified port. When in doubt, use 27015

--connect (or -c) [address:port] - Connects to the specified address on the specified port. NOTE: As of version 3.2, the format has changed from the original [address] [port] to [address:port]. Be sure to update your shortcuts and stuff.

Thanks:
I owe a huge thanks to MainMemory for helping me out with a lot of things (such as enabling me to run multiple instances of SA2).

On the same token, let me be clear here. MainMemory did all of the reverse engineering. Without his work, this would not have been possible simply because I wouldn't even know where to start with a disassembly and the like. Not to mention the executable had encrypted data which would make it crash if you tried to attach Cheat Engine's debugger... which MainMemory also cracked. The closest thing I got to reverse engineering was finding the input structure of which MainMemory has already documented for SADX (it's pretty much the same).

And with that, I also have to thank everyone who worked on the cheat table, Sonickidnextgen who wrote the (original) socket library and helped me be less derp at programming (It's still a mess. I'LL CLEAN IT UP LATER I SWEAR!), and everyone who helped me test it. Couldn't have done it without you guys!

Input handler is a little more accurate and at the same time a little less accurate. This should also help in low-performance circumstances as it ensures one frame has passed which also pretty much ensures the buffer has been read, thus simulating the button press.

Fixed character action bug. One line of code needed to be moved up one line. Wish I noticed before the contest deadline

"Fixed" the animation bug (e.g covered it up. If it works it works!)

Probably some other stuff I forgot about.

Specials don't work very well anymore (doesn't notice you pressed the button) due to the input changes, but I'll be working on this.
This update should make it a little nicer to play if you ignore the specials (which you can disable by running the program with -nospecials, or by using sa2 pro =P).

It's more that people just don't seem to care much about this game, and even less people actually own the Steam version.

But no, this is an amazing thing you've done here and you should very much be proud of yourself! I haven't tried it myself (again, lack of people to test it with) but if it's playable at least 50% of the time (which it very much seems to be) then that's 50% better than what SEGA (or anyone else) has done.

I know it's not much feedback if I haven't even been able to try it, but I think you at least deserve the acknowledgement. Good job!

It's more that people just don't seem to care much about this game, and even less people actually own the Steam version.

I totally get that. I feel like I won the contest without anyone even testing it out though. I've been hard pressed to find anyone who has so much as run the program even if they voted on it. I definitely appreciate the support, though!

Edit: Oh, on that note, I do plan to back-port this to SADX PC, not that there's much to do in the way of multiplayer. Maybe a certain hack of MainMemory's that he should totally finish would go well with it though. WINK WINK NUDGE NUDGE

ICEknight, on 21 August 2013 - 12:50 PM, said:

I saw this and thought it was a Megaman hack with Sonic Advance sprites, now with netplay (or whatever that would mean in the GBA game).

But no, this is an amazing thing you've done here and you should very much be proud of yourself! I haven't tried it myself (again, lack of people to test it with) but if it's playable at least 50% of the time (which it very much seems to be) then that's 50% better than what SEGA (or anyone else) has done.

:-(

The Gamecube hack was playable more than 50% of the time. (Unless you're counting the BBA and Homebrew launcher requirement)

That Gamecube hack was honestly what got me to start working on this already. Well, that and the SADX PC netplay that showed up on YouTube, but that never really got anywhere. I had the idea for the longest time but never really had the motivation (nor the skill) to make something of it (and plus, SA2 wasn't on PC yet =P). When I saw that, I thought to myself that I have no more excuses if it's already been done to an extent on a Gamecube.

So I was trying this with a friend earlier. Worked pretty well, for the most part. It wasn't perfectly synched up though, my friend was always ahead of me at the start. I used the recommended 16 ms interval. I was using Hamachi to host because even though I forwarded the port from my computer, my network IP wasn't wanting to work for my friend, for some reason.

Also, the game seemed to crash, or severely desync at times, like we'd end up in different stages. We mostly did Action, but we also tried Shooting. The Time Stop seemed to sometimes not work, but other times it would.

If it's of much importance, my friend is from the UK and I'm in the US, so that might have something to do with things a bit.

The level desync is probably due to the menu in addition to missed button presses. On that note, I don't recommend doing more than one battle at a time, as that could do it too (make sure battle number isn't 3 in the battle options). Same with selecting an entire set of levels (to the very left of each level tier). Continuing the same level after completion works fine though.

The time stop thing not working also applies to all other special attacks at the moment, and that's also an input issue. My button press code is more precise but not accurate enough for it to work all the time, although I've been working to fix that. Unfortunately this also breaks the pause menu a bit, but you should still be able to restart and/or exit the level even if the pause menu doesn't sync, as the game state is synced. I recommend restarting if there's a noticeable head start for one of the players... unless it's due to latency. In which case, don't be surprised if you both "win"

Also, it should work OK with latency up to, oh I dunno, 300-500ms? Past that point will be stretching it quite a bit though. Prepare for lots of "resending reliable message" console messages =P