I saw this game Clay Jam, that the user can create a path in the sand. The path is a continuous one, and it can varies from a single point to curves.
How one can develop smooth and continuous paths?
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.Sign up to join this community
It renders using bump- / specular maps. Refer to this video. The ground geometry is never modified.
Bumpmaps are just heightmaps used for realistic lighting. To clarify definitions,
Modifying the heightmap to reflect the user's touch-drag would consist of getting the sequence of touch points (optionally adding some interpolation points to provide a smoother path), then connecting them, and calculating the 2D vector between each point-pair on the drag path.
You'd then carve a groove along each such vector. The carving in v-form would be done with a circular "brush" mini-texture that has high intensity toward the centre, and an intensity approaching zero toward the edge... in fact, there is a slight negative intensity toward the edge, as you can see that a lip is created around the furrow. Onto your clean, flat heightmap texture, the brush shape is painted onto/around every pixel/texel between the start and the end of the vector path. The pixel path is probably best calculated with something like Bresenham's Line Algorithm, or even better, Xiaolin Wu's Line Algorithm, which allows sub-pixel accuracy for a smoother path.
Lastly write your pixel / fragment shader to utilise the heightmap texture for lighting, based on light source direction. There are endless sources both on this site and elsewhere online on how to go about producing and rendering bump and specular maps.