Hi there again . After the notices about the Cubes library I was working with, I decided to start my own project, and generate a world from noise, with block. I used JME3 's Boxes as blocks, and I used custom textures. The only problem are the performances. FPSses are really low (10 FPSses is the maximum I reached). And there are lots and lots of Objects and Triangles to render, outside the camera too.
Here’s a screenshot:
How to I improve performances and make the rendering system better? Maybe with rendering only visible cubes, or only visible triangles and render only visible cubes’ faces’ textures?
P.S.: How do I render different textures on each side of a box? That will be very useful…
Cube worlds are not made of cubes. As you’ve noticed it is too expensive to render many objects. So the trick is to create a mesh that looks like the surface of a cube world but is actually a larger mesh. There are numerous articles (even in this forum) so search for some keywords like ‘cube world’ or ‘meshing’.
Personally I found these articles pretty good.
I guess from what I heard and read in this form is to draw only the visible part of a cube and not a real cube. I’m sure you will find some useful hints in this form which are more JME specific and maybe that what you are looking for.
Not to sound harsh, but you might want to pick a simpler game idea until you get better at it. Climbing Mount Everest right at the start is not the best way to work your way into mountain climbing and block world games are almost the hardest kind of game to write.
Yes, but it’s a working example showing how to construct a mesh from blocks. If understanding that is beyond your current abilities then you should shelve this project until you are better at game development.
You won’t find ready-made solutions without limitations because it’s impossible. There will always have to be design tradeoffs to support infinite block worlds. Always.
Hmmm but … then why do you ask? I mean the performance issue you have is because you have no clue. I might be wrong, but it does not perform for a reason and the reason is you draw every cube even the ones can not been seen…
Aha and we try desperately to explain you that this is the tricky part even skilled game programmers have to think hard and apply every trick to make that it performs well…
But I did my part in this discussion and delivered some links I remembered. It may or it may not help. I’m out now of this thread…