Just little insight on how the game is made
Well that's in Java, using libGDX, and as you've seen it uses a huge number of particles
I've used simple tricks to make them performant (I don't use the one included in libGDX, I wanted more flexibility) and to make the game more "alive" :
- One class per particles. That's tedious, but it allows me to make them as light as possible
- Almost everything happens only one frame out of two. One out of four or once per second when it's possible.
- You can see that it is very colorful, and every color evolve over time. Well that's all just based on 7 arrays of roughly 40 float, the only thing that evolve for the particles, blocs, paddle or balls is the current index.
- Some indexes are actually floats, for the blocs mainly, that allows me to make them evolve on a sinusoidal curve (I hope that's the right word, English isn't my native language).
- More broadly, I've tried to make everything as smooth as possible. Another example is when a ball hit something it grows, and then shrinks quickly cause it's sized is multiplied by 0.95f. Same logic is applied for the screenshake, the particles, the blur shader, the mini blocs that forms a full bloc... everything
- The number of particles adapt in real time to the fps. It's really simple : On one hand, particles are often generated each frame, so less frames mean less particles. On the other hand I generate a number of particles proportional to the number of fps. Sometimes with a minimum if that's a key element like the balls.
- The physic of the particles is about as simple as possible, but it works quite well : The only collide with the paddle and with three walls. I don't even bother to test the exact collision point, the center is enough, they are either too quick or too small for it to be noticeable anyway.
Well.. That's all I can think of for the moment
Funny detail, beside the background and the tutorial button, the game uses only 1 1x1 texture and 1 32x32 textures (a circle)