• Register

Explode patents. Freeze patents. Set patents on fire. Dissolve them in acid. But they'll fight back. A sidescrolling shooter inspired by the awfulness of patent illustrations.

Post feature Report RSS Hovering: A History

Making a nice hover effect for Patent Blaster turned out to be tricky but ultimately satisfying. Warning: Includes pictures of screaming elephants.

Posted by on

The first thing I implemented for Patent Blaster was creature generation. At first, the program would just print out some stats, then I made a system that would display two creatures next to each other and have them "fight" by subtracting damage from HP until one of them lost. Another stat I put in right at the start was the move mode - sliding, hopping, flying or hovering.

When it came to implementing these, most of them were easy: sliding just meant that as long as you stayed in contact with the ground, you could move. Hopping is just sliding with a constant compulsion to jump. Flying is easiest of all: turn off gravity and move on both axes. But hovering was hard.


It's easy to adjust the amount by which an something is affected by gravity in Patent Blaster, so the thing I tried first was to vary that: a hovering creature would experience slightly negative gravity until it got too far off the ground, and then experience positive gravity again for a while. In practice, this didn't work at all: creatures stayed resolutely on the floor, or drifted away, or moved in ugly jerking up-and-down motions. They also tended to get stuck on the side of obstacles a lot.


I had to think about what I actually wanted: that classic sci-fi hover with the wubwubwub sound and the moving sheets of repulsor energy.


And hovering works exactly like that now: creatures send out little energy sheets downwards. When a sheet hits the ground, the creature that sent it gets an upwards push. Sheets expire after travelling a little distance, and that distance varies a little. This means it's all self-regulating: if a creature gets too high up, most of the sheets fail to connect, and it falls down a little. If you move onto higher or lower ground, you slowly rise or sink to the new level.


I was originally not going to put in hovering as an option for players, but it turns out to be too much fun not to include.


Hover-Elephant Hover-Elephant likes your skin. So Smooth.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: