#How to add a "bot" player to a Lobby using Unity lobby service?

1 messages · Page 1 of 1 (latest)

bright skiff
#

Greetings, I have a real-time, cross-platform, multiplayer card game that I want to add "bots" to. Basically, I want to give the player who created the game (i.e. lobby) the ability to add bots to the game in lieu of or in addition to other human players.

It seems I can't call JoinLobbyByIdAsync() like I would if I were a human player joining the game (results in a Bad Request error) but I see no documented way to add additional players to the lobby other than that.

How do people generally go about doing this?

The only thing that comes to mind is to "hack around this" by adding data objects to the lobby for each "bot" player and adding them to the list of "real" players in the lobby.

That seems really kludgy to me so I wanted to reach out to this community to see how you would go about doing it?

Thanks!

#

To add to this, when the game creator clicks the Add Bot button on the game screen, I want a new "Player" to be added to the game (lobby). I will (randomly select from a list of hard-coded bot portraits and Scottish names) and I want that player to appear in the player list of the game, visible to all players who have joined the game. The player count should also increment so in the lobby list it will show how many players have joined the game (including the bot).