Search Unity

How do i make ai bot using photon network

Discussion in 'Scripting' started by brayT, Mar 17, 2019.

  1. brayT

    brayT

    Joined:
    Jan 21, 2018
    Posts:
    65
    hey guys i know this is probably hard to do but is there any way i can make a realistic bot in unity thats the same as ravenfield or anyother game. ive been looking for ever and could only find a ai movement script but i want i script or at least i full flegde tutorial on how to make a realsitic bot for unity
     
  2. Doug_B

    Doug_B

    Joined:
    Jun 4, 2017
    Posts:
    1,596
    There are many, many ways to make an AI. At its most simplistic, your common or garden "if" statement gives you a binary AI (does it stand still or does it run away, for example).

    Making it "realistic"- now there's the problem. You could very easily argue that there isn't an AI yet created that is "realistic". :)

    The upshot of all this is that, realistic or otherwise, you will have to make your own AI to your own specifications and quality level.

    Personally, I have found Holistic3D on YouTube to do good tutorials aimed at a very wide audience (beginners upwards). I would recommend taking a look at this series, it has 30 AI based tutorials for you to delve into. Good luck. :)
     
    radiantboy likes this.
  3. brayT

    brayT

    Joined:
    Jan 21, 2018
    Posts:
    65
    thank you very much i will take a look at it.
     
    Doug_B likes this.
  4. brayT

    brayT

    Joined:
    Jan 21, 2018
    Posts:
    65
    yea i need one for photon networking is there any
     
  5. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    The way you communicate it in multiplayer is run the AI logic on one machine, the server/host probably and send its output same as any other player character in the world
     
  6. brayT

    brayT

    Joined:
    Jan 21, 2018
    Posts:
    65
    so your saying if me and someone else were playing that if i left and he was still in the game that the ai bots would leave the game or become destroyed when i left.... if so is there a workaround or not
     
  7. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    If he us the host than yes, what you would do in a case like this is find another player to be the host and run it on there. (You never saw "please wait, finding another host" or something like that as a player?)

    If this is more of a mmo style you would run it on the always online main server.