Carve holes into terrain at runtime?

Hi Deirh!

There’s no straight answer for your question, since there’s too much of workarounds and fakes and it’s only matter of your choice of what is better for you. The topic is pretty much complex, since such game concepts are very unique and require unique instruments for their implementation. Just for the record - landscape is not the best one. It seems to fit, but it is not so - digging tunnels on the screen is not an actual task in this case, but a gameplay mechanic with inputs, score mechanics, movement logic, etc.

Try researching this topics:

  1. Landscape Visibility Mask:
    Landscape Material Layer Blending in Unreal Engine | Unreal Engine 5.2 Documentation
  2. Try decomposing the task and divide your game field by the grid. That way you will have movement logic and graphic representation separated. Graphic part will not stop you from getting the player to actually dig the game field to expand it.
  3. You will definitely need to have your own movement mechanic, that is not based on traditional collision (since this will need to be updated in realtime), but will stick, for example to a 2048x2048 realtime generated texture to know where could player go and where not.
  4. In that case graphic representation of digging is just a post-process of your gameplay mechanic work.

Hope that will help you in your research!