• 2D
  • How to make an "outline-only" asteroid sprite.

For example, in the Asteroids arcade game, the asteroids are "outlines only" so you can see "outlines" of other asteroids as they pass "thru" each other. How would that be accomplished in Godot? A shape without a texture? A texture with transparency in the middle? Thanks in advance.

You should be able to make a sprite that is the outline of an asteroid and use that. Or are you asking if Godot has a sprite editor?

If you are specifically working on a classic asteroids clone then polygon 2D might make sense, since the original was making use of vector drawn asteroids.

4 days later

Ah this is GREAT, Megalomaniak. Exactly what I needed. Thanks!

Hmmm, a few questions about using polygon 2D:

  • Can I make it outline only with transparency inside?
  • It seems that Godot has drawing capability so could I just draw the lines?
  • If so, then is this performant?
  • Or should I use a sprite instead?
  • If so, I heard Inkscape (or something like that) is good? Any other suggestions?

Many thanks in advance!

Drawing is another option yes, probably easier than trying to create a barycentric coordinate system for the polygon object, especially since you'd need a way to mask out all the internal edges then.

Personally I'd just create a scale down duplicate of the polygon that would draw over the other with a different color. K.I.S.S. and all that.

thanks again. i'll probably try drawing because i want the inside to be transparent so the overlapping asteroids are visible.