Are particles cheaper than sprites?

0 favourites
  • 7 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • Hey all,

    I had a chance to chat with Aurel at PAX the other day, and have a look at the code for The Next Penelope (It's AMAZING by the way!). Something interesting I noticed was that he was using particles for all objects which didn't need collision. i.e. there would be a one-shot particle that would emit one particle with 0 velocity. I don't do this in my game, so we discussed it and we couldn't figure out if particles are actually less intensive than objects when you aren't checking for collision.

    Is this the case? I had always assumed that collision is irrelevant if you don't actually have any collision events with that object, but I can't cite a source for that.

  • Particles may have a little gain, since they are never rotated for exemple (which can be a real issue for some uses) and that expressions for each single particles don t exist (but since the particle object itself has them, that is irrelevant), but the gain should not be that big of a deal and seems more like a habit rather than a justified choice (that may be for an easier time replacing objects with the replace object functionnality).

    If someone has to go that far just for performances, I would suspect that is a micro optimisation, for me the awnser is more "it is a science curiosity question, not a question that would be useful"

    Also not checking collisions won t check them magically, so that is not an explanation I think.

  • I'd definitely expect some miniscule performance difference, but yeah, anything above that would be news to me.

  • Actually, I would say it is possible that they are a little more consuming, since particles are still doing calculs for a motion, even with a speed of 0, that still would cause calculs to be done.

    But it is just a though not based on any real measure.

  • That's surprising! Could Aurel comment on his reasoning? It's not a intuitive call to make so there must have been a thought process behind it.

    Just as a commentor looking in, particles don't have as varied events or frames, so I can't see an inherent positive.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hmm , yeah need a little more context. Like a particle will be destroyed at some point, so as a static image it won't work.

    On the other hand a super lite object does make sense, and I believe it was on the todo list, or at least it was on the one for CC.

  • sqiddster hi there!

    So, yeah, sounds definitely like a habit. I used to be a graphic artist on many games before, and my co-workers always asked me to do things that way for previous projects. Some games I made were for Nintendo DS and other old mobile phones like old Nokia ones, so i guess the "particles are lighter thanks to no collisions handled" only applied in this time OR in particular cases where the CPU perfs are very very low.

    This is my very first HTML5 game, so I guess it's only a habit, with no particular reason now.

    Airscape features many cool visual effects, and seems to run in a very smooth way, after all : )

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)