Ok for my current project I plan to have randomly generated bosses. Each boss ship will be made of parts that attach to each other in a way similar to the freeware PC game "Warning Forever". Could anyone provide a good way to create and store the parts so when one is destroyed all the parts attached to it are destroyed aswell?
Initially I thought of making each part object have a list that would hold attached parts. When the object is updated, it updates all it's local parts from the local part list. I assume that when the part object is destroyed all the attached parts get destroyed too by default.
Is this a good idea? It seems to be getting a bit complex due to a function to add parts that looks alot like the create function to hold base parts in the global "parts_list".
Here is "Warning Forever" honestly one of the best Shmups ever-freeware or not.
http://www18.big.or.jp/~hikoza/Prod/index_e.html
Initially I thought of making each part object have a list that would hold attached parts. When the object is updated, it updates all it's local parts from the local part list. I assume that when the part object is destroyed all the attached parts get destroyed too by default.
Is this a good idea? It seems to be getting a bit complex due to a function to add parts that looks alot like the create function to hold base parts in the global "parts_list".
Here is "Warning Forever" honestly one of the best Shmups ever-freeware or not.
http://www18.big.or.jp/~hikoza/Prod/index_e.html