Squeezy Circle



My latest invention takes after the subgenre of infinite runners akin to the Flash classic Helicopter and the infamous iPhone game Flappy Bird - namely, ones that require the player to finesse a specific input to weave between randomly placed pillars flying at the player on a 2-D plane.

In my case, it's an FSR controlling a sphere. It's particularly jerky, since it's not interpolating the inputs, just assigning them directly to the sphere, but it works well enough. I have a series of blocks objects that steadily approach the sphere, and delete themselves once they're offscreen. They check for collision with the ball only when they're at relatively the same x position, and compare the ball's center coordinate with their own openings. Checking the center of an object as opposed to the entire thing is a practice employed by many 2D 'shmup games, which I am terrible at.

Since I seem to be incapable of writing solid serial communication on my own, I borrowed most of the code from the class Github - but the actual game programming is all my own doing.

p5js sketch code:
https://pastebin.com/WUk8Fwt9
arduino code:
https://pastebin.com/EkTd1fYW

Comments

Popular posts from this blog

veins - a weird visual toy

Stupid Triangle Thing