Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Surprise! Another question related to Minecraft. Anyways:

Rather than drawing thousands of blocks each frame, I remember reading somewhere that Minecraft breaks the map into 16x16x256 chunks, and every time one of the chunk's blocks is updated, it reconstructs a mesh for that chunk to be used in rendering. The idea is that you'll only ever see a handful of chunks at a time, which equates to only a few meshes being drawn.

This is all fine and well, but XNA doesn't seem to have built in support for creating meshes on the fly. It seems that my only option is to mess around with TriangleLists and the like. Is that the only option, or is there some alternative I'm not seeing?

share|improve this question
2  
Triangle lists are a way to dynamically generate a mesh, and a good option since you have lots of control over how the mesh is generated. This allows you to implement plenty of optimizations for performance later on. –  Byte56 May 21 '13 at 5:13
2  
You can with triangle list create cubes and with these cubes you can add as many as you want to a VertexBuffer and then you only draw one VertexBuffer per chunk and draw the closest cubes individually. –  Deukalion May 21 '13 at 11:18
add comment

1 Answer 1

I don't know. Other then that, what you can do it simply construct a cache of these files, of which you can draw meshes on and tell xna to read them. This may be sorta slow but I actually think Minecraft does it. It constantly reads and writes data files, doubt you game is gonna be slowed down.

share|improve this answer
3  
This is really just a comment, not an answer. –  Byte56 May 21 '13 at 5:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.