How do fighting games deal with random events in online play?


I guess this extends to P2P games in general too. I know that usually in a P2P network environment you usually just send the inputs over the network and the game is run locally using the inputs it receives, but how would it deal with random events like Faust’s item?

The way i see it is that one client must create a random seed value (maybe using system time) and then both clients use that seed value as the starting point for any further in-game circumstances that need a to pull a random value. So if both clients keep in sync, then their random seed values should keep in sync as well. Is there any flaw in this line of thinking, or something i’m overlooking?


Well there alot of unknown variables here.

They might include

  • Are both players playing on a server provided by the publisher or console maker?
  • How much of the game running on the console and how much is running on the server?
  • Is one player acting as Host?
  • What protocols the game running? (GPPO for example).
  • It can depend on the game engine coding


I assume most fighting games use a server only for matchmaking and hosting lobbies and the actual fighting/spectating is done p2p. That’s why in umvc3 when spectating you have that message come up that if you leave then no one else can spectate, because you are essentially acting as the ‘server’ for the rest of the spectators as this reduces the load on the 2 players fighting since they don’t have to send their inputs to everyone in the lobby.

I’m mostly looking for a general solution to how it might be solved. There might be specific solutions depending on the game engine, but i still imagine there is a general way to approach it


It can be something as simple as generating a finite number of random items that is physically more than enough, lets say 1000 for Faust, before a round begins and then sending it reliably to the opponent. Assuming you store pre generated item in a stack, every time Faust throws an item, both sides just pop an item from the top of the stack. This way you don’t have to explicitly worry about synchronization of random items.