Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[New Feature] Add network multiplayer
#1
I'd like to implement multiplayer communication over IP,
could this be feasible?

Should it be server based with a central server that broadcasts the frames to every client,
or just point to point?

The current local SIO emulation is somehow limited with respect to the possibilities of multiplayer over internet.
Reply

#2
I'm already planning to implement this, but trust me, it's way harder than it seems due to the tight timing constraints of SIO communication.

The plan involved serializing inputs and savestates across the network instead of individual SIO packets, and running the emulation loop in full on each computer. However, this will require a bunch of internal knowledge to get up and running so it's not a great newbie project. I can try to help, but...it's difficult, which is why I haven't done it yet myself.
Reply

#3
Ok, directly porting the protocol on internet is a no-go,
but maybe we can do something to avoid the problem of the strict time window.
We could replace the original GBA protocol and instead of exchanging frames in the same window,
just exchange them in an asynchronous way and send the correct interrupts every time we receive a new
message from one of the clients.

Your idea of replicating the multiplayer is very interesting but seems very hard to implement to me,
but maybe because I have very little knowledge of the gba emulation internals.

I've looked a bit into the source code of VBA Link which actually implements the LAN multiplayer,
and they seem to use a server-client architecture, every client, instead of waiting for their turn, directly send
their 16bit word to the server, which once enough frames are collected, sends them as a whole packet to the clients.

Is this manageable in your opinion?
Reply

#4
As cool as that sounds, it doesn't sound realistic. All you should need to do is emulate whatever serial protocol that was used by the original GBA over the wire (but send over wifi or Bluetooth). Did Gameboy Advance send video frames and full gamestate over its basic serial interface? Or just basic commands and user state? Your idea sounds awesome but wouldn't emulate the original interface that the games were designed for.

The VBA approach is close to dead on, it just needs to utilise a network stack designed for peer to peer because the TCP route is not the way to go. Multiplayer is my main interest when comparing emulators. Its specifically what i was investigation[ when I found mGBA. mGBA's approach is very low level. It just needs a network interface designed to emulate 'link'.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 Melroy van den Berg.