Destructible Terrain for Phaser 3

Hi guys, I’m writing a helper library on destructible terrain system, or a system use to create game like Worms. I use it for my own game, and I think it might be helpful for someone out there who want to use it as well.

The screenshot showing 4 destructible objects.
* Terrain blocks are rendered with hollow green frames.
* Destroyed blocks are rendered with hollow red frames.
* The bottom right object is constructed by using other destructible objects. Rendering by textures.
* Yellow double circles, showing ray-to-mouse-position collision statuses with all objects.

The project is using Phaser 3 and Typescript. Quad-Tree algorithm has been used in the project .

Features
* Support draw/erase terrain with circles, triangles, rectangles, lines
* Destructible objects base class, allow extends, support draw/erase with another destructible object.
* Support collision check with static or moving points, lines.
* Examples

For more details, please check out the link to Github:

It’s free to use under MIT license. hope it can save some work for someone.
I’ll be continuing working on the project, any suggestions are welcome.

Cheers,
Jackson

9 Likes