In chemistry we learn about intermolecular forces, and in physics we learn about gravity. With a love for particles, I decided to make a relaxing game that lets users create their own galaxy and keep their brain focused while relaxed.

You move your mouse to attract tiny particles, which collide and merge, gaining mass to form stars. Then growing a star too large may form a supernova, which collapses into a black hole, sucking particles and stars in. Don't worry though! Black holes eventually explode into new particles and stars. Create 3 or more stars to form a constellation, which you can name whatever you'd like!

This was built using HTML in a GitHub repository. The physics/particle collision part for creating the black hole was pretty difficult, especially when the black hole would constantly regenerate and wipe everything off the screen. It was also difficult to get the constellation naming part down, as the constellation names or lines connecting stars wouldn't move with the stars. I'm proud of the graphics - I think the colors, glowing stars, and supernova to black hole effects are pretty nice. I'm also proud of the particle movement logic!

I learned a lot about UI in designing the canvas for this game, and I also learned a lot about particle motion. The biggest thing I learned, though, was having a systematic way to approach debugging. I hope to add planets with different gravities soon - starting with Earth, then adding Mars, Jupiter, Saturn, etc. Then for each planet, I hope to add moons that can revolve around the planets.

Built With

Share this project:

Updates