Controlling AI On Unloaded Maps

Hey guys,

I’ve created a small server where one user can turn their client into a server (and still play as if nothing has changed). Other clients can connect to this, and their clients will listen to the server instead of spawning in mobs themselves.

The problem I have is that if Player B joins a map that Player A is not inside, how should the server handle mobs for that? The only way I can think of, is to have Player B inform the server of the map but that would be exploitable if the user knew what they were doing.

What sort of strategies can I use to tackle something like this?

I don’t know if exploits are preventable in a peer to peer system where players connect directly to each other.
For example, even if Player A’s game was the authority, he could potentially do the same exploits to Player B.

I think the only way to prevent exploits is to have a third party authoritative server that verifies everything the players want to do. But even that is not optimal since it introduces noticeable lag unless you add in client prediction, and I think even that requires some level of minor client authority which is why most games at some point or another have had things like speed hacks and teleport hacks.

Right, that makes sense.

I’m looking to do a co-op style game, so a large master server (with maps loaded) maybe be out of the question. I’d like to ask a client who is in the map, “Where can this mob walk to?” and essentially have that client determine somewhere nearby performing the collision checks. This client would also be responsible for reporting the position of the mob.

Can the unity delta time be exploited? And is this a bad idea for a system?

Sorry I’m by no means an expert, but I would imagine that if someone could somehow freeze one of their frames for a long time, it could artificially increase their deltaTime, maybe making some weird stuff happen.

I’m not sure if you are making some kind of mmo system where progression is important, so you don’t want cheaters.
But if you are not making that system, and are instead just making a co-op game that people can play through, like say something like Left 4 Dead, I would just say to provide some kind of “banning” feature so that if someone is playing with people, l they can just ban any cheaters.

How many “maps” were you thinking of doing? If it’s a co-op game, it’s probably fair to say that the users will tend to be in the same map with each other most of the time, as they’re trying to work together. If they do decide to be in separate areas, the best idea may just be to run the logic for both areas at the same time (you can load in specific maps to the server with LoadAdditive). This would work something like Diablo or Titan Quest. On the other hand, you could try the way that Left 4 Dead or Fable 3 does it, with the entire party going between maps when they change maps, instead of each person going through individually. This would reduce the server load of course, and would make the game more cooperative.