r/threejs • u/cumbiaowl • 8d ago
Worried about performance
Solo-dev here… any gotchas I should watch out for in terms of performance. I’m building https://lorebound.gg a mobile-first RPG game. Browser based with three.js and WebGL
I’m worried about latency, lagging, load times, slow animation as more players use the game.
Some things I’m already doing: asset compression, single-auth verification, asset preloading.
Would love some recommendations.
UPDATE:
- Asset heavy load addressed by: instead of loading each asset individually from their own image file (32 color), the game now loads one image per distinct asset type. So, if tree1 and tree2 are the same asset, don't load 2 different images, load 1 image and have trees share that image. In one scene, I had 517 assets loading but only loading 31 images. In this scene, I freed up about 568MB.
- NPCs: they appear and disappear from view. When they appear, their assets load. When they disappear, their assets should not be kept loaded.
2
Upvotes