Hey guys,
I just recently took the dive into multiplayer. So far I can connect the games, transfer data, and all of that good stuff. I recently ran into a problem with the AI though.
FYI: I'm using Dark Ai
Problem: when the ai entities interact with each other "collide" there isn't any way of telling how long they will collide for or which direction they will go, and this throws all of the positioning off between computers.
Solution?: The only thing I could think of was only have the server handle the ai, then send out messages to all players of the enemy coordinates. Only problem with that is that it would be a lot of information to pass and may have a delay.
Do you guys have any other solutions that you can think of? Thanks.
SOLVED: What I ended up doing was storing all of my information in a memblock, which contained an id for the packet,object number, and object coordinates. I also set up the message updates to be on a timer so I could fine tune performance over lag. When the messages were received they would update all clients to the servers enemy positions. in between the message updates I would record the speed of the server enemy object for the enemy, send over the one packet, and apply this speed to correctly jump forward all of my enemies. "they all have the same speed" If you guys have any questions let me know
The fastfood zombie killer