Hello,
I would like to create a 3D RTS-style game, and I’ve already been experimenting with BabylonJS. I have a few questions, particularly regarding whether this framework is robust enough to handle an RTS game. I assume that the best practice is to make the most use of GPUs, which seems logical, but I still wonder to what extent I might be limited by the framework or JavaScript itself.
For example, when I try to load 200 models (soldier.glb) with an active animation, I already reach a limit (it drops to 30 FPS): https://playground.babylonjs.com/#AJA5J6#291
If I switch to a model without textures, around 125KB, I can add just a few more. (I would have shown another playground with a smaller model, but there is a cross-origin problem.)
From what I understand from the performance analysis in Chromium, it’s the animations that degrade the performance.
I have also noticed that the glow effect can completely ruin performance as well. Do procedural textures (I haven’t managed to export them through the NDE yet, but I hoped to) also affect performance negatively?
Finally, since it’s an RTS, the units need to be pickable, so I have enclosed each unit in an invisible cube and disabled picking for child meshes, but it doesn’t seem to make much of a difference.
Bonus questions:
- Regarding the environment (trees, grass…), I understood that it’s necessary to convert everything to a particle system. If you could confirm that, I’d appreciate it.
- Are there any GPU-transferable calculation techniques ? Specifically, any tips/documentation to avoid relying on the browser for various calculations ?
- If we decide to package the game as a standalone application with an embedded Chromium for example, could we tweak it to significantly improve performance ?
I’m a bit surprised not to see any truly polished games with BabylonJS. I feel that it has great potential, but it’s hard to overlook that demos like “rts” and “picoRTS” don’t inspire confidence.
Thank you for your help