- Home /
2D digging with dynamic navmesh
Hi
I'm currently thinking about making a game that requires the ability to dig through soil. I'm not taking about digging through a terrain, since I intend to have the game running mostly in a 2d viewport. I do also want to have a 3D view when taking over a miner and seeing through their eyes, ala dungeon keeper "possession" mechanic.
If you can imagine a mining game, where you control miners that have to dig down through the soil to various positions, haul out stuff they dig like coal and diamond, and then make their way back to the end of the tunnel to continue digging.
In my mind, I think this would need the new dynamic navmesh so that as the tunnel continues to grow, the navmesh grows with it, but my problem is that I've no real idea how to implement the soil. A terrain wouldn't work since it's basically a flat plane that has peaks and troughs (I think), and afaik can't be represented in a side-on 2D view. Voxels might work but I intend to have this game run on mobiles, and my experience with marching cube shaders leads me to believe it could be very heavy on the gpu. Plus I don't know how a navmesh would work with cubed environments, although perhaps that's not an issue if the step height is set properly?
Do any of you gaming gurus have an idea how I can tackle this problem? My research on google always seems to come back to modifying terrains at runtime, but unless I'm completely wrong in what I say above I just don't see that working for my idea.
Any thoughts, pointers to existing examples or research, or general suggestions on how to tackle my problem will be gratefully received.
Cheers
Hi, I know this is like 2 and half years old post, but did you figure out how to solve the soil problem, as I’m running in a similar situation!
Answer by JxWolfe · Jun 19, 2017 at 12:41 AM
hmm... my thoughts are you instantiate some empty gameObjects and put them on the corner/corners and have your carts follow the lines up to the surface. Because a nav would be hard if not impossible.
Answer by Snouto · Jun 20, 2017 at 04:47 AM
Thanks for the reply @JxWolfe. I suppose I should be concentrating more on the actual soil and how to "dig" it, and worry about navigating the tunnels afterwards, because if I can't figure out how to do the soil the rest is immaterial. I'll keep your idea in mind should I solve the soil issue!