Any downside of not destroying using photonnetwork.destroy?

Options

hi, what is the downside of not destroying gameobject using photon. im developing an rts games that recon plays huge part of the strategy. for example, a enemy building that is discovered but then later is hidden under fog of war, i dont want the game to reveal the state of that building until it is discovered again. for example, the owner removes the building while under fog of war, the enemy shouldnt know that. to achieving that approach, im ditching photonnetwork.destroy and only destroy the building for the owner. and then when the enemy discovered that the building was gone, i will destroy that building for the enemy too. so is there any penalty for ditching photonnetwork.destroy and use regular destroy instead?

Best Answer

  • Tobias
    Tobias admin
    edited September 2021 Answer ✓
    Options

    With 200 units, PUN 2 probably won't be able to sync the transforms. This is likely to cause too much network traffic and disconnects as a result.

    You may be able to apply some optimization and compression for the transforms and control the amount of updates units write.

    Fusion is more effective at compressing the state of a game and I am sure it handles the 200 units without a hitch.

    The migration to Fusion is somewhat easy but quite some rewiring. Many concepts match one another but there are a few differences, of course. Check out "Coming from PUN" for some overview.

Answers

  • Tobias
    Options

    I don't think this is a problem as such, unless you aim for hundreds of buildings and units. Then PUN 2 is not the right fit (for writing the updates of all of those).

    If the game is new-ish in development, I would recommend looking into Fusion. It's the upcoming networking solution and it's much better at syncing networked objects in general. Also, it supports interest management, which could be good to limit cheating later on: Players actually only get updates of units they should see.

  • illogical
    illogical
    edited September 2021
    Options

    the unit count will be at most 200 and buildings around 40ish. if we didnt delete with photon.destroy it might be at most 60ish buildings.


    is the migration to fusion easy? im too deep in the development right now and i cant afford to get bugs later on. regards

  • Tobias
    Tobias admin
    edited September 2021 Answer ✓
    Options

    With 200 units, PUN 2 probably won't be able to sync the transforms. This is likely to cause too much network traffic and disconnects as a result.

    You may be able to apply some optimization and compression for the transforms and control the amount of updates units write.

    Fusion is more effective at compressing the state of a game and I am sure it handles the 200 units without a hitch.

    The migration to Fusion is somewhat easy but quite some rewiring. Many concepts match one another but there are a few differences, of course. Check out "Coming from PUN" for some overview.