Are particles cheaper than sprites?

Discussion and feedback on Construct 2

Post » Tue Sep 02, 2014 10:07 pm

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.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Tue Sep 02, 2014 10:20 pm

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.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Tue Sep 02, 2014 10:22 pm

I'd definitely expect some miniscule performance difference, but yeah, anything above that would be news to me.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Tue Sep 02, 2014 10:26 pm

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.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Tue Sep 02, 2014 10:47 pm

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.
B
61
S
22
G
10
Posts: 647
Reputation: 10,453

Post » Wed Sep 03, 2014 12:05 am

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.
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Wed Sep 03, 2014 3:56 pm

@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 : )
Image | @AurelRegard on twitter
B
19
S
6
G
1
Posts: 307
Reputation: 2,500


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests