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.

To share the invader you generated, just copy the URL.

Why?

For fun of course... and galactic 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.

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

I wrote an interactive blog post on how it works, I hope you'll check it out!

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.

Gallery

The last 24 invaders you generated. Press "r" to generate more.