Space Invaders Generator

What is this?

A Space Invaders generator I made for the Creative Coding Amsterdam code challenge. It is written in TypeScript and open source.

Why?

For fun, of course... galatic domination too!

How?

Turning on debug mode will probably give you an idea, but I'll try to summarize.

I first generate a vector polygon for the body. Then I take the lowest side point of the polygon and extend a zig-zag line from it. I "inflate" that line to create a tentacle. Horns are made in a similar way. Since they're symmetrical, I only generate one side and mirror it.

voala - we got ourselves an invader! Next, I rasterize the vector shapes onto a pixel grid. Finally, I slap a pair of pre-made eyes on top - and voila, we've got ourselves an invader!

I plan to write an interactive blog post on how it works, hopefully I'll find the time to do it.

Keyboard shortcuts

* C - toggle controls
* R - randomize (get a new invader)

Shameless self promotion

If you like my invaders, you might want to check my blog for more projects.