Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Suggestions for a 2 player shooter coop game

Discussion in 'Multiplayer' started by Rati, Feb 14, 2018.

  1. Rati

    Rati

    Joined:
    Jun 26, 2011
    Posts:
    25
    Hello, i'm working on a contra-like game (snes 2D shooter, 8lQJlYRVeu0|start=1304)

    the game already have a multiplayer mode, coop on the same screen, but I want to add an online mode.

    I'll use the Photon network plugin.

    For the projectiles, i was thinking, when a player shoot, call a RPC to create a "fake "bullet on the other player instance. working "like a normal bullet", but not dealing damage, just going straight, eploding once hiting a wall or an ennemy. and on the shooter instance, doing the "real" damage calculations, and when it touch and enemies, calling a rpc of "real" damage. is this a good way to do things ?



    For the ennemies i want to damage them a soon the projectile hit them (not waiting for a validation from host), And then accumulate the damage the ennemy suffer, and sending it on the next call of the"OnPhotonSerializeView ". If the player destroy the ennemy, he can start the dead animation immediatly, and RPC the other player to do it too. there is no "lag" for the shooter

    the bullets are not network objects but players and ennemie are.



    Is my design Ok, i there is big flaws i dont see ?