Update v1.4.0 - Polygon Restoring & Supershapes


Polygon Restoring

I worked on my game Fracture Hell which is a simple 2D top-down bullet hell game. I wanted to implement a system for healing. Which meant in the case of Fracture Hell to implement a method for restoring polygons to their original shape. After testing various different algorithms I finally got the system to work. 

So I thought I should also add this functionality to this tool because if you can fracture, cut, and destroy polygons in a number of different ways, it would also be nice to be able to restore ("heal") them. 

That is what this update is about. I implemented the restoring system which is now called the advanced method of restoring polygons. The advanced method is very flexible and allows for restoring a polygon by any amount but it also has a performance cost. The algorithm grows the polygon by the specified amount and restricts the new polygon to the shape of the original polygon.



Because of the performance cost of the advanced method, I also implemented a simple method. The simple method uses the polygon restorer class. The class is used to store polygon states in a stack. The first element (bottom) of the stack represents the original state of the polygon and the last element (top) of the stack represents the previous state. This method is very lightweight but only allows for discrete steps in restoring a polygon.

Advanced



Simple





Superellipse & Supershape

Thanks to The Coding Trains Coding Challenges I also added functions for creating Superellipse and Supershape polygons to the polygon lib.



If you want to check out this tool in action:

-  I am going to use this system in my game project Nomads Sky.

-  This tool is currently in use in my game Fracture Hell.

Please consider supporting me here on itch or on Ko-Fi if you like my work, it makes it that much easier to keep working on projects like this.


Thanks for reading!

Files

Polygon 2D Fracture Demo (v1.4.0) 13 MB
May 25, 2021
Polygon 2D Fracture Source (v1.4.0) [newest] 11 MB
May 25, 2021
godot-polygon2d-fracture(v1.4.0-stable)-html5.zip 3.9 MB
May 25, 2021

Get Godot Polygon 2D Fracture System

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.