![]() The basic idea is to delay inputs a bit on all sides to counter network lag.Įach input frame sent by a mirror host is given a frame count, which lets mirror clients make sure to apply that frame at the exact same time as their host, thus ensuring all sides are given the exact same inputs. Similarly, player 2's instance 2 and player 3's instance 3 are also mirror hosts.Īs is typical with netplay implementations, inputs are delayed by a fixed amount, which is hardcoded to 4 frames in the current test branch, but will be configurable in the final product. Then player 1's instance 1 acts as a mirror host: players 2 and 3's instance 1, the mirror clients, connect to it, and receive their input from it, thus mirroring player 1's input on players 2 and 3's machines. The game host transmits useful information to the game clients, tells them when to start running. So first, we're going to name them.Īssuming player 1 is the player who initiated the game: player 1's instance 1 acts as the game host, while player 2's instance 2 and player 3's instance 3 act as game clients. Implementing this proves to be tricky, because since each individual instance there is its own process, there's a lot of moving parts. ![]() If you remember the graph from the previous post: Oh, the fun that is dealing with synchronization. I've been building the basic network infrastructure for netplay lately. If you're running into trouble: Howto/FAQ (WIP) Wifi: local multiplayer, online connectivity.Various display position/sizing/rotation modes.Nearly complete core (CPU, video, audio.While it is still a work in progress, it has a pretty solid set of features: MelonDS aims at providing fast and accurate Nintendo DS emulation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |