TornDotSpace / Torn-Issues

The official issue tracker for torn.space!
0 stars 0 forks source link

Store sectors as separate lists of players, instead of having one PLAYER_LIST of all players. Same for other objects. #1

Closed 2swap closed 5 years ago

chrisj1 commented 5 years ago

What would be the advantage of this?

DamienVesper commented 5 years ago

Less lag as servers don't have to run through as many player instances?

DamienVesper commented 5 years ago

For example: Server runs through the entire player list once and sorts them into lists by sector. When calling upon a player, call from the smaller lists (uses less memory). When a player moves sectors (probably need to rework movement into client) send a message to server updating the player's position (which is already calculated in the client therefore using the client's resources instead of the server) therefore should use less resources overall.

johnnyapol commented 5 years ago

This has been addressed during the server rewrite, for the most part (see: getPlayer() and sendWeapons()). closing this out