PhotonPlayer Bot
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
PhotonPlayer Bot
Fidel
2016-12-27 19:36:37
I'm developing the following game:
https://play.google.com/store/apps/details?id=com.ViralRich.AirMultiplayer
In the game's code there is no difference between a bot and a player other than the bot having an additional AI_Control script which takes control of the spaceship. Player spaceships are instantiated using PhotonNetwork.instantiate while bots are instantiated using PhotonNetwork.InstantiateSceneObject.
The spaceships access their photon views and check their owners (PhotonPlayer) to get properties such as nickname and team. It ocurred to me that it would save me tons of duplicate code if I could create instances of PhotonPlayer for the bots. I should be able to create a PhotonPlayer of type Bot and assign it as the owner of a sceneview photon view.
What do you think?
Comments
Hi @Fidel,
There was a good discussion on the same topic here.
I read that, I want to know Photon devs' stance in extending the PhotonPlayer class to include 'bots' which can be assigned as owners of scene objects. This would save developers a lot of duplicate code. Basically, I'm inquiring about the feasibility of implementing such a thing in future updates.
Back to top