Announcement

Collapse
No announcement yet.

How Do I Deal With Draw Calls for a Minecraft type game on mobile?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How Do I Deal With Draw Calls for a Minecraft type game on mobile?

    Howdy all;

    So I am working on a minecraft type game for mobile. That means I have to have lots and lots of different blocks out there. If I am thinking correctly then that would mean thousands of draw calls. The Mobile rendering engines completely tank when it comes to draw calls. So I am wondering. Does anyone know how to work around this problem or how to get thousands of blocks without thousands of draw calls?
    Any Help is greatly appreciated.
    Lenny Gordon
    lenny@hammer-on.com
    http://www.hammer-on.com

    #2
    instanced static mesh component may help

    Comment


      #3
      Originally posted by xiuxiu View Post
      instanced static mesh component may help
      Ahh yeah, good idea. Ty ty
      Lenny Gordon
      lenny@hammer-on.com
      http://www.hammer-on.com

      Comment


        #4
        If you are thinking about 1 block = 1 object, stop. That would obviously not scale at all in terms of memory and performance. There is plenty of technical information on how Minecraft works on the internet, search for it and give it a read.

        For example, you could dynamically generate a mesh for each "chunk" of blocks (for example, 32x32x32 blocks) and update it when it's modified. If you place all different block textures in a texture atlas and set the UVs of each block face based on the material type, you could then render a chunk with one draw call.

        Comment


          #5
          Minecraft voxel engine only renders poly faces the player can see.
          So yeah, if you try to use actual real cube meshes you'll destroy any game engine's performance.
          | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

          Comment


            #6
            Thank you both so very much for the excellent advice! This really does help a lot.
            Lenny Gordon
            lenny@hammer-on.com
            http://www.hammer-on.com

            Comment

            Working...
            X