Multiplayer Game Architecture for a Pokemon-Style Battle Game using FishNet and Steam

Hello everyone!

I’m currently developing a game inspired by Pokemon, focusing solely on multiplayer battles. I’m planning to implement a system where one player acts as the host (server) and the others are clients, all without dedicated servers. I’m considering using FishNet for networking and integrating Steam to facilitate connections between players.

I’m seeking advice on the most suitable architecture for this type of game. Given its focus on battles, what are the best practices to ensure stable connections and smooth gameplay for all participants?

Additionally, I would appreciate insights into any specific challenges or considerations when working with FishNet and Steam for this setup. For example, how to efficiently manage data exchange between host and client, or ensure the game remains fair and synchronized for all players.

Finally, if you have any experience or resources you could share regarding creating similar multiplayer games using Unity, FishNet, and Steam, I would be very grateful. I’m especially interested in tutorials, documentation, or code samples that could guide me through the process.

Thks

Same as for any networking game: optimize (bandwidth in particular) and testing.

Since the game you are making is turn based a simple stateless WebRequest API may be easier to implement and work more reliably.

Lastly, there‘s the question of player progress and security. Without a dedicated server, any player can hack their game and use superpowers or unlock all characters and what not. Only a dedicated server or cloud code/storage can prevent that effectively.

Thank you for your insights! I’m relatively new to networking in Unity, and your advice on optimizing bandwidth and testing is greatly appreciated. The suggestion to use a stateless WebRequest API for a turn-based game is also very intriguing, and I’ll definitely look into it.

Regarding your point on player progress and security, I have a question: Is it possible to implement a secure cloud storage system for player data without a dedicated server? I’m still exploring the architecture where one player acts as the host and the others as clients, as previously described. I understand the risks of hacking in a non-dedicated server setup and am curious about the most effective ways to mitigate these issues while maintaining the host-client structure.

Using Unity gaming services, can i have access to Cloud save using P2P structure?

You can make the saved data secure in the sense that one cannot access it without account credentials or similar. But the saved data may still be tampered with locally and then uploaded, so it won’t prevent cheating or other malicious tampering.

There is absolutely no cheat/hack security in a purely client-hosted game. You always need an authority (server program) under your control to be able to verify player state changes and possibly deny a change, like receiving 1 billion exp points from a single fight.

In this kind of game the combat simulation would run entirely on the cloud, with the clients only receiving the outcomes of attacks, or even just a set of data to play back since the server can simulate the entire combat in a split second which for players will be stretched out to play longer to make it more interesting and to allow for animations.

Yes.

But it’s not P2P, it’s a client-hosted match as opposed to (dedicated) server hosted match.

The difference is that the host client has authority by default and has no delays in executing actions since the host is also the server. In a true P2P networking scenario all clients share the same data, they all progress at the same rate (with the slowest player slowing everyone else down). True P2P networking has so many issues associated with it that true P2P topology has not been used by games for the past twenty years, roughly speaking.

Thank you for the comprehensive explanation. It’s becoming clear that a client-hosted model may not be sufficient for maintaining game integrity and preventing cheating in a multiplayer setting.

Would you be able to recommend any guides or resources that could help me set up a basic server for my game? I’m looking for something that could walk me through the process of establishing a simple (and cheap) yet effective server architecture, particularly one that could handle authoritative tasks in a small-scale multiplayer game.

Resources that detail server setup, combat simulation on the cloud, and ensuring data integrity would be especially helpful. I am also interested in any advice on affordable server solutions that might be suitable.

The manual should help with the setup part. For instance Unity‘s Multiplay (aka Game Server Hosting).

The security part is always a tradeoff. If you know client-hosted games can‘t be secured you can still go for this, for one if you stick to mobile its a lot harder for players to alter the game data (ie requires a jailbreak, and you can add jailbreak checks).

Also, cheating only ever becomes an issue when its worthwhile. If you sell 1000 copies nobody cares to cheat. If you sell 100k someone might even publish a tool enabling anyone to cheat.

The cost issues of a dedicated game server are not negligible. A single multiplay server might easily cost you $30 a month onwards (just for availability, usage costs extra), if you need one per continent it‘ll be more accordingly. With a REST API (WebRequest) you may be able to run a server more cheaply since you would only send updates very infrequently, and the latency is less of an issue ie Asian player connecting to a single US server with 1300ms RTT isn‘t a big problem because the gameplay isn‘t realtime.

I recommend Kinematic Soup Reactor over Fishnet.