Hunt-or-Haunt: DevLog Week 12 (Photon Bolt=>Photon Fusion)

posted in Hunt or Haunt for project Hunt or Haunt
Published November 25, 2021
Advertisement

"Just as quantum mechanics tells us that we cannot accurately measure position and momentum at the same time,

we also proved this with Photon Bolt!"

As mentioned last week, this week we started to upgrade from Photon Bolt to Photon Fusion.

The structure and API of Fusion are completely different from Bolt.

We encountered and solved many problems during the upgrade process.

In this article, we want to share some technical notes, hoping to help those who plan to enter Fusion.

  1. Why must we use Fusion instead of Bolt?

    Two important points in HoH: smooth movement and accurate attack.
    The first problem we encountered was that the attack did not execute as expected by the client.
    That's because the position in the client is inconsistent with the position in the host.
    We try to solve this problem by “input command”, and use CharacterController instead of RigidBody.
    It did work, the attack became accurate, but something strange happened.


  1. Just as quantum mechanics tells us that we cannot accurately measure position and momentum at the same time,
    we also proved this with Photon Bolt!
    Once the attack is accurate, the position of the character begins to jitter.
    In a bad network environment, this problem becomes very obvious.
    Fusion uses their own tick-based simulation, and has a more flexible network topology, and actually performed well in our tests.
    We also asked the official Photon engineer for help, and he strongly recommended that we use Fusion.

  2. How do we upgrade from Bolt to Fusion?
    At present, Fusion's documentation is not complete and clear.
    Based on our experience, we try to organize the class mapping from Bolt to Fusion.
    They are not a one-to-one mapping, but their functions are very close.

To upgrade quickly, "decoupling" is a very important stage before the upgrade.

We first replaced all function calls and variable usage of Bolt with our interface,

and then use Fusion to implement them.

Fusion also has some usage limitations, because it puts performance first.

We have overcome most of these limitations and the upgrade task is almost complete.

If you are interested in this topic, we will continue to discuss the details next week.

FB: https://www.facebook.com/huntorhaunt

Discord: https://discord.gg/JSCWW89guf​​

iOS App Store: https://apps.apple.com/us/app/hunt-or-haunt/id1590832654

Google Play: https://play.google.com/store/apps/details?id=com.daonegames.soulsnight

0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement