Abholos - Dev Log #4 - Destructible Ships
Today, as well as working on procedural generation for the exterior for the ships (which I'll cover in another dev log), I started work on the destruction of ships.
All elements of this are in the early stages, particularly graphically, but the concept is that whenever a chunk of the ship is destroyed, a variation on a flood-fill algorithm is used to work out how many separate sections the ship is now in. If there is only one then everything continues as it was but, if there are more than one, then additional "ships" are spawned off, with all the properties and functionality of the original (aside from mass and velocity/angular velocity which are re-calculated based on the new volume ratios).
This means that each part of the broken up ship can continue to exist and function as a standalone, and boardable ship. Further down the line, this will of course have other impacts, such as turrets and engines which are still connected to chunks of the ship can still be used/controlled by your, or any crew that weren't sucked out into space during the destruction.
I was pretty pleased how well and quickly this part came together and am getting more and more excited about this project!
Leave a comment
Log in with itch.io to leave a comment.