How to build AI logic in PUN (Like a Boss AI)

like the title, How to build AI Logic in PUN?
I guess let one client to control the AI, But If this client is logout, The AI is gone too (Like a Boss).
So , how to prevent that (is very common that player logout frequently in Mobile device)

Comments

  • The info that is necessary for the AI must be available to all clients. Then, if someone drops out, another player can take control of the AI. Typically, we'd use the Master Client for that but you can chose any or reassign who is the Master Client, too.

    There are sadly some cases, where players time out and if these run the AI, it will not do much for the duration of the timeout.

    For those cases, you'd need to be able to run the AI logic on the server. This requires you to host the servers or we can run the custom dlls in an Enterprise Cloud for you (servers dedicated for your game alone).

    Photon Quantum goes another route: The AI is deterministic for any given input. If someone drops out, this players' commands won't arrive but the AI can be resolved for all frames, no matter what.
  • Tobias wrote: »
    The info that is necessary for the AI must be available to all clients. Then, if someone drops out, another player can take control of the AI. Typically, we'd use the Master Client for that but you can chose any or reassign who is the Master Client, too.

    There are sadly some cases, where players time out and if these run the AI, it will not do much for the duration of the timeout.

    For those cases, you'd need to be able to run the AI logic on the server. This requires you to host the servers or we can run the custom dlls in an Enterprise Cloud for you (servers dedicated for your game alone).

    Photon Quantum goes another route: The AI is deterministic for any given input. If someone drops out, this players' commands won't arrive but the AI can be resolved for all frames, no matter what.

    Thank u very much
  • We currently making a Act game. We use a lot of high level feature such as Mecanim and physics and I think quantum is the final solution
  • Don't let the pricing of Quantum put you off. Especially, when you are good coders but don't know networking code yet. It will save time when you don't have to decide how to handle lag in every step you make.
    Get in touch via mail, to get a trial period or to let us know about your project.
    [email protected]
  • Oh and where is the quantum section of the forum?
    I can see bolt and pun2 though
Sign In or Register to comment.