Game will not respond (using a bunch of quads)

I am attempting to make a small voxel for my game, and I generated a 160 x 160 x 1 voxel (this is the final size). When I run the game, it does not respond. I have checked the terrain generation, and although it takes a little while, the game works perfectly well with ordinary jMonkey boxes.

I think I use a relatively standard method of making a textured cube with different textures on each side. Here is the code (it’s kinda messy) - Google Drive

I’m probably missing some setting or something in my - Google Drive

Other relevant info: GrassBlock has a Block

If anyone can find a solution, please tell me.

Since i’m writing also a Voxel Game based (like many others on this forum), I can say you lack many improvements on you Data Storage strategy.

First, you are building 160 x 160 x 1 x 6 objects (one object for each side of cube), so you got 153k objects on your scene. You have to add some tricks, like:

Also, move you voxel generating engine to another thread, so you game loop can run smoothly. Since making a good voxel engine is a high challenge, I recommend you reading some articles about it:

Here, Here, and Here.

1 Like

Very good post with great resources.
We also faced this challenge for our block-based mapeditor and the performance difference was crazy :smile:

Just a quick note: this voxel engine mania makes general sense in just two cases. Either you want to improve your own skills and then sell yourself to Blizzard or Bioware or wherever else, or you want to sell just the resulting engine itself. Struggling for softening xyz dependency, even if successful, doesn’t mean automatically you will create a great game, cause there is nothing about gameplay. Still, it is a challenge, technically.

Also, I would add that often people think “the graphics look worse so it must be easier” but in fact voxel engines may be the hardest type of engine to write.

Waaay easier to just load up some nice assets and run around in them.

And to note this again: “Block worlds are not made from blocks” :slight_smile:

1 Like

I’m on it mainly because the the engineer challenge. :grin:. Also another common mistake is “I’ll make a Minecraft clone and will become rich!!!”. Seriously, it’s better develop mobile games and wait for another “Flappy Bird” :joy:. Only those who like the challenge stay on this road for more the 6 months.

It is all great and well, but what I was trying to prevent from was disappointment in coding itself :slight_smile: