Replicating bots

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Perepug

New Member
Jul 16, 2004
6
0
0
37
Hi everyone

I have spent a lot of time reading various replication docs, and I think I mostly understand how it works now :) However, I still have questions.

Say a game is running on a dedicated server, and there are bots present. Of course, the bot ai runs on the server, and the pawn locations are replicated to clients. I have looked at the code in Bot and Deathmatch and I cant seem to figure out what makes the distinction on where the bot ai is actually run :) I think the instance of the Bot class is only created on the server, but I cant find the place in the code where it happens. Could someone explain the theoretical process for spawning a bot?

EDIT: I thought about it for a while.... Is the Deathmatch object created only on the server and not on clients?

Now a different question. Is it possible to have the bot ai run on one of the clients, and the pawn to be replicated to the server and then to the other clients?
 
Last edited:

Mr Evi1

New Member
Mar 22, 2002
336
0
0
UK
come.to
Indeed, bots are spawned by the GameInfo on the server. Since bots have RemoteRole=ROLE_None, they are not replicated to clients.

You could do what your last question describes, but it would be very complicated replication. I would definitely recommend gaining a lot of practical experience with replication before attempting such a thing!
 

Perepug

New Member
Jul 16, 2004
6
0
0
37
GameInfo also has RemoteRole=ROLE_None. Does this mean that GameInfo objects are not created on the clients? Then the game rules are not accessible on the client and the client cant tell that, for example, the flag has been returned by predicting it client-side, and needs the server to tell it. Am I right? :)