• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Research: Revisiting Multiplayer Capabilities

U.Flame

Maker of Short Games
1,326
Posts
15
Years
Anyone remember the multiplayer project I mentioned a while back? The one where I plan to expand 3rd gen's multiplayer capibilities and make s fun plaza?...anyone?...yeah whatever. So! Last time I posted my findings based on memory alone, now I have fresh results! Since I'm finally able to hack again, and getting the hang of scripting, I'm able to start the project anew! I'm going to be tested many functions in multiplayer mode to see what works and what doesn't. Anyone interested in experimenting or suggestions go ahead and post here. Here's what I've tested so far:

Oh, one more thing. I'm going to mention desyncing often. I'm not talking about link errors, desyncing means both screens show different things, usually different player movement. It's commonly caused by an external event either pausing or moving one player while the other screen doesn't show it.

HMs: nonfunctional. Details:
Spoiler:


Water: nonfunctional. Players will walk on water and even waterfalls without the push effect.

Battles: semifunctional. Details here:
Spoiler:


Trade: semifunctional. NPC trading works fine, player trading does not start.

Berries: functional. They will show up differently on each screen if one person picked and another didn't, but it isn't a major desync issue.

Secret Bases: nonfunctional. Can't be entered.

Warps: nonfunctional, not even map connections. Scripted warps work but it may cut off connection.

Signpost events: nonfunctional. Their offsets can be applied to person events however.

Person events: semifunctional. The person events themselves are capable of working, but like scripting, there may be some events that can't function. Random movement can cause desyncing, so it's best they stay still.

Scripting: semifunctional. Script events can work, but there are many limitations. This needs further experimentation. Details here:
Spoiler:


Shopping: functional. Shopkeepers may randomly look up, and when browsing, every person looks down, but it works .

Weather: functional. Simple enough.

Day Care: functional. No problems as far as I can see

