Skip to content

Multiplayer Support - #2

Open
shadowgamer67890 wants to merge 1 commit into
makinori:livetekfrom
shadowgamer67890:vs-player-input
Open

Multiplayer Support#2
shadowgamer67890 wants to merge 1 commit into
makinori:livetekfrom
shadowgamer67890:vs-player-input

Conversation

@shadowgamer67890

@shadowgamer67890 shadowgamer67890 commented Jul 5, 2024

Copy link
Copy Markdown

Tried to have a multiplayer match via the help of Kaeru WFC/Wiimmfi, and everything worked except for the fact that whoever was P2 wasn't able to aim, as well as their inputs instead spinning P1 from P2's POV until the incoming data rebounded P1 to where they were actually facing.

Many hours later of trying to run the original DesMuME controller lua script in a match, I managed to figure out the memory addresses of P2's aim input, so I've created a simple setting for which player the client is supposed to be inputting to by changing the address the mouse data is being sent to depending on said setting.

There are also values for P3 and P4 which I haven't been able to test in a real match without enough computers and VPNs, but watching identical memory behavior and patterns for all 4 players no matter what mode would suggest they're correct.

@makinori

makinori commented Jul 9, 2024

Copy link
Copy Markdown
Owner

Ooh awesome! This is really great. Sorry I didn't get an email for some strange reason. I can merge this in. Might need to update the hash check for the compatible game warning

@shadowgamer67890

Copy link
Copy Markdown
Author

I realized a more graceful way of handling that almost immediately after posting, which was that the values are all evenly spaced so just do some quick math instead of the hardcoded values, but I got around to playing it proper with another person and it's still not 100% there. Sometimes the control just, locks up again, which I hope it isn't but is presumably because the address moves. I'll try to do more thorough testing when I can, but up to you if you want to merge it or hold off cause it's I'd estimate 90% functional lol.

@thelabcat

Copy link
Copy Markdown

If you need more testers, we of this MPH Discord would be glad to help.

@ag-advania

ag-advania commented Jul 25, 2024

Copy link
Copy Markdown

I realized a more graceful way of handling that almost immediately after posting, which was that the values are all evenly spaced so just do some quick math instead of the hardcoded values, but I got around to playing it proper with another person and it's still not 100% there. Sometimes the control just, locks up again, which I hope it isn't but is presumably because the address moves. I'll try to do more thorough testing when I can, but up to you if you want to merge it or hold off cause it's I'd estimate 90% functional lol.

Hi,
We've tried some games and yes the AIM get randomly stuck but by pressing the "E" button the AIM work again hopefully.
I hope this information could be useful.

If you need to do some testing I'm available in the MPH Discord too "Livetek". @shadowgamer67890

@ag-advania

Copy link
Copy Markdown

@shadowgamer67890
We have found the player position based on ram address:
020DA538 00000000 host
020DA538 00000001 2nd
020DA538 00000002 3rd
020DA538 00000003 4th

Maybe you could update the code accordingly to automatically detect the player position ?

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants