• 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 places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Development: Multiplayer possibility?

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
You're basically asking if we can make the ENTIRE game co-op friendly?
As far as I can tell, that would be a no... However, there's no doubting it would be f**king awesome if we could.

However, afaik, the code for normal trainer/wild battles would completely freak out. And there's certainly NO way you could battle together.

I'm also 99% certain that most "normal" actions are illegal in the trading environment, so this is probably a no starter, sadly.

Aside: Thanks for the trading info, could be VERY useful :)
 
Last edited by a moderator:

I Am Number 3

< Learning to ASM Hack
2
Posts
12
Years
  • Seen Nov 30, 2012
Wouldn't the easiest way to see if that would work would be to test it on a ROM you have? I think that it wouldn't work as well as you except. I don't think that in Generation III there was 4 way battles between trainers (feel free to correct me if I'm wrong). But if it is in the game I think that if you did some serious hacking (like ASM) you could trick the game into thinking some computer trainers are human trainers and you could have the four way battle.

So yes, I think you both can walk around, but I don't think you two could battle together or interact a lot.
 
Last edited:

Putin

Anspruchsvolle Narr
52
Posts
13
Years
So... Like for the purpose of racing, or something? Or potentially for solving puzzles?

Also, every version of no$gba's been capable of doing this (linking smoothly that is) as long as I've been using it. I still don't get why there is such a bias toward using VBA as the end-user, though as an hacker I understand its utility, so I am sure there is something I am still missing here, but linking issues were technically resolved ages ago.
 
275
Posts
13
Years
  • Seen Oct 9, 2019
I am going to say something that is going to sound completely irrelevant at first. But it's not. Just bear with me.

Halo: Combat Evolved for the Xbox was ported to the PC by a company named Gearbox. After Halo PC's release, Gearbox released Halo Custom Edition, an expansion that allowed people to create their own maps. It came with a rudimentary map editor, which was quickly hacked, forked, and extended.

Halo maps could contain scripts, NPCs, and the like -- much like FireRed maps. However, none of these things were designed to appear in multiplayer. If you tried to play a map that used them in multiplayer, they'd desync -- horribly. You'd see players drop dead for seemingly no reason, because they were killed by an Infection Form or something on the host box (but on your computer, the NPC was on the other half of the map).

HCE mappers quickly learned something: if it wasn't meant to be used in multiplayer, it probably won't sync in multiplayer. Avoid it.

The same is true here. If it wasn't meant to sync in FR/LG's multiplayer, then it probably won't. Especially if it's random. That immediately rules out wild battles, some OW movements, egg hatching... And by virtue of the latter two, it basically rules out all OW movement (probably desyncs if an egg-hatch stops one player) and collision-checking with OWs (randomly-moving OWs desync across the games, so they could block a player in one emu but not in another).

Now, granted, someone could probably alter the game engine to make everything sync. But it'd be a huge edit. It'd be a complicated edit. Something only one of the master hackers here could do -- and perhaps even difficult for them. Depending on how the current syncing works, they may have to literally rewrite the game engine.
 

Deokishisu

Mr. Magius
990
Posts
18
Years
To reinforce the above point, already when linking, if you talk to the woman in the trade/battle rooms and force her to turn in your game, she won't in the others. The OWs on that map aren't synced, so the OWs on others would not be synced as well.

Though I don't see a huge problem with it, until your linked friend walks on top of an NPC that's standing there in your game but has moved away in theirs. We don't even know if warping will preserve the link, as you don't warp in the normal link rooms while linking.

It is a good idea though, I'm going to try it out I think, just to see what happens.
 

Deokishisu

Mr. Magius
990
Posts
18
Years
Time to post my little experiment!

What I did was edit an otherwise clean FR Rom. I added a connection to Pallet Town from the trade center room in the Pokemon Center, then proceeded to play through both files until I could trade. Linked em up, all looked normal in the trade room (except the added connection of course). I then proceeded to walk both games up into Pallet Town.

I passed into Pallet fine in both games, and they were still linked and I could still see the individual movements of each game's player. The problem was, none of the doors worked, eventually each game's movements desynched, so one player would be in front of the player's house in their game, but somewhere else according to the linked game. The desynching happened primarily when I walked up to Route 1 on one game. Wild Battles didn't work. I eventually got to the point where it desynched enough that the movement permissions were off, giving me some invisible walls. I successfully made it back to the trade room in both games and traded. Then tried again, thinking it as a "refresh" basically. Same deal.

I don't think what you're envisioning is possible on the GBA games. Maybe when we're more versed in fourth gen hacking, you can use the Underground to create your region, allowing anyone to enter and play in it with you.
 

HackChu

I need a haircut...
674
Posts
17
Years
This is most likely impossible. I tried a long time ago, linked the games up and created a map with trees and NPCs. One person would talk to the npc while at the same time the other player could talk to the same person. Basically, you can't do anything at all except battle eachother and nothing else. However if you just want to walk around for no reason, than be my guest.
 

NarutoActor

The rocks cry out to me
1,974
Posts
15
Years
I think it would be cool if we limited the co-op. Like both players are transported to one map where they can play in a series of multilayer games. Gen 5 has synched play.
 

Flowerchild

fleeting assembly
8,709
Posts
13
Years
I think it would be both possible and fun to do this. I've always believed that nothing is impossible, especially in ROM Hacking. If we could use ASM to reprogram the game to be multiplayer...Man, that would be awesome. Also, if we used ASM, it wouldn't have to have anything to do with the Link Room, or even a Pokemon Center at all. I'm gonna talk to some people who know ASM, see if this is at all possible. Because, if it is, I think we should try it, fast.
 

HackChu

I need a haircut...
674
Posts
17
Years
I think it would be both possible and fun to do this. I've always believed that nothing is impossible, especially in ROM Hacking. If we could use ASM to reprogram the game to be multiplayer...Man, that would be awesome. Also, if we used ASM, it wouldn't have to have anything to do with the Link Room, or even a Pokemon Center at all. I'm gonna talk to some people who know ASM, see if this is at all possible. Because, if it is, I think we should try it, fast.
I'm not all that saavy with ASM, but even than I still think it wouldn't be possible. The game itself would need a COMPLETE overhaul, the battle system, everything.
 

Flowerchild

fleeting assembly
8,709
Posts
13
Years
The game itself would need a COMPLETE overhaul, the battle system, everything.
I don't think so. At least not to start with. I though of an idea. So here's how it'd work:
You play normal most of the time. However, the ROM automatically links up with other people playing nearby. You don't join them, however, if you run into them in the field, you may battle, trade, chat, etc. The game would not have to be reprogrammed, it would merely require the ROM to check for other people playing nearby and automatically link with them. You will still find them in the same places that they are currently playing. so your chances of running into them are quite small, given that they can be anywhere in the region.

We can invent more about this later, but for now, I don't think it would be nearly as hard as others imagine.
 
275
Posts
13
Years
  • Seen Oct 9, 2019
I don't think so. At least not to start with. I though of an idea. So here's how it'd work:
You play normal most of the time. However, the ROM automatically links up with other people playing nearby. You don't join them, however, if you run into them in the field, you may battle, trade, chat, etc. The game would not have to be reprogrammed, it would merely require the ROM to check for other people playing nearby and automatically link with them. You will still find them in the same places that they are currently playing. so your chances of running into them are quite small, given that they can be anywhere in the region.
You're oversimplifying.

In order for the game to synchronize an action -- say, taking a step in one direction -- it must send data to all connected clients whenever that action takes place. Those clients, in turn, must be "listening" for that data and must respond to it appropriately -- say, by updating the other players' OWs on-screen -- when it is received.

This must be done for everything that is synchronized. If you need to synchronize wild battles, then the games must be coded to send, check for, and respond to data packets when they are initiated. Movement, trainer battles, random OW movements -- same thing.

Essentially, you'd literally have to hack nearly every facet of the game engine and modify them to make them sync. Failure to hack even one system -- the random movement of NPC OWs, for example -- can lead to massive desyncs in the manner I have described earlier in this thread.

And an auto-connect system like you're describing would require even more work -- constantly listening and broadcasting for additional connections, and synching several connections at a time... Having to spawn new OWs and sync new data at any moment, should a player come within range of the Wireless Adapter... All of this, as opposed to a direct one-to-one connection between two and only two players, initiated with a specific trigger (i.e. talking to an NPC to start a link) and deactivated with another specific trigger.
 

Full Metal

C(++) Developer.
810
Posts
16
Years
^ And furthermore, I believe the bandwidth for the accessory port on the GBA is tiny. Maybe 4 bytes, if I remember correctly. So you'd be re-inventing P2P.
Send Header ( 2 bytes ) "Move Change" New ( relative ) XY position ( 2 bytes )
Send Header ( 2 bytes ) "BattleReq" - trainerID ( 2 bytes )
Send Header ( 2 bytes ) "Accept" - trainerID ( 2 bytes ) #global. the one with that trainerID is listening for this after a "BattleReq" or something is sent.
Send Header ( 2 bytes ) "TradeReq" - trainerID
Send Header ( 2 bytes ) "Leave" - trainerID
Send Header ( 2 bytes ) "Enter" - OW type