Key items: nonfunctional. None can be activated. Maybe some can be forced through scripts or something. Meanwhile, no bikes. :(

Finding items: semifunctional. Visible Pokeball items can be picked up, but won't go away.

Contests: semifunctional. Like berry blending, precise simultaneous activation is needed. Afterwards, the connection may be cut.

Slots and Roulette: functional. No errors here. Their offsets simply have to be applied to person events.

So there's still so much more to test, especially since scripts work. I'll update when I have more results. Keep in mind there may be multiple ways to approach things, especially with scripts, so don't think anything I couldn't get to work is hopeless yet.
 
Last edited:

Touched

Resident ASMAGICIAN
625
Posts
9
Years
  • Age 122
  • Seen Feb 1, 2018
You would need to hook into many different functions in order to implement these features - not a simple task (also very time consuming). Additionally, it's difficult to debug linking stuff as pausing execution during linking would probably crash or cause the linking to fail in any emulator.

It probably would help if you could fix any of those features that you say are broken or only semi-functional. That way we'd know how feasible this is to do on a large scale.
 

U.Flame

Maker of Short Games
1,326
Posts
15
Years
That's why I wanted to create a team. When that didn't happen, I scaled down my goal and expectations. The purpose of these experiments is to take what's usable and make multiplayer fun. Even as it is right now it's already better than the default tiny rooms.
 

U.Flame

Maker of Short Games
1,326
Posts
15
Years
Intresting research I must say I wanted to make something like this months ago xD whatever good luck!
Thanks! If you have any ideas on anything in Ruby/Sapphire that you want tested in multiplayer, let me know. I need to try everything possible.

I myself did some research and found that scripted wild pokemon battles are also semifunctional.
Right, the main problem is the desyncing afterwards. The only solution I can think of st the moment is to make every other player freeze while someone battles or participates in any kind of potential desync activity.
 

U.Flame

Maker of Short Games
1,326
Posts
15
Years
Is there any certain flag which is set when we enter the room which will prevent items use?

Good idea. Maybe the script can be dissected and touched up. I'm not able to do so yet, but maybe in the future. Or hopefully a real scripter can look into it. I've wondered the same thing with player battling and trading.
 

Touched

Resident ASMAGICIAN
625
Posts
9
Years
  • Age 122
  • Seen Feb 1, 2018
Is this research for Ruby? Most of the research done is for FireRed, with porting to Emerald only. Ruby's engine is a mess, thus many avoid it. If you wish for help with ASM, you should at least do this on Emerald.

Also, Game Freak didn't sync everything. Faceplayer and stuff didn't synchronise completely. Again, for this to work, you'd have to hook into a variety of functions.

You should document how you got linking working: What emulator you used and version, etc. I am unable to get wireless adapter functionality working, but cable trade/battle works perfectly.
 

U.Flame

Maker of Short Games
1,326
Posts
15
Years
Is this research for Ruby? Most of the research done is for FireRed, with porting to Emerald only. Ruby's engine is a mess, thus many avoid it. If you wish for help with ASM, you should at least do this on Emerald.

Also, Game Freak didn't sync everything. Faceplayer and stuff didn't synchronise completely. Again, for this to work, you'd have to hook into a variety of functions.

You should document how you got linking working: What emulator you used and version, etc. I am unable to get wireless adapter functionality working, but cable trade/battle works perfectly.

Good point. When I first started this many years ago, most hackers used Ruby while Emerald was barely touched. So I just kinda stuck with it. I guess I should shift my priorities now that Emerald is better. Still, I plan to experiment with every 3rd gen game some time.

At the moment, I'm using VBA Link. I don't remember the version, I just googled it.
 
Last edited:

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
Good point. When I first started this many years ago, most hackers used Ruby while Emerald was barely touched. So I just kinda stuck with it. I guess I should shift my priorities now that Emerald is better. Still, I plan to experiment with every 3rd gen game some time.

At the moment, I'm using VBA Link. I don't remember the version, I just googled it.

It might also be worthwhile to test the differences between versions. Fire Red and Emerald might be more complete or even less complete due to the changes made for wireless adapters (ie multiple people in one room, up to 32 iirc). I'm definitely interested though, because this could be very interesting to do. However, I wonder what the best solutions would be for something like events (ie old man event). Modifications might have to be made in order to properly present things. Perhaps a sort of setting so that the game can be told not to send certain NPCs over wireless? That way you could have the old man be client side so the most that could happen would be people walking past the old man. Definitely on board with this idea though, it could be very interesting to try. I'd also like to try it on actual hardware as well, since I have access to a flash cartridge (although I'd need another one to be the second client, so that might be a problem).
 

Deokishisu

Mr. Magius
989
Posts
18
Years
It might also be worthwhile to test the differences between versions. Fire Red and Emerald might be more complete or even less complete due to the changes made for wireless adapters (ie multiple people in one room, up to 32 iirc). I'm definitely interested though, because this could be very interesting to do. However, I wonder what the best solutions would be for something like events (ie old man event). Modifications might have to be made in order to properly present things. Perhaps a sort of setting so that the game can be told not to send certain NPCs over wireless? That way you could have the old man be client side so the most that could happen would be people walking past the old man. Definitely on board with this idea though, it could be very interesting to try. I'd also like to try it on actual hardware as well, since I have access to a flash cartridge (although I'd need another one to be the second client, so that might be a problem).

So person events, script tiles, all of that would be handled client-side, basically making it so that you're playing single player but your friend might walk by occasionally? I think that that is the best solution, honestly. Focusing on getting that to work without desynching should be the goal, and then additional interaction players can do with each other should be next on the list. I think the first order of business is to not forcestop the game with an error screen when a disconnect happens, as players could lose significant progress if they haven't saved in a while. That's why the link rooms force you to save beforehand.

EDIT: Also, the "32 people in a room" thing isn't actually people walking around. Those are just basically NPCs the player uses as an interface to "page" the player of the other game to ask them to do something. There's no interaction in the Union Room itself, just jumps to the trade and battle screens in the other rooms. It's essentially the lite version of linking.
 

U.Flame

Maker of Short Games
1,326
Posts
15
Years
It might also be worthwhile to test the differences between versions. Fire Red and Emerald might be more complete or even less complete due to the changes made for wireless adapters (ie multiple people in one room, up to 32 iirc). I'm definitely interested though, because this could be very interesting to do. However, I wonder what the best solutions would be for something like events (ie old man event). Modifications might have to be made in order to properly present things. Perhaps a sort of setting so that the game can be told not to send certain NPCs over wireless? That way you could have the old man be client side so the most that could happen would be people walking past the old man. Definitely on board with this idea though, it could be very interesting to try. I'd also like to try it on actual hardware as well, since I have access to a flash cartridge (although I'd need another one to be the second client, so that might be a problem).

I'm honored in your interest. Seriously there were no posts the last three attempts. Yea, I'm going to cover every version once I define a suitable list of things to test on each one. Currently I'm using the Mixing Records chamber to connect to multiplayer. If there's ever a way to create what's essentially a co-op mode, I'd have reached my unrealistic dream for the project. Since warps and map connections normally won't work, I scaled down those hopes. But if advanced and experienced people working on it, maybe it isn't so unrealistic.
 
Last edited:

Touched

Resident ASMAGICIAN
625
Posts
9
Years
  • Age 122
  • Seen Feb 1, 2018
I too am interested in this, so here are a couple of suggestions: You should specify exactly what you mean by functional, sem-functional, and non-functional. Do map connections cut off connections, or can you simply not move into the adjacent map? When linking, it appears that the tradional map loadering hook is replaced with another one, tailored for that map of connection. This could be a reason why these connections do not work.

However, due to the fact that there are no working emulators with a linker/debugger combo, we can't do much besides static analysis in IDA. So, our first port of call should be to write an emulator that can do such a thing. Additionally, I spied some assertions and debug logging features that were disabled (the logging function's internals were commented out). We could definitely hook into these with some asmagix.

My second suggestion is that you should dissect the scripts that are responsible for linking. Try to see what specials are used, what specials are essential for linking to work, etc. I suspect that many of the pre-linking checks are in those scripts, and can be removed. It would also be helpful if you posted a patch of your work so that others can test without having to repeat the set up of all of this.

The "NPC state" of the player is clearly copied between games, and I'm wondering how feasible it would be to copy the 15 others across, which would allow syncing over other NPCs. This would be important for NPCs who move around, so that they don't overlap with players etc. If we could find an unused bit in this state, we could also create a thing which says "This person is busy" if another player is talking to them.

If we extend the emulator, we unlock a whole set of potential features. We could do Nintendo Style mystery gift events for certain hacks, etc. So I think this is the most important step. VBA link/VBA-M runs off out-dated networking code, and is in dire need of an update.
 

U.Flame

Maker of Short Games
1,326
Posts
15
Years
Alrighty. Here's what I have so far. As I said, I replaced the Mixing Records room with the plaza. It contains a nurse with the script of the old woman that gives you a rest for healing purposes, a shop, gambling games at the base of the fountains, coin exchange and prize people, the day care couple, the berry master, four berry/soil patches, a berry mixer with the sprite of a lump of soil, the contest woman, and a Latias/Latios encounter based on player gender. I believe I also placed a warp in Littleroot that goes to Mauville as a shortcut. There may also be a couple of NPCs or hidden items I placed around Littleroot or Mauville for testing outside of multiplayer that I haven't removed yet.

To clarify, map connections are cut off in multiplayer, it acts like there aren't any to begin with. I'll get to dissecting the entrance scripts later, last time I attempted something like that ended in disaster. But it's on my to-do list.

Currently. I'm switching to Emerald, so I'll re-test most of the basic stuff and post my findings soon.
 
Back
Top