Dig a Hole Kit – 3D digging engine Jobs+Burst
Complete digging game framework: Burst-compiled Marching Cubes terrain, buried ores, currency, an extensible upgrade system, and slot-based save/load
by Code Trigger
Price History +
Dig a Hole Kit is a production-ready framework for building mining, digging, and excavation games in Unity. It delivers a destructible voxel terrain powered by Marching Cubes and a Burst-compiled Jobs System, plus the surrounding systems you need to ship a digging game loop: player controller, ore collection, economy, upgrades, and save/load.
Drop the included prefabs into a scene, press Play, and you are digging. Every system is modular, documented, and designed to be extended without touching the core.
Core Features
- Destructible Voxel Terrain: Marching Cubes mesh generation with a Burst-compiled Jobs System, chunk-based layout, and real-time dig/fill inside a configurable XYZ terrain volume.
- Cave Volumes: Carve SDF-based caves (Sphere, Box, Capsule, Cylinder) with Perlin noise roughness for natural-looking tunnels, from a dedicated custom Editor tool.
- First-Person Player Controller: Walk, jump, mouse look, and a fuel-gated jetpack with regeneration delay — built on Unity's CharacterController.
- Interactable Ore System: Buried ores that auto-collect when the player digs them out, defined via ScriptableObjects and fully extensible with custom definition types.
- Ore Inventory: Type-based storage with upgradeable capacity and event-driven UI hooks.
- Currency & Economy: Gold balance tracking with singleton access, spend/earn API, and automatic persistence.
- Upgrade System: A shared IUpgradeTrack interface drives tool, jetpack, and backpack upgrades through one consistent shop UI — add new upgradeable systems without touching the shop code. Per-level costs are hand-set per level, with an optional in-Inspector curve generator to fill the whole cost table in one click.
- Save System: Central JSON-based save manager with multiple save slot support, saving only the terrain chunks that were actually modified (not the full world) plus player currency, ores, and upgrade levels.
- Dig Tools: A shared MiningMethodSO base (raycast, projectile, and throwable variants included) with per-level radius/strength/cooldown bonuses, so new tools plug into the same upgrade and shop systems automatically.
Suitable For
Mining games, resource-gathering adventures, dungeon diggers, and any first-person game that needs destructible terrain inside a bounded play area.
Customization
Every system is exposed through clean public APIs and ScriptableObject-based data assets. Terrain size, voxel resolution, ore types, tool stats, upgrade costs, and economy values are all tweakable from the Inspector, no code changes required. Create new ore types, custom dig tools, or entire new upgradeable systems by subclassing the provided base types and interfaces.
What's Included
- Fully configured sample scene with UI, ores, caves, and save/load integration.
- Ready-to-use prefabs for the core systems.
- Complete source code (C#).
- Documentation covering the main modules.
Requirements
- Burst and Jobs packages (standard Unity dependencies).
Limitations
- The destructible terrain operates within a configurable XYZ volume defined at setup. Digging and filling are supported only inside this bounded area; the package does not provide infinite or procedurally streamed worlds.
- The player controller covers walking, jumping, mouse look, and jetpack flight. It does not currently include sprint, crouch, or custom step-climbing beyond CharacterController's built-in step offset — if your game needs those, plan to extend FPSController yourself or budget time for us to add them in a future update.
- There is no built-in player health/damage system in the current version — only jetpack fuel and upgrade levels are tracked per player.
- Input is handled through Unity's legacy Input Manager, not the new Input System package.