Most likely, Mesen did not receive the corrected netplay. One of the options that would make netplay honest:
1. The host should also play with a delay
Ideally, the emulator should adjust the frame delay according to the ping between the players.
2. The frame delay for both players should be the same or differ in 1-2 frames.
This option is the most honest. The client will not receive an increased frame delay if the ping between players is 50 ms.
This method is used in Kega Fusion and supports up to 4 players. And in fact is the best and most honest version of the netplay.
Windows 7 x64 both PC. (both have router with NAT and firewall)
Battletoads and Double Dragon(I think best game for testing netplay, because many random values)
I did tested with this player Kaillera(server) with settings - LAN (1st player - 21 ms to server, 2nd player - 29 ms to server) and there is no lag at all(sometimes frameskip).
When I tested Mesen with other player - 20 ms ping, but anyway there was low delay. You can think that doesn't matter. But I did tested with this player at Retroarch(P2P) after. And It was ideally netplay without any lag or frameskip.
I did corrected test. Now 0,1 delay with 20ms ping and 0,5-1s with 50ms ping. Looks like a 3 and 10 not frames really.
PS KegaFusion have similar logic and there is no problem.
feos wrote:
Mesen has been tested and it has an increasing lag.
If it does, it's probably only because of this:
https://github.com/SourMesen/Mesen/blob/master/Core/GameClientConnection.cpp#L152
The netplay gradually increases the buffer's size whenever it becomes empty (typically because of network lag), but never tries decreasing it again (it probably should). When/if it reaches 10, that's typically at least 10 frames of lag, which is pretty noticeable.
I haven't really looked at the netplay code much in the last couple of years, so it could definitely be improved.
Even 3 frames is too much (tested with 100 mbps and 47ms ping). When I set delay frames to 3 from 0, then no lag for client, but random buttons on lag.
Netplay comparing(Subjective test):
1. Mednafen
type: client-server-client
system: nes, smd, psx etc
+: savestates online
up to 8 players(or more?)
take/swap control between players
you can host your own server
low latency
reconnect
-: drop fps even if you have good connect
server does saves a pressed buttons of gamepad on frameskip (looks like a random buttons on lag)
if one player have good internet and other have poor internet, it's not playable for second player(massive lag)
savestates doesnt present on all systems(example snes)
Summary: probably best emulator for online playing with 2+ players, but if you have good internet
2. Kaillera(nestopia, mame, gens etc)
type: p2p,client-server-client
system: nes, arcade etc
+: up to 4 players(or more?) in server mode
lobby (server mode)
you can host your own server(dont really needed, optional)
individual frame latency
-: no reconnection
no savestates
freeze on lag even if good internet
desync(extremely rare, but...)
Summary: if you have poor internet, it's probably best solution for you.
3. KegaFusion
type: p2p
system: MD, SCD, SMS, GG etc
+: up to 4 players
swap control until start
no lags at all (but look first negative point)
-: frame latency for every player based on maximum ping of player(but still playable with 150 ms ping)
no reconnection
no savestates
desync(extremely rare, but...)
Summary: best Sega emulator for netplay, but without savestates...
4. Mesen
type: p2p
system: nes
+: savestates online
reconnect(really not tested, but based on previous point)
no lags (but look first negative point)
-: frame latency very high for client even if both players have good internet(not playable)
Summary: ~0,1s delay with 40ms ping until 1s(!!!) with 100+ms ping?
5. RetroArch
type: p2p
system: libretro =)
+: savestates online
reconnect(really not tested, but based on previous point)
-: desync without check frames
with check frames some platforms unplayable(or laggy)
stateless mode is terrible even with 100mbps and 10 ms ping(?!)
Summary: unstable netplay with reconnection and savestates. Playable only with perfect internet.
PS Any P2P netplay worse than server netplay,
PSS What about Open Kaillera? Will anyone add savestates to this project?