PaulsCode Forum

Mupen64Plus AE => General Discussion => Topic started by: Paul on August 29, 2017, 08:31:21 AM

Title: N64 gaming over the internet
Post by: Paul on August 29, 2017, 08:31:21 AM
I have been toying around with an idea for a while.  While in practice it may not be feasible (from a speed perspective), it is an interesting question.

The basic idea would be a "core" library which merely does networking.  It would hook up to normal audio, video, and rsp plugins, but would not actually be emulating the core or have a copy of the game ROM.  This library would run on a "client" device.

Then there would be an extension of a normal core library that would run on a "server" device and transmit state information to the client.

The question is whether or not it would be legal to use a system like this for users (on the "server" device) who legally own a ROM to plan games over the network with another user (on the "client" device) who does not own the game.

Obviously nobody here is a lawyer, just thought it would be an interesting topic to discuss.  Probably not even feasible (perhaps more realistic on an emulator for a lower-spec device like the NES).
Title: Re: N64 gaming over the internet
Post by: fzurita on August 29, 2017, 08:54:13 PM
Ignoring the legality of it, I think the idea is feasible. Before the server makes a plugin API call on the client, it will have to transfer RDRAM and register state to the client. The server will already have the results of the plugin API calls on the client because the results should be identical to the server.

The only thing that the server will have to get from the client is controller state.

The ROM wouldn't have to be transferred to the client, only RDRAM and register contents before each API call. At least I think, I'm not aware of any plugins accessing game ROM directly, I believe only the core does that.

I think the hard part would be only transferring the changed portions of RDRAM and not the entire RDRAM before each API call. The core would have to intercept all writes to RDRAM and send those as updates. There is already sort of a mechanism for this in the core called FBInfo but it's not implemented for the new dynarec, only the old.
Title: Re: N64 gaming over the internet
Post by: fzurita on August 29, 2017, 09:05:16 PM
On the topic of legality (I'm not a lawyer). This would seem legal to me since no copy righted data is transferred. The only state that is transferred, is an algorithm's interpretation of copy righted data. This algorithm is some one's interpretation a to how a N64 should work, so any state produced by this algorithm is derived work.

I think this reasoning could even be applied to textures and models since how they look in the screen is all state information that was produced by an algorithm's interpretation of data.
Title: Re: N64 gaming over the internet
Post by: loganmc10 on August 29, 2017, 09:17:54 PM
I don't know why you'd have to transfer the RDRAM contents or anything. The only thing that makes a difference in the gameplay is the input. As long as you keep the input in sync, you know the rest of the game will play identically. There is no randomness in the emulated code.

It seems to me that you can just have each player send their input to a server, then you have the server send back to each client the inputs it received for that frame, and each client uses those inputs received from the server for the game.

The issue I guess is keeping the 2 games in sync, I guess you'd have to pause one of the players if their game got ahead or something.

Anyway I don't have any real experience in netplay, it just seems like if you managed the inputs well enough, you could have decent netplay.
Title: Re: N64 gaming over the internet
Post by: fzurita on August 29, 2017, 10:29:40 PM
Yeah, I was just discussing Paul's idea. I don't have any experience with netplay either. It does seem more feasible to emulate the game in both the client and the server like you say while keeping both cores in sync.
Title: Re: N64 gaming over the internet
Post by: Paul on August 30, 2017, 04:38:30 PM
Yep that is the traditional way to do netplay.  This other way would be an alternative for folks who don't own any games to be able to play legally (assuming it is).  It could potentially be extended to serving single player games via a server owned by an individual who owns those games (though even murkier legal situation there)
Title: Re: N64 gaming over the internet
Post by: Paul on August 30, 2017, 04:42:07 PM
I'd basically equate it to going over to a friend's house to visit and play games he owns.  Only in this case it is a virtual visit.
Title: Re: N64 gaming over the internet
Post by: loganmc10 on August 31, 2017, 09:41:13 AM
Oh ok I get it. I mean, Nintendo can have a YouTube video pulled if it contains gameplay footage of one of their games can't they? If a system like this existed I'm pretty sure their lawyers could find an issue with it..
Title: Re: N64 gaming over the internet
Post by: Nato on August 31, 2017, 02:54:56 PM
Hi guys, thought I'd join the topic..
I'm also a "non-lawyer", and have a question regarding the legalities of netplay with N64 roms.
- Is the 'End user licence agreement' the main legal contract that allows us to obtain the lifetime rights to use the N64 games that we originally purchased?

As long as a netplay feature restricts the online player count to the original game's max it sounds okay, just like how Paul said about going over a friends house to play.

But if adding netplay alters the gameplay, by adding extra players or resulting  in a different gaming experience than created for use with the N64 console would breach the licence, even though the rom data is unaltered.
Something about it being sold 'as is' or for use only as intended, I can't remember..
Maybe it would be okay to add netplay for roms that had 64DD online support originally?
I wonder about the Turok series, if there is a way that Nightdive Studios could host multiplayer servers for the N64 games, or do they only hold rights to the remakes and not the original N64 roms?
Title: Re: N64 gaming over the internet
Post by: radardetector on October 11, 2017, 02:49:36 AM
This is the nice game, I love the Game.