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
Get Godot Polygon 2D Fracture System
Godot Polygon 2D Fracture System
2 scripts for fracturing 2D polygons in the Godot Engine 3.2+ & 4.2+.
Status | Released |
Category | Tool |
Author | Dave Green |
Tags | 2D, Destruction, fracture, Godot, polygon |
More posts
- Godot Polygon Fracture 2.0 ReleaseJun 27, 2024
- Update v1.3.0 - Point Fracture and Texture SystemApr 15, 2021
- Update v1.2.0 - Dynamic Mouse Cut SystemApr 08, 2021
- Godot Polygon2D Fracture - Cutting Update (v1.1.0)Apr 04, 2021
Leave a comment
Log in with itch.io to leave a comment.