Skip to main content
Commonmark migration
Source Link

I am developing a clone Minecraft for the purpose of study. I am working with Java and LibGDX. I have read some other codes on web, and reading LibGDX tutorials and currently I could develop something on map using Perlin Noise, etc.

But my biggest problem is the render performance. I splitted my map in chunks, as Minecraft does, but even with few elements on screen (2.000 blocks) the FPS drops to 20 by second on Desktop. Even if I not looking for any block.

My logic is that:

  1. Main() calls Region.draw() to draw all loaded region chunks (currently about 16 chunks);
  2. Region.draw() calls each Chunk.draw() to draw all blocks on each chunks, about 128 blocks (total 2048 blocks).

I really do not see reason to performance be poor like that. I read that small things like that send a lot of instructions to GPU, like each vertices coordinates, etc. and it make sense. But Minecraft do thinks even more complicated like that and works without lag on my PC. I could simulate, on Minecraft, a render of 51.522 blocks without FPS issues. So I think that there are some method to avoid upload my blocks each time to GPU, and just call draw on it directly (I don't know if I am on right direction).

I'm studying 3D game development currently, and I have a similar problem on Unity (lot of objects, low performance).

What I missing?

My current code

My current render with 20 FPS:

[![][1]][1] [1]: https://i.sstatic.net/h9mJx.png

I am developing a clone Minecraft for the purpose of study. I am working with Java and LibGDX. I have read some other codes on web, and reading LibGDX tutorials and currently I could develop something on map using Perlin Noise, etc.

But my biggest problem is the render performance. I splitted my map in chunks, as Minecraft does, but even with few elements on screen (2.000 blocks) the FPS drops to 20 by second on Desktop. Even if I not looking for any block.

My logic is that:

  1. Main() calls Region.draw() to draw all loaded region chunks (currently about 16 chunks);
  2. Region.draw() calls each Chunk.draw() to draw all blocks on each chunks, about 128 blocks (total 2048 blocks).

I really do not see reason to performance be poor like that. I read that small things like that send a lot of instructions to GPU, like each vertices coordinates, etc. and it make sense. But Minecraft do thinks even more complicated like that and works without lag on my PC. I could simulate, on Minecraft, a render of 51.522 blocks without FPS issues. So I think that there are some method to avoid upload my blocks each time to GPU, and just call draw on it directly (I don't know if I am on right direction).

I'm studying 3D game development currently, and I have a similar problem on Unity (lot of objects, low performance).

What I missing?

My current code

My current render with 20 FPS:

[![][1]][1] [1]: https://i.sstatic.net/h9mJx.png

I am developing a clone Minecraft for the purpose of study. I am working with Java and LibGDX. I have read some other codes on web, and reading LibGDX tutorials and currently I could develop something on map using Perlin Noise, etc.

But my biggest problem is the render performance. I splitted my map in chunks, as Minecraft does, but even with few elements on screen (2.000 blocks) the FPS drops to 20 by second on Desktop. Even if I not looking for any block.

My logic is that:

  1. Main() calls Region.draw() to draw all loaded region chunks (currently about 16 chunks);
  2. Region.draw() calls each Chunk.draw() to draw all blocks on each chunks, about 128 blocks (total 2048 blocks).

I really do not see reason to performance be poor like that. I read that small things like that send a lot of instructions to GPU, like each vertices coordinates, etc. and it make sense. But Minecraft do thinks even more complicated like that and works without lag on my PC. I could simulate, on Minecraft, a render of 51.522 blocks without FPS issues. So I think that there are some method to avoid upload my blocks each time to GPU, and just call draw on it directly (I don't know if I am on right direction).

I'm studying 3D game development currently, and I have a similar problem on Unity (lot of objects, low performance).

What I missing?

My current code

My current render with 20 FPS:

added 149 characters in body; edited tags
Source Link

I am developing a clone Minecraft for the purpose of study. I am working with Java and LibGDX. I have read some other codes on web, and reading LibGDX tutorials and currently I could develop something on map using Perlin Noise, etc.

But my biggest problem is the render performance. I splitted my map in chunks, as Minecraft does, but even with few elements on screen (2.000 blocks) the FPS drops to 20 by second on Desktop. Even if I not looking for any block.

My logic is that:

  1. Main() calls Region.draw() to draw all loaded region chunks (currently about 16 chunks);
  2. Region.draw() calls each Chunk.draw() to draw all blocks on each chunks, about 128 blocks (total 2048 blocks).

I really do not see reason to performance be poor like that. I read that small things like that send a lot of instructions to GPU, like each vertices coordinates, etc. and it make sense. But Minecraft do thinks even more complicated like that and works without lag on my PC. I could simulate, on Minecraft, a render of 51.522 blocks without FPS issues. So I think that there are some method to avoid upload my blocks each time to GPU, and just call draw on it directly (I don't know if I am on right direction).

I'm studying 3D game development currently, and I have a similar problem on Unity (lot of objects, low performance).

What I missing?

My current code

My current render with 20 FPS:

[![][1]][1] [1]: https://i.sstatic.net/h9mJx.png

I am developing a clone Minecraft for the purpose of study. I am working with Java and LibGDX. I have read some other codes on web, and reading LibGDX tutorials and currently I could develop something on map using Perlin Noise, etc.

But my biggest problem is the render performance. I splitted my map in chunks, as Minecraft does, but even with few elements on screen (2.000 blocks) the FPS drops to 20 by second on Desktop. Even if I not looking for any block.

My logic is that:

  1. Main() calls Region.draw() to draw all loaded region chunks (currently about 16 chunks);
  2. Region.draw() calls each Chunk.draw() to draw all blocks on each chunks, about 128 blocks (total 2048 blocks).

I really do not see reason to performance be poor like that. I read that small things like that send a lot of instructions to GPU, like each vertices coordinates, etc. and it make sense. But Minecraft do thinks even more complicated like that and works without lag on my PC. I could simulate, on Minecraft, a render of 51.522 blocks without FPS issues. So I think that there are some method to avoid upload my blocks each time to GPU, and just call draw on it directly (I don't know if I am on right direction).

I'm studying 3D game development currently, and I have a similar problem on Unity (lot of objects, low performance).

What I missing?

My current render with 20 FPS:

[![][1]][1] [1]: https://i.sstatic.net/h9mJx.png

I am developing a clone Minecraft for the purpose of study. I am working with Java and LibGDX. I have read some other codes on web, and reading LibGDX tutorials and currently I could develop something on map using Perlin Noise, etc.

But my biggest problem is the render performance. I splitted my map in chunks, as Minecraft does, but even with few elements on screen (2.000 blocks) the FPS drops to 20 by second on Desktop. Even if I not looking for any block.

My logic is that:

  1. Main() calls Region.draw() to draw all loaded region chunks (currently about 16 chunks);
  2. Region.draw() calls each Chunk.draw() to draw all blocks on each chunks, about 128 blocks (total 2048 blocks).

I really do not see reason to performance be poor like that. I read that small things like that send a lot of instructions to GPU, like each vertices coordinates, etc. and it make sense. But Minecraft do thinks even more complicated like that and works without lag on my PC. I could simulate, on Minecraft, a render of 51.522 blocks without FPS issues. So I think that there are some method to avoid upload my blocks each time to GPU, and just call draw on it directly (I don't know if I am on right direction).

I'm studying 3D game development currently, and I have a similar problem on Unity (lot of objects, low performance).

What I missing?

My current code

My current render with 20 FPS:

[![][1]][1] [1]: https://i.sstatic.net/h9mJx.png

Source Link

Optimizing thousand objects manipulation

I am developing a clone Minecraft for the purpose of study. I am working with Java and LibGDX. I have read some other codes on web, and reading LibGDX tutorials and currently I could develop something on map using Perlin Noise, etc.

But my biggest problem is the render performance. I splitted my map in chunks, as Minecraft does, but even with few elements on screen (2.000 blocks) the FPS drops to 20 by second on Desktop. Even if I not looking for any block.

My logic is that:

  1. Main() calls Region.draw() to draw all loaded region chunks (currently about 16 chunks);
  2. Region.draw() calls each Chunk.draw() to draw all blocks on each chunks, about 128 blocks (total 2048 blocks).

I really do not see reason to performance be poor like that. I read that small things like that send a lot of instructions to GPU, like each vertices coordinates, etc. and it make sense. But Minecraft do thinks even more complicated like that and works without lag on my PC. I could simulate, on Minecraft, a render of 51.522 blocks without FPS issues. So I think that there are some method to avoid upload my blocks each time to GPU, and just call draw on it directly (I don't know if I am on right direction).

I'm studying 3D game development currently, and I have a similar problem on Unity (lot of objects, low performance).

What I missing?

My current render with 20 FPS:

[![][1]][1] [1]: https://i.sstatic.net/h9mJx.png