Thread: [Discussion] Multiplayer features in Essentials
View Single Post
  #29    
Old February 28th, 2013, 06:56 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Quote:
Originally Posted by Luka S.J. View Post
I was thinking along the lines of: The player who handed out the battle request would be considered the "host player". The two players select their moves, and so the information about both the moves gets sent to the "host player", and the entire outcome of that round gets calculated and decided locally in the "host player's" game. The game then simply sends the results of the round to the opposing player, and the game visually represents what is going on. Having it localised at one end, rather than putting the pieces together at both ends, could eliminate possible syncing errors.
I thought about that at first, but battles would take a long time (playing out each round for the host first then for the opponent, rather than simultaneously, plus the unavoidable thinking time). There'd also potentially be a lot of information to transfer per round (e.g. order of attacks, Tri-Attack's effect, number of hits in a multi-hit move, whether Focus Band and other items/abilities work, how much damage is dealt by an attack, etc.). Basically, everything that uses a random number, plus probably some other things too.

I figured that, since using the same RNG seed means you get the same random numbers, battles wouldn't desync if you did that. At least, that's how I understand it would work. The lottery mini-game works on the same principle (setting a seed depending on the day so the lucky number is always the same in a given day).

It would be more secure to have the battle worked out by a host, but I don't think there'd be any risk in skimping on that in favour of convenience (faster, less information to transmit, etc.). I can't think of anything else that would cause desync.
__________________
Reply With Quote