To this, how can add a circle shape to this list of particle systems and make it appear when you click? Is that even possible? I really don't get how bodies work. Worlds are easy to get though, but still. Let me know if you need the full modded demo code.
To add a new type just create a plain, solid filled circle in a good drawing software such as Illustrator or Inkscape and export a PNG at 32px, which is the size of the others, or whichever size you want.
Put that image in the directory with the other PNG files and add an extra variable to the set.
You could always just put particle graphics on weightless physics bodies, for small-scale effects...
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit! Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Xoria wrote:Right, but if I can't click to draw a body, then I might as well use particles in my case, right?
Well, bodies only have a position, velocity, mass, ect, but no graphical representation. I'm not sure why you are even considering anything else than particles for a particle demo.
Good point lol. I'm using the particle demo as a start point for me to make a space like game w/ planets. A game like this requires a lot of particle effects and those bodies. I planed to make the planets by creating bodies, but it's easier to draw the particle way. (I want my game to feature mainly drawing), so what should I do for the planets?
Well, Box2D is not fit for games set in space, so I'd say write your own collision checking.
It's what I do with my Space game: planets are just tables with x, y and a radius. Then, I iterate over all spaceships and calculate gravity and collisions.