All examples · Experiments · As Markdown, for AIs

Energy shield

What this example shows

A plasma cannon against a shield. Aim with the mouse, hold the button or space to charge and let go to fire. The dome ripples where it is hit, cracks and turns pink as it runs low, shatters at nothing and grows back. Left alone, the cannon fires by itself.

The dome is one sprite with a material written for both cards. Its honeycomb and its cracks are pictures painted with createPixels and handed to the shader as maps, read at localUv(); the cracks grow with updatePixelTexture as it weakens. The last six hits are vec4 knobs (where, when, how hard) the shader turns into rings and flares, and its light is cut into four dithered steps per pixel of the dome, so it stays as blocky as the art. Around it: particles that bounce off the ground, shockwave and bloom, and sounds from useSound's synthesizer.

Starting
Starting
—