Domanda

Is it possible to make a multiplayer rpg game without a server?

I thought about authentication, and that seems sort of fine in p2p.

But, how to store the savefile so that no one has reason to / can change it?

I thought about letting the user to store savefile of their character locally ... but I can't think of a way to prevent people to change savefile of their character.

If this is really not possible without a server, how to minimize communication with the server?

I thought about making a save point, but that is not fair. Because the user can choose not to save when something bad happens to them. Unless the design of the game is that the worst that can happen is they don't get something (same as deliberately not saving). Then this can work.

Thanks for your help.

È stato utile?

Soluzione

You could design your savefile similar to a git-repo. Don't override everything but instead save the whole history. Since you are planing a plausibility check anyway, the single 'commits' could be signed by all participating clients.

When a client joins the network, all other clients get the savefile and judge its validity based on the signatures and maybe some deeper plausibility checks. If they have a doubt, they would refuse the user to join.

There are some disadvantages:

  • The management of the trust relations. If I have a few clients under control, I could still forge a savefile with valid signatures.

  • The savefile can grow large. However, you'll only need it when joining, afterwards the last state is sufficient to hold in memory. One could also have some server-signed 'commits' in the chain, then you only have to submit the chain back to this commit.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top