Posts for doomday45

Experienced Forum User
Joined: 5/16/2017
Posts: 4
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.
Experienced Forum User
Joined: 5/16/2017
Posts: 4
Sour wrote:
I did a few tests using clumsy: https://github.com/jagt/clumsy With my ping set to 20ms, I get around 30-40ms of delay. A ping of 100ms, gives about 160ms of delay. A ping of 500ms, gives ~650ms of delay. These are pretty much what I would expect the numbers to be: 500ms of ping + 10 frames of buffer means ~660ms in theory. The 3/10 buffer size values are not exactly a number of frames, but rather (in the case of standard controllers) the number of times the controller data is refreshed. In the majority of games this happens once per frame, though. What game(s) are you testing with? What OS are you testing with? If it's Linux, the network socket code for Linux hasn't been tested much, so it might have more issues than the Windows version.
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.
Experienced Forum User
Joined: 5/16/2017
Posts: 4
Sour wrote:
doomday45 wrote:
-: 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?
This sounds like a bug in the netplay logic more than anything else. I've played several hours' worth of time with my brother via netplay in the past, and it was definitely very playable for both of us. I've also gotten feedback from other users via email that they used the netplay feature to play with friends, too. So it may not work perfectly in all scenarios, but definitely some. Like I said though, it could most likely be improved - it just hasn't been my focus. The problem is that developing network code that is highly sensible to latency on my own (e.g on a single computer) is relatively complex to test/debug.
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.
Experienced Forum User
Joined: 5/16/2017
Posts: 4
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?