DEV Community

Maiu
Maiu

Posted on

Babylon.js Browser MMO - DevLog - Update #5 - Area of interest with spatial hash grid

Hello,

Next short presentation with the current progress. Today I'm presenting effect of working spatial hash grid on the game server side. Server is sending two types of packages. First that someone is in range and should be visible and second to tell that entity is out of range should not be visible. Underneath whole needed info for rendering (model name, character class etc.) is send in order to display entity. For future probably I'll add some caching to not load not needed data.

This algorithm is not working on the radius but rather on rectangles, so it might be the case that player 1 see player 2 and player 2 dont see player 1. Also there's concept of grace range. So players is added is it closer than eg. 50 units and it's visible until it's go away for more than 100 units.

Hope You like it!

Top comments (0)