Taking inspiration from a game by Vancouver local indie Time Flies Studios called Abyssal Merge. You can play test it now, it mashes Space Invaders and Suika into a multitasking challenge with an awesome cthulic art style and satisfying progression.
Playing it sent me down a rabbit hole looking at variations of Bubble Shooter and Suika games.
There are heaps of variations on Bubble Shooters.
Suika seems less common judging by search engine screenshots but there are a bunch of them on Itch. Here’s the original:
Suika games use 2D physics. Drop fruits in the box. When two like fruits collide they combine to form the next level of fruit in a progression of cherry -> strawberry -> grapes -> etc. all the way up to pineapple, canteloupe, and watermelon.
I wanted to try a variation where you shoot particles which repel each other. You need to overcome that repulsion to cause a reaction, producing the next stage of the particle.
So I wrote up a quick particle simulation where particles push each other away but if they do collide they form the next stage particle.
After shooting a bunch more particles into the scene.
They’re all crowding the edges as they try to get away from each other. The ones in the middle move endlessly, repelling off the wallflowers.
Right now it’s not very fun.
- It’s kinda hard to hit moving particles.
- Very few chain reactions which are really the key part of the genre.
- You need to shoot a lot of particles to get anywhere and most collisions are random, not planned.
I think I need to steer back toward the genre norms a little. Find some way to get the particles to be fixed (more or less) into place. Maybe like particles attract but mismatched particles want to keep each other at a certain distance. Maybe that’ll form lattices kinda like Bubble Shooter.
…
Took me a while to figure out the function that I want for attraction / repulsion.
The idea here when the particles are close together, x is small and I want lots of repulsion so very negative. As you approach x = 50 it flattens out to zero so that’s kind of a happy spot. Then as you move farther away there’s attraction that peaks at x = 80 and then falls off because the particles are too far to interact.
I want to be able to tweak the values for x = 50 and x = 80. Right now a = 50 but b = 110 which is 50 + 2*(80 - 50). So if c = 80 then b = a + 2*(c - a) which is equivalent to b = 2c - a and c = (b - a) / 2.
f(x) = cos( (x - a - c) * PI/180 * 180 / c ) + 1
Nice, it’s actually simpler. I can drop the 180/180.
f(x) = cos( (x - a - c) * PI / c ) + 1
Okay that was dead wrong but I got there eventually.
This has zero basis in the real world but let’s see how it behaves.
Tweaked the values a bit. The first of many tweaks, I’m sure. But it’s looking pretty sweet.
Feels completely different but it’s heading in a much better direction.
I’ll want to increase the resting radius and attraction radius as the particles grow. Everything starts to overlap when they get bigger which makes sense.
Also need an attractor or maybe gravity or something to control where the clump goes.
And there’s an issue when two separate clumps form and then later join together. Well, maybe not an issue. It’s kinda cool to see the two combine and have a chain reaction of particles leveling up.
It’s a cool toy to play with. That’s a good sign.
There’s still a question as to whether I can control the system enough to turn it into a game.