Logo

dev-resources.site

for different kinds of informations.

#babylonjs Browser MMORPG #indiegamedev Ep21 - Spatial Hash Grid Area of Interest

Published at
6/17/2024
Categories
babylonjs
indiegamedev
devlog
mmorpg
Author
maiu
Author
4 person written this
maiu
open
#babylonjs Browser MMORPG #indiegamedev Ep21 - Spatial Hash Grid Area of Interest

Hello
I'm working on POC (prove of concept) implementation of monsters system. I managed to achieve first milestone which is loading entities into engine.
And finally i have occasion to show You how my hash grid area of interest is working.
Engine is refreshing area of interest data each second and it sends info to the clients to show/remove entity. There're two visibility ranges. First is lower (eg 50 units) it describes distance below which entity should be visible and second visibility range (eg 100 units) is bigger and it's use to hide entities. This way I'm avoiding sending create/remove entity command when some entity is on the edge of visibility and potentially I'd have to show/hide and resend entity each spatial hash grid update.

Keep in mind that it's not working on radius but on bounding boxes (rectangles) and entities visibility is not symmetrical. This implementation is far more efficient and actually not having it symmetrical doesn't change anything. Eventually I'll setup it to comfortable range and players will no care about it.

indiegamedev Article's
26 articles in total
Favicon
Empowering Indie Game Developers: A Showcase Platform Built with Passion
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep37: Items model and equipment
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep35: Simple quest system
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep30: Spells and visual effects
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep29: Chat message clouds
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep27: Music and sound settings
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep28: Global countdown
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep: 26 Abilities definitions and new targeting marks
Favicon
Maiu Online - Browser MMORPG #indiegamedev #babylonjs Ep23 - Global Chat
Favicon
Maiu Online - Browser MMORPG #indiegamedev #babylonjs Ep22 - Map editor
Favicon
#babylonjs Browser MMORPG #indiegamedev Ep21 - Spatial Hash Grid Area of Interest
Favicon
Browser MMORPG #indiegamedev #babylonjs Ep20 - Client Side Prediction & Reconciliation
Favicon
Babylon.js Browser MMORPG - DevLog - Update #10- Entities interpolation
Favicon
Babylon.js Browser MMORPG - DevLog - Update - #9 - Floating combat text optimization
Favicon
Babylon.js Browser MMORPG - DevLog - Update #8 - Syncing combat animations, sound and damage text
Favicon
Babylon.js Browser MMORPG - DevLog- Update #7 - Player combat abilities
Favicon
Lus: Last Unit Standing Trailer
Favicon
Hello everyone!
Favicon
Project Universe Game Dev Update
Favicon
Project Universe Game Dev update
Favicon
Project Universe Indie Game Dev update
Favicon
Unity Tutorial: Simple Aseprite to Unity workflow using an Automated Scripted Importer
Favicon
New version of Crystal Blast 2.0
Favicon
Crystal Blast 2.0
Favicon
Game development is hard
Favicon
Making Story-Driven Indie Games with No Budget

Featured ones: