Sonic Adventure 2: Battle Network Online Multiplayer for Sonic Adventure 2 PC! (v3.2, 04/30/2016)
Posted 26 August 2013 - 01:42 AM
Posted 27 August 2013 - 12:43 PM
Help. I don't know how to computer.
(This happened when I went against your advice and did multiple stage selections. I chose City Escape after we finished with Pyramid Race and on my screen, Sonic disappeared and only his board was there, left unmoving. For my friend though, the game crashed with the above happening... He was suddenly in the Chao World lobby, with my chosen character right beside him. He was Sonic and I was Shadow. For what it's worth, we originally did the Downtown Race and switched to Pyramid Race and that worked fine.)
Posted 27 August 2013 - 02:17 PM
If anyone has any suggestions for alternative methods to re-evaluate the player objects, let me know; otherwise I'll have to try fixing the current system
Posted 07 September 2013 - 11:01 PM
Then the command line freaks out. I know it has to be me doing something wrong rather than just the executable itself not working right.
So, have any idea what the problem is Morph?
I've seen bugs like that before, typically triggered by invalid input, which appears to be the case here. It probably has to do with a while loop that's supposed to ask you to try again if the input is invalid.
Posted 26 September 2013 - 02:45 AM
I'm currently in the process of restructuring the program to make it easier for me to work with in the long run which may or may not lead to this becoming a "mod" (for MainMemory's SA2 Mod Loader). In fact, once I'm done, I could make this run both stand-alone and as a mod. Running it as a mod will allow me to do more advanced things much more easily though, so that's a thing.
This will probably take a few days (if I don't procrastinate for like a month again), and I probably won't upload a new build simply because it will effectively function the same as it does now. That is of course, unless I do implement something new, such as synchronized program settings (e.g disable specials). Either way, it'll just make it easier for me to expand later... at which point, I will be uploading new builds =P
Posted 24 October 2013 - 04:55 AM
The reason I'm spamming the special attacks is because they're very picky. They hardly ever work, but after a small change they almost always works. I won't be satisfied until it simply always works, though. By using the frame count, I can synchronize my program as closely as possible with the game's framerate by checking when the frame count has increased.
Eventually, it will also be available as a "mod" using MainMemory's SA2 Mod Loader, which will give me better access to the game's inner-workings. But I'm going to try tackling this first... mostly because it's fun.
Wish me luck!
Edit: And of course JUST AFTER I say something about it, I fix it entirely. That's just like me though, isn't it?
By the way, swapped spawn points won't function correctly if you're using MainMemory's character select mod. If it bothers you, just disable the mod. Everything else is fine, though.
Posted 16 November 2013 - 07:52 PM
- The update interval has been removed, since I'm no longer waiting 16ms and hoping the timing will work out just right. As a result, it has been replaced with...
- Frame synchronization. The program synchronizes itself with the framerate to ensure things are applied properly in-game.
- Input is now significantly more reliable as a result, which means specials now work more reliably. Details on this below--it's not perfect.
- The 2P main menu and stage selection are now synchronized. Less chance of mishaps, and now you can also use your analog. The battle options menu isn't synchronized, but the settings themselves are. I'll do that later for sure, though.
- Fixed an annoying bug where if SA2 is started and the program hooks into it too quickly, it would disable the 2P input structure before it exists, locking you out of the 2P menu. (The game doesn't think that player 2's "controller" is "plugged in")
- The reliable message system has been changed to actually work. I once again question how it even worked at all. Sonickidnextgen, who wrote the socket library, got impatient with me because he just wanted to play SA2, fixed it up. It was pretty simple, I was just procrastinating like I usually do.
- Probably some other things I forgot about. Obligatory "general stability and performance improvements", etc.
On the note of the specials, they will work just fine as long as you don't do anything crazy. For example, make sure you're not spazzing out and flinging your analog all over the place, because the result won't be identical on the other client. And if it's not identical, there's a chance that the character wasn't in a state where the special was usable (eg skidding), thus wasting it and desynchronizing things a bit.
tl;dr: It's best to make sure you're not too close to rings (so the lightdash doesn't trigger and break everything), you're running straight in one direction, or not moving to ensure that the specials go through properly.
Posted 20 November 2013 - 12:47 PM
Posted 20 November 2013 - 07:33 PM
I could have messed something up. In fact, there's a very high chance I did. Frankly, I rarely test the step-by-step stuff, as I just use command line for debugging.
Actually, try using command line yourself and see if it helps. The details are on the first post; you can make a .bat file, create a shortcut, or even just open a command prompt and cd to the directory the executable is in.
Edit: Yup, I broke it. It says "Connecting to server at on port <port>". I'll get right on that. For now, command line should suffice.
Edit: Aaand fixed. Version 2.1 now.
Posted 30 January 2014 - 10:51 PM
- The program now checks version numbers between server and client to ensure they are the same in order to avoid shenanigans.
- The program now actively checks if SA2 is running. If it ever crashes, it disconnects you and the client from each other to ensure shenanigans don't occur... if it manages to detect that it crashed, that is. It doesn't always work.
- Added teleport functionality for testing reasons which teleports you to the other player. Button combo: Y + D-Pad Up
- Fixed a bug with the reliable packet handler AGAIN where it would only send the first byte of a message and cause the program to be very good at counting IDs. (1, 2, 3, 4, 5, 4294967295, 6, 8?!)
- Send all menu related variables within the first 5 seconds of connection time in case a connection was re-initialized while deep within the 2P menu. There are some other weird issues to go along with this though, so I don't recommend it.
- In-game time is now synchronized every second with the client by the server. You can now safely play without disabling the time limit.
- Battle options menu selection is now synchronized.
- Always synchronize menu selections when a new menu is entered
- Re-wrote command line handler. Details below.
- Fixed Mech HP synchronization, which was evidently broken. Actually trying to play in shooting mode still sucks, though.
- Properly synchronize upgrades and powerups. (Powerups would always send what you had last, not currently; fixed now)
- Time Stop is now properly synchronized.
- Added a keepalive system, so if the other player's client crashed or is exited, yours will disconnect after the default of 15 seconds. This can be overridden with the command line argument --timeout or -t, followed by the timeout in milliseconds (minimum 1000).
- Pause menu selection synchronized.
The new command line stuff has been written in such a way that you can actually use it in addition to the console input. This way, you can run the program with, for example, --keep-active, and it will then actually ask you if you're hosting or connecting, for the ip/port, etc. If you use command line primarily and you miss an option, it'll ask you for the missing options in the console as well.
As a side note, if your console for whatever reason flashes red and beeps at you, pause the game, don't press anything, and try to snap a screenshot of it and post it here. It'll say something about a "SCREWYOU" message. (Annoying bugs)
Download here. The version number is now 2.5.
Edit: Small oversight. Running the executable with just --no-specials doesn't actually work because I derped while checking the count of arguments. Just do something like "--no-specials plz", as long as there's more than one argument, and it'll work fine.
Also behold the power of the money snake.
Edit: fixed money snake