Destructable terrain

Hello everyone,

Most of you probably don’t know me, but I run a very poorly visited actionscript portfolio. Been active in Flash for some time in the past, and a hobbist scripter nowadays.

However, I’m facing a very annoying problem with ActionScript that I can’t seem to figure out. I’m creating somewhat of a game, which has destructable terrains. Since I am not a game developer, I have no idea how this principle works, but to use it with vectorized object, I did it as follows:

*All the terrains in my game a created dynamically, and every corner in those object is stored in an array. A loop run past all the points, and draws the object (API). This enabled me to use hittest. When I shoot at the terrain, the positions of the (affected) points are shifted into the right directions. *

The problem I am facing now, is that I do not want my terrain to be as static it is now. For example, (and this is critical in my game), I want to be able to shoot a circle in half… Look at this: (also gives more depth on my destructable terrain theorie)

this is my circle:

here is the point I am going to collide:

the speed and mass of the bullet determen the range of affected points:

finally the points are shifted:

This works great, I am pretty proud of this method, for it is fast, easy to calculate. However, my problem is when I shoot my circle in half, I cannot draw it correctly anymore. I need to be able to trace when I have more then one part, and split the array up into more arrays… Otherwise, the two parts will always be connected with each other…

I do not expect a solution, but I would like some of you to help me brainstorm. How can I construct this so that it works the way I want?

Everybody many thanks,

An oldy: Eric Jr.