How best to handle AI scripting

Options
Hey guys,

I'm looking for some advice. I am quite far along now in the development of a space based mmo(ish) game. So far, the game has been fully developed using PUN, using your idea of rooms and so on.

I am currently conceptualizing the NPC entities, which will be ships that are controlled by AI that players can fight against. Being pretty new to all of this, I am a little unsure what my options are and what should be considered. The basics of what I am trying to achieve:

1 - AI controlled ships
2 - The AI ships will only need to exist while there is a player in the room

So far, I've been looking at using scene instantiated objects, where the master client runs the AI scripts, and the AI ships serialize themselves over the server (sort of like the master player is controlling the AI ships). This seems to work reasonably well but I am concerned about scalability and having to rely on a random player's computing power.

Is there some better way to handle this?

Many thanks.

Comments

  • vadim
    Options
    Hi,

    Each of your AI category fits well in one of 2 PUN object types:
    1 - scene object instantiated and controlled by master client.
    2 - player's object controlled by client which created it and destroyed as soon as player leaves.
  • donnysobonny
    Options
    Thanks for the reply,

    Great, i'll go with the scene instantiated route then. Thanks for the help!