Hi everyone,
As for automatic batching in Castle Game Engine: Indeed, it is just not yet implemented (yet). It's on the Castle Game Engine
roadmap In the meantime, you can indeed do it yourself, with a bit of code. Typically it means you will put multiple geometries inside a single IndexedFaceSet X3D node, instead of creating many IndexedFaceSet X3D nodes. Demo from Kagamma nicely shows this technique, using TCastleSpriteBatchScene in demo_sprite.
P.S. Various
optimization hints for CGE are mentioned in our manual BTW, @Kagamma, I would happily take your demo_sprite code and add it to the CGE examples directory. It's a very nice example. Are you OK with this? It would mean placing the code under
https://castle-engine.sourceforge.io/license.php . (I'm not sure about the license of miku.png image, but if needed replacing it with something else is easy.)