milesturin / Godot-Destructable-Terrain

A smooth contour destructible terrain library for Godot 💣

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Godot-Destructable-Terrain

A 2d destructible terrain system for the open source game engine Godot. Its contour generation is based off of the interpolated variant of the Marching Squares algorithm. The covcave polygons formed by the terrain are decomposed into triangles for the purposes of collision detection (as illustrated by the colored polygons). It utilizes a chunking system which allows for loading and unloading of chunks as well as faster mesh regeneration after terrain modifications. Even extreme cases of terrain creation and destruction run at acceptable speeds, and there is room for vast optimization.

Terrain Demo

A rudimentary platformer controller is included to demonstrate potential uses of the library.

Player Demo

The source code can be found here.

About

A smooth contour destructible terrain library for Godot 💣

License:MIT License


Languages

Language:GDScript 100.0%