Jump to content

- - - - -

Destructing spaceships

dretruction 2d spaceship
4: Adsense

Destructing spaceships
  • SpaceBeam : Background planets
  • Different spaceships, different behaviours

Structure of breaking
These last days I worked on spaceship structure. As I want it to be break nicely, I built some kind of structure from ships described in text files. The result is not perfect yet, but it works, ships can be broken firing at them ^^

Here's an image of a ship structure, built automatically starting from cockpit and kinda path-finding in the ship (I highlighted a ship in red to see arrows better).

Posted Image

  • One element is only attached to a single other. This leads to quite "weak" structures, that is what I want. If you break a block all the connected parts will be "freed" from main ship.
  • Unlike Captain Forever, the ships will break down into smaller pieces (they won't be destroyed). These parts, in certain cases, will continue to live as independent ships (yes, like lizard tail : ). If a ship is broken in two parts, and each one has engines, they will try to flee (or even attack the player if they have weapons left).


As you can see, structure is already important. With a single shot on the side, I can easily break the big square in 2 parts, because its structure is made in "S". But after this, i shoot multiple time in the center, with nearly no effect. Fighting strategy coming Posted Image

Apr 16 2012 10:13 AM
I like what you're doing
Apr 17 2012 09:32 AM
Thanks. As you can see it's more an iterative way of working than a fully designed game !
I'll keep posting my future updates here (now I'm still working with spaceship structure, there are lot of possibilities designing spaceships !!)
Apr 18 2012 05:58 AM

It looks good. I doubt I could make anything like that, so my criticism next is from a player point of view rather than a development one.

The ships look like all neighbouring elements are connected to each other. The player cannot see how the connections are actually winding paths. This means from the player's point of view the breaking reactions to shots appear unintuitive. If I felt this was just my personal opinion I wouldn't say anything, but I suspect a lot of players will have the same opinion about it. It isn't obvious why a single shot in one place will split the ship in half but a shot elsewhere has no effect. Perhaps you are planning something to alleviate that, although I doubt anything could.

You say you want the ships fragile which I understand, but cant you achieve the same effect by connecting all elements to their neighbours and allowing attacks to "chew through" the body until they cut through? The interior elements of a ship could be slightly or very explosive so once you've chewed through the hull layer you could "split" a ship in half really quick.

Anyway that is supposed to be constructive criticism although I realize it is annoying in suggesting a system you've worked on for days is redone.
Apr 18 2012 10:02 AM
Don't worry, positive criticism is always welcome :) I expose my work on this blog to have feedback, like you do, so... thank you !

But you are right, if player doesn't know the structure (like in the video), he will be frustrated.

I would like to have a more subtle way of destroying ships than just breaking the outside then the inside. Two visually identical ships could have a different structure and be beaten different ways. I think gameplay would be more interesting.

Then the solution, from my point of view, is to have player to better understand the structure. How ?
  • I reworked the structure algorithm : it starts from the -blue- cockpit and then makes some kind of tree structure much more logical than previous "snake" structure
  • I could display/orient the graphical blocks depending on where they are attached and have them less symmetrical
  • Maybe a display mode "laser scan" could display ship structure for a short time (I like this one)
If all this doesn't work (from a gameplay point of view), I will switch back to another way of connecting parts (like the one you suggested). this won't be a lot of change, as the structure algorithm is not merged with the destruction algorithm. In this case, I'll try your approach (that could work but is more classical).

Check out the results from the new algorithm. It could nearly be understood without displaying it.

Posted Image

What do you think of it ?
Apr 18 2012 10:17 AM
yes that's a lot more intuitive as it's like a skeletal structure and could probably be understood without displaying it. Perhaps there's a middle ground where instead of white arrows that are obviously an overlay there could be tubing on top of the ships hull that matches the skeleton but is part of the ship.
Apr 18 2012 03:22 PM
Sure, white arrows are debug display only, it won't be displayed like this at the end !
I'll think about how to display that "skeleton"....
Apr 19 2012 04:29 PM
I'd just like to say that this is a pretty cool idea altogether. I am in favor of the "laser scan"-display mode, maybe associated with a timer of sorts (so it doesn't show always). I think that could look good if done right. Good job and keep it up =)

Note: GameDev.net moderates comments.