Answer the question
In order to leave comments, you need to log in
How to make a destructible world (like minecraft)?
I'm going to write a game based on a changeable world, like in minecraft, only not cubic, but more realistic. Using a heightmap is not an option, as the ability to dig tunnels must be implemented. The first thing that comes to mind is to divide the world into blocks and already in blocks into points, say every half a meter, if the points are "material" (earth, stone, etc.), then we somehow calculate the surface, visualize we give it to the client. But if you count a little, it will take up a lot of space. Let's say 1 byte is allocated for one block, then 1000m * 1000m * 1000m * 2b = 2000000000b ~ 2GB, and if the map is 30x30km ... I read somewhere that in minecraft everything is done exactly like this, but stored in a compressed form, although I may be wrong.
Actually the question is: how to make the basis correctly, so that the world is expandable and does not take up terabytes of memory? I’m also interested in how well this can be implemented in the Unreal Engine, I haven’t studied the engine itself yet, but I’m more inclined towards it (C ++ doesn’t scare me) and how suitable is Unreal for such a project? It is the performance of the final product that is of interest, and not the convenience of development.
Answer the question
In order to leave comments, you need to log in
You need voxels, but it will take several years to write them yourself, so you better take the plugin:
voxelfarm.com
github.com/volumesoffun/cubiquity-for-unreal-engine
sandermeessen.weebly.com/terravox.html
And read this blog from the very beginning , it is written there why this is a super-difficult task:
procworld.blogspot.ru
It is possible to repartition the surface. Those. when digging a hole, you need to cut triangles from the existing face and add new faces to form the tunnel. It is difficult, but quite effective - there will be no memory overrun.
As you've already been told, you need voxels. And Unreal is not suitable for this. In fact, you have to write your own engine.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question