Inspiration

I love particles! They are so fun to mess around with and a great way to push your optimization skills to the limit, since efficiency matters more when you're working with more objects.

What it Does

Renders a window with 10,000 particles being emitted from the cursor's position. A panel is provided in the top left corner to allow the user the experiment with how the particles are emitted when certain parameters are changed.

How I Built It

I started off by making an OpenGL render pipeline, then I wrote a batch rendering system (to render all of the quads as a single model). Finally, I created a ParticleSystem class to managed the position, lifespan, and color of the different particles!

Challenges I Ran Into

As I was setting up my OpenGL render pipeline, I ran into numerous issues with nothing being rendered on the screen despite all of the function calls looking correct. This vexed me for a majority of the hackathon time until I tracked down the bug to resetting the number of quads the batch renderer was supposed to render for the batch before rendering (it used the reset value instead of what it was supposed to).

What I Learned

I learned to be careful to check the order in which things are done sooner in my debugging process! I also learned more about how to handle optimized rendering of large quantities of objects!

What's next for OpenGL Particle Demo

I've been working on a custom C++ game engine in my spare time for a while now, and I want to integrate some of the ideas used in this project into a fully-fledged particle editor!

Built With

Share this project:

Updates