Hello,
Im building a simple online rpg game. I currently have the following:
- Online Players Hash
- Npc List
- Active Spell List
Using a UDP socket i send the serialize version of each of them, the client receives them and create a view for each one.
Everything is running very good until now.
The problem arises when I want to make things a little better.
Due that my current map is small, I have a few NPC’s, Players and spells. However when want to start adding more I cant keep sending all map info.
This brings the fact that I only will need to send the data NEARBY the player’s position.
It only occurs to me this solution:
In each individual server thread, check the players position, and iterate over the list grabbing only nearby objects.
However this method will consume a lot and will be very slow.
Any other ideas?