So I figured my last resort before I use a method I don't want to use was to ask here.
To the point, I'm (with a friend) making a minecraft clone (I've been doing the client, he's doing the server ) and I decided to use Irrlicht as the graphics engine.
My problem is only one problem - creating the terrain.
It seemed simple enough, sure, cubes. Lots of cubes.
Then came the realization that lots of cubes = lots of simultaneous rendering.
I have tried to use bitplanes MeshBatcher to remedify the problem - only rendering one mesh scene node - as opposed to multiple.
It seems both of these (regardless) achieve the same effect
My current method would be iterating through dimensions, and creating new mesh scene nodes with SceneManager->addMeshSceneNode(...)
psuedoish:
Code: Select all
for(int i = 0; i < dims.X; i++)
{
for(int j = 0; j < dims.Y; j++)
{
for(int k = 0; k < dims.Z; k++)
{
sceneNodePtr = smgr->addMeshSceneNode( meshOfSimpleCubeInObjFormat );
// set position, etc
}
}
}
I was suggested a custom scene node - but I saw no benefit in this if the scene node still had this many meshes to render.
(And if it weren't to use this many meshes, would the suggestion have been to use a huge array of vertices , and calculations ? ... )
My only other option (while awaiting advice from these forums) is to only render when required - setting my cameras far value does not achieve wanted results because of the sheer amount of cubes on most maps.
If the question was unclear ( vague, perhaps ) my question is:
Is there any way possible to maintain a solid framerate without having to render only when required - regarding as many as 1024*1024*1024 cubes.