Sonic and Sega Retro Message Board: Sonic Adventure 2: Battle Network - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
    Locked
    Locked Forum

Sonic Adventure 2: Battle Network Online Multiplayer for Sonic Adventure 2 PC! (v3.2, 04/30/2016)

#16 User is offline Neo 

Posted 26 August 2013 - 01:11 AM

  • Clackerjack
  • Posts: 1185
  • Joined: 10-December 04
  • Gender:Male
  • Location:Portugal
  • Wiki edits:1
Problem might be that the program is asking for a update interval in milliseconds and your braindead friend is typing in "client"!

#17 User is offline Morph 

Posted 26 August 2013 - 01:42 AM

  • AKA SonicFreak94.
  • Posts: 697
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Yeah uh, it says what it's asking for, and "client" and "server" are not what it's asking for in those screenshots as it clearly says in the console. Of course that's no excuse for it to spam the console window with nonsense and I should totally fix that, but still!

#18 User is offline Hitlersaurus Christ 

Posted 26 August 2013 - 07:41 AM

  • fuck
  • Posts: 189
  • Joined: 27-August 10
  • Gender:Male
  • Location:THE FUTURE
  • Project:John Madden: Ghost Slayer
I saw this thread and got super excited to make fun of someone's Megaman fan character texture hack of SA2, only to be disappointed that it's actually something really neat.

#19 User is offline Shade Vortex 

Posted 27 August 2013 - 12:43 PM

  • The Black Vortex
  • Posts: 447
  • Joined: 11-September 10
  • Gender:Male
  • Location:USA, WA.
  • Project:Twitch Streams
Posted Image
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.)
This post has been edited by Shade Vortex: 27 August 2013 - 12:44 PM

#20 User is offline Morph 

Posted 27 August 2013 - 02:17 PM

  • AKA SonicFreak94.
  • Posts: 697
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
That's a known issue. Sometimes when returning to the menu form a stage, the stage number stays stuck at whatever stage you were playing, so my program tries to correct this. I use the stage number and check if it's changed to determine when the right time is to check the player objects again. If I don't try to correct it and you go to the same level, it won't re-evaluate the player objects and will probably crash the game because it's writing to the wrong area in memory.

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 :v:

#21 User is offline flarn2006 

Posted 07 September 2013 - 11:01 PM

  • Posts: 246
  • Joined: 01-October 05
  • Gender:Not Telling
  • Project:SA2 Cheat Table
  • Wiki edits:19

View PostLanzer, on 26 August 2013 - 01:02 AM, said:

So I got a friend with a problem with this mod:

-snip-

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.
This post has been edited by flarn2006: 07 September 2013 - 11:01 PM

#22 User is offline Morph 

Posted 26 September 2013 - 02:45 AM

  • AKA SonicFreak94.
  • Posts: 697
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Quick status update!

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

#23 User is offline Morph 

Posted 24 October 2013 - 04:55 AM

  • AKA SonicFreak94.
  • Posts: 697
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
https://www.youtube....h?v=p73Ht0xsIBw

Quote

I'm trying to do away with the "update interval" that exists in the current release and rely more on the frame count. It's much more accurate, which is what this video is demonstrating.

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? :v:

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.
This post has been edited by Morph: 24 October 2013 - 07:12 AM

#24 User is offline Morph 

Posted 16 November 2013 - 07:52 PM

  • AKA SonicFreak94.
  • Posts: 697
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Alright, I've uploaded the latest version. It is now version 2. Here's some of the major changes:

  • 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.

Download here.

#25 User is offline Retroman 

Posted 17 November 2013 - 04:31 PM

  • Posts: 593
  • Joined: 18-September 09
  • Gender:Male
This is an awesome thing you are doing, and I support you!

#26 User is offline Lanzer 

Posted 17 November 2013 - 10:42 PM

  • The saber calls for its master...
  • Posts: 6587
  • Joined: 27-February 09
  • Gender:Male
  • Location:Glendale, AZ
  • Project:Doing Stuff.
  • Wiki edits:1
Sweet! v2 is out!! can't wait to try. thanks man for all the hard work. :)

#27 User is offline Shade Vortex 

Posted 20 November 2013 - 12:47 PM

  • The Black Vortex
  • Posts: 447
  • Joined: 11-September 10
  • Gender:Male
  • Location:USA, WA.
  • Project:Twitch Streams
When I try to host a server, it just says "Connecting to server at (my ip address) on port (myport) forever, and the same goes for my friend who tries to connect to my IP/port when I try to host the server. Am I doing it wrong or something? I launch SA2BN first, type server, hit enter, enter my port number, hit enter, then launch the game. I've tried having the game launched first, too, but the same thing happened.

#28 User is offline Hukos 

Posted 20 November 2013 - 04:53 PM

  • Posts: 457
  • Joined: 11-May 12
  • Gender:Male
All I have to say is that I'm sad that I can't contribute to this great project, but this is a really awesome thing here and I hope it succeeds.

#29 User is offline Morph 

Posted 20 November 2013 - 07:33 PM

  • AKA SonicFreak94.
  • Posts: 697
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11

View PostShade Vortex, on 20 November 2013 - 12:47 PM, said:

When I try to host a server, it just says "Connecting to server at (my ip address) on port (myport) forever, and the same goes for my friend who tries to connect to my IP/port when I try to host the server. Am I doing it wrong or something? I launch SA2BN first, type server, hit enter, enter my port number, hit enter, then launch the game. I've tried having the game launched first, too, but the same thing happened.


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.
This post has been edited by Morph: 20 November 2013 - 08:23 PM

#30 User is offline Morph 

Posted 30 January 2014 - 10:51 PM

  • AKA SonicFreak94.
  • Posts: 697
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Woohoo, update!

  • 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

This post has been edited by Morph: 29 November 2014 - 06:31 AM

  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users