trainerID is just the order in which player's entered the area.
So basically, you would still need to sync the games ( like they do in the pokecenter )
Then every 1/60th of a second, check for any headers. If there are any that apply to your game, then apply them. However, I see one problem with this: You have more than 1 person. IDK How that would work. Would one message overwrite the other? [ I still have yet to do any actual research on this ]. And in general, it would just be fairly disappointing.
 

HackChu

I need a haircut...
674
Posts
17
Years
I don't think so. At least not to start with. I though of an idea. So here's how it'd work:
You play normal most of the time. However, the ROM automatically links up with other people playing nearby. You don't join them, however, if you run into them in the field, you may battle, trade, chat, etc. The game would not have to be reprogrammed, it would merely require the ROM to check for other people playing nearby and automatically link with them. You will still find them in the same places that they are currently playing. so your chances of running into them are quite small, given that they can be anywhere in the region.

We can invent more about this later, but for now, I don't think it would be nearly as hard as others imagine.
Thing is...who would you even find near by? I'm sure that us people on this forum are really the only ones who still play these games being that they're a bit old and outdated.
 

NatureKeeper

Guest
0
Posts
8|

Nothing is impossible. You just need to know HOW-TO-DO-IT. If the multiplayer system can be repointed AND hex edited, that would be possible. The game already has data for 2v2 battles, and multiplayer movement, they can be edited to fit the requirements. However, all other things need to be synced, which would probably piss everyone off before finishing. It is brutal to do, but is possible.

TL;DR : Base Hex Editing.
 
275
Posts
13
Years
  • Seen Oct 9, 2019
So here, off the top of my head, is a few things that would need to be synchronized for multiplayer to run stably outside of the Union Room.

Wild/Trainer battles and their effect on the overworld
If Player A gets into a battle in tall grass (or with a Trainer), code will need to exist to alert Player B, so that attempts to talk to A fail appropriately ("DAVID is in a battle!"). Player B can still move around while A is battling, so when A finishes, he'll need to resync everything.

Problems can arise if B starts their own battle while A's is already in progress -- particularly if A finishes before B. In that case, A will need to resynchronize with B even though B is mid-battle.

So there are two approaches. Synchronization of overworld data can be made possible in the middle of a battle; only one player can be allowed into a battle at a time; or some sort of "cooperative Double Battle" mechanic can be coded, such that if one player enters a battle, the other is dragged in.

NPC OWs: movements and interactions
Movement of NPC OWs will have to be synched. This may mean a modification of the part of the game engine that handles OW behaviors ("Look around", "No Movement", etc.).

If Player A talks to an OW, and Player B attempts to talk either to A or to that OW, then a message will need to be shown for Player B ("They appear to be busy right now." or some equivalent). This is without taking the OW script itself into account...

If a player talks to an OW, the effects of that script -- applymovement, etc. -- must be synched. Running the exact same script for both players would not make sense, however (Player A talks to someone, and Player B suddenly gets asked if they want to buy an Egg by some random guy on the other side of the city). Some commands would also produce obvious issues with synchronization (warp, for example -- especially if it warps to a specific X/Y coordinate).

The solution would be to make some script commands sync, but not others. Things like weather can and must sync, whereas things like preparemsg can't. The effect is that of the two players, only the one that triggers the script runs the script -- and the commands themselves trigger synchronization of any relevant data. This could also have the beneficial effect of allowing both players to run scripts independently of each other but with synchronization, although if the scripts are contradictory (i.e. both changing the weather to different values) some issues could arise. That would be the kind of contradiction that the scripter could be trusted to avoid, I think.

Hidden items (as Signpost scripts)
If Player A picks up an item, should Player B still have access to that item on their overworld? Or should it vanish from both worlds, thereby granting a reward only to the first player to claim it?

If the latter, then code will need to track and sync all flags related to hidden items. The relevant flags -- and only the relevant flags, lest something that should not sync end up synching -- would need to be synchronized when their states change. This would produce problems when the two players connect: which set of flags should be propagated to both games?

Visible items (as Poke Ball OWs)
The same issue, but with the added problem that if the items' states are not synched, then a tile may end up being walkable to one player but not to the other.

...

I'll stop now before I give myself a headache. This idea may as well be impossible. The number of things that would need to be synchronized, managed, and carefully tracked is massive.
 

leews24

ha
105
Posts
12
Years
I'm not much of a rom hacker,
but wouldnt it be somewhat different if we modify the emulator(vba)
Mod the gba rom engine itself to connect not to a seperate emulator,
But a seperate server?
I mean, Gamboys can do it with a bit of a mod,
Why not the emulator?

Come to think of it, we'd might end up reconstructing the gba, instead of modding
 
Back
Top