Netplay

Discuss miscellaneous N64-related matter here.
Post Reply
User avatar
MarathonMan
Site Admin
Posts: 691
Joined: Fri Oct 04, 2013 4:49 pm

Netplay

Post by MarathonMan » Wed Nov 20, 2013 1:40 pm

I got to thinking today... because of CEN64's design, synchronized netplay is totally possible. :D

Basically, one user runs a server and sends out frame/audio data to all the clients (you could even use UDP for this, instead of TCP). P2/3/4 simply send their input presses back to the server, who is listening on a socket. P2/3/4 could even be on a low-end server, and essentially "stream" the game from P1, who has a high-end server. All P2/3/4 do is provide input.

The only downside to this approach is that P1 has an advantage over a high-latency network because P2/3/4 will essentially experience some input lag that is proportional to the network latency/bandwidth. However, their input will remain perfectly in sync.

User avatar
juef
Posts: 31
Joined: Sun Oct 27, 2013 10:19 pm

Re: Netplay

Post by juef » Wed Nov 20, 2013 2:23 pm

Interesting...! Has this approach ever been used in another emulator before? As you said, players would obviously require a good network connection, but otherwise only P1 would require a truly fast computer (unless scaling / filtering is implemented at some point in the future).

Color me excited! :D

User avatar
Iconoclast
Posts: 47
Joined: Fri Oct 04, 2013 8:00 pm

Re: Netplay

Post by Iconoclast » Wed Nov 20, 2013 7:36 pm

I'd be more excited if any of it meant it was possible to use the program on my SSE2 machine. =P

But that's besides the topic, anyway. I guess some fragmented re-compiler section would be needed to shuffle optimally in SSE2.

It's about time we had a multi-OS emulator that can play N64 online, regardless.
Currently I am not sure there is one....

User avatar
Patashu
Posts: 14
Joined: Sun Oct 27, 2013 5:49 pm

Re: Netplay

Post by Patashu » Wed Nov 20, 2013 7:39 pm

I was imagining an ideal netplay emulator in my head a few days back. No idea how well this would work:

0) Both players are constantly recording an input file and periodically make savestates to resume from, TAS style
1) Input made by one player is sent to the other person, not only what the input was, but what frame it was done on
2) When one player receives input from the other, it gets inserted retroactively into the input file on the correct frames, a savestate prior to the earliest new input is loaded and the game is re-emulated up to the present point - this would essentially be 'lagless' netplay

It would probably be easiest to test on a NES emulator optimized for speed or something, with how computer intensive CEN64 is going to be I think this is years off :P

User avatar
The Extremist
Posts: 29
Joined: Sun Nov 03, 2013 6:11 pm
Location: Canadian Prairie

Re: Netplay

Post by The Extremist » Thu Nov 21, 2013 4:37 am

I'm glad this discussion is happening. I'd love to see console-accurate online play! :D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest