Page 1 of 1

Robots and Network

Posted: Mon May 26, 2008 7:01 am
by Flash
Since Jeff didn't want to just back out the change that broke robots, I went back to the beginning and took another look at it, and found myself at the same place I was before (but now I remember why). Here's what I found:

Attempting to use the local RobotPlayer object whenever a particular PlayerId is requested is broken. I'm not even sure the logic behind the change was sound. I did go through bzflag/playing.cxx and make all the access through Roster.cxx coherent, and it didn't improve behavior at all.

While I appreciate the desire to share a single network connection between the client and his local robots, I think the first implementation was flawed and it would be better to back out that change and start again.

Also, I noticed that when my client quit, the server did not receive quit messages for all the robots. When it finally killed them for inactivity, the server crashed. The server crash is due to code that abuses unclear and inconsistent "ownership" of the network connection memory. It was this problem (and Jeff's encouragement) that led me to start refactoring the NetHandler stuff in the first place. Now that work is on a separate branch.

Where should I go from here?