0

I'm working on a minecraft-like game, and I'm wondering about an efficient way to generate the chunks while the player is walking. Especially, I would like to draw the chunk that the player is seeing before the one which are behind him.

I'm currently planning to make a thread pool, where each region is asynchreonously generated by a different thread. Is there a way to efficiently sort the tasks using an algorithm such as the frustum culling ?

Maël Nison
  • 7,055
  • 7
  • 46
  • 77
  • I'd consider first recursive splitting of meta-cells to smaller pieces (octrees even?), sorted by `center_of_cell dot view_ray`. Rudimentary frustum-culling can be achieved by comparing the dot product to some constant; pixel perfect frustum culling should be achieved with multiplying the AABB corner coordinates by the projection matrix (and testing for |x,y,z| <= |w|. I only propose this as comment, as I don't fully understand your question. – Aki Suihkonen Mar 18 '13 at 07:00
  • You may have more success with this question at [gamedev.se] – Bernhard Barker Mar 18 '13 at 07:29

0 Answers0