Particle System without libraries?

Are there any good particle systems that are effective/good-looking that don’t utilize LWJGL, OpenGL, etc.? I realize that there are plenty of good particle systems with the usage of these libraries, but I’m not wanting to make the full transition to these yet; I would like to stay with Java2D. Does anyone have code for good particles, or a step in the right direction to making somewhat professional ones? Thank you.

This is a nice one.

Okay, it isn’t Java2D. It’s better than Java2D…it’s JavaFX.
JavaFX is standard with Java now. It has many advantages over Jav2D/Swing, including being much more aligned with the functional programming paradigm and many new Java features like lambdas.

The code for this program is worth checking out.

It looks really nice, I’ll admit. Is there a way to implement it without directly using JavaFX? Like, I know I have to extend Application and whatnot, is there a way around it? Can I use this engine AND use Java2D together?

I don’t know any way (or reason) to use JavaFX and Java2D at the same time in the same stage/window. JavaFX has ways to running Swing controls, I think. I really haven’t looked closely into this.

If you want an easy intro to JavaFX, this Java-Gaming tutorial could be helpful.

Otherwise, I recall that others have made particle systems and posted code here before, a few years back.

I tried a search on “particle system Java2D” in the local search box. Several threads came up. Maybe StumpyStrust’s tutorial will be a help get you what you want.

That is actually a pretty good tutorial for a basic particle system.

well back in ye olden days I used to write one in Java2D. I mean the basics are very easy of course, you create new sprites per time x, they have a lifespan, they may fade over time, they get destroyed or better yet pooled, you can set any texture. and you apply a speed vector to them with randomness, well all attributes have randomness.

so you can probably do the basics really yourself in couple of minutes.

I remember back in the day on my single core laptop I could do 8- 20 k particle with java2D before dropping from 60 fps, that was without anything else of course
Given that you got better performance now and you usually only need like 10-200 particles even for complex effects, you are probably fine yo

I apparently I wrote this in like 2011: https://puu.sh/uScTi/42894cc70a.zip

Maybe it will help, but like I said its very basic, might be more confusing.