Original Post
I'm currently working on a server for a 3rd person multiplayer shooter I've been coding (think Infantry at www.station.com, but less 2d if that makes sense). Anyway, I know for my networking code to be more bandwidth efficient, clients should only be sent info about players and other objects near them. This, of course, could easily be solved by looping through players and checking positions, but isn't this a waste of processing power? I've been trying to find a way to send players the information they need without the need for an/multiple if statements within a loop of all the players. As the number of players grows, this architecture just seems like it would take too much time. It's really been bugging me because every time I think I might have something it ends up that I'm going to need to loop through players and check a condition anyway. Anybody have any suggestions? BTW: Game is designed (right now) to support less than 100 clients, most likely around 40.