I see. I’m not designing it that way because I don’t have a static server with a persistent world. It’s all peer-to-peer, with a host player who’s client handles level generation and distribution.
I suppose I’ll just have to suck it up and have the AI make a pointless object, or make everything a DistributedNode even if it doesn’t have any components to place in the scene graph.
Perhaps you don’t even need a special AI client, or rather, you don’t need a client with special “AI” privileges? You can connect your “AI” servers as regular clients. If they’re only responsible for moving their own objects around, not anyone else’s objects, you don’t need to use the special “AI” mode.
As I understood it, the AI is required to create a TimeManager for the use of DistributedSmoothNodes.
I tried to do it without, but I either got an error that the class “TimeManagerAI” was not found or some such, if I didn’t have the dcSuffix = “AI”, or the TimeManager didn’t seem to work correctly if I tried to use the class name “TimeManager” to create it. And I don’t know of a way to add the dcSuffix for a single object’s creation.
I’ve been working on a DistributedNode to use as an inter-client messenger, and I’ve run into a serious snag. The p2p and broadcast keywords for a method in the DC file appear to be mututally exclusive. When I use p2p, so that non-owners can send messages via the messenger, only the owner of the messenger gets them.
The only work around I can think of for this is to give each client it’s own messenger to send from. This seems needlessly inefficient.
After continued thought, I believe I can get around it by creating a method with the p2p keyword that in turn calls a method with the broadcast keyword. That still seems silly to me, though.
When a client loses it’s connection to the server, be it because the sendDisconnect method was called or some other cause, the clientRepository prints out a warning to the console. Does it also send a message of some kind that I could program a response to? I’m looking for something I could tell a DirectObject to accept and call a method in response to.