Optimization for explosion generator please!

Optimization for explosion generator please!

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Optimization for explosion generator please!

Post by Karl »

(at moderators: move the thread to somewhere else if its wrong i dint know where i should post it)

well the issue on the ceg is that like cegs that uses alot of spawners/spawner dependant that (like fire effect, poison , gas etc...) that is heavy resource intensive
yes i know there gives lups but imo its doesn't feel like the ceg one

for example a spawner with a count of 80 and delay of "8 i3"
is it very resource intensive even when there is one particle system called with a count of 1 and particlecount of 2 or 1
and it would look fugly if i need to tone down heavly the lifetime off it

also afaik the explosiongenerator is for AGES not updated when then it was some few changes nothing major that would add new features or better yet making it less resource intensiv

i can upload some examples of cegs that causes performance drop when a few of them exist
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Optimization for explosion generator please!

Post by FLOZi »

There have been some changes recently such as "store all CEGs in one global structure for efficiency" but I'm not sure if that's performance efficiency or maintenance efficiency, or how much effect it will have - kloot can clarify.

It may be that the whole design of the implementation is flawed and needs rewriting (I really have no idea, but I'm guessing that LUPS can do certain effects better & faster), in which case we won't see major improvements in performance any time soon. At the end of the day, complex particle effects are probably always going to be performance gobblers. :wink:
User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: Optimization for explosion generator please!

Post by Karl »

Well but spawner is not that complex and i cannot see it why it is soo resource hungry and that is pissing me off
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Optimization for explosion generator please!

Post by FLOZi »

Karl wrote:Well but spawner is not that complex and i cannot see it why it is soo resource hungry and that is pissing me off
If it's so simple optimize the code yourself.
User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: Optimization for explosion generator please!

Post by Karl »

no i dint meand that i can code c++ but
that spawner is a "simple" thing that just spawns another ceg just like projectiles do
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Optimization for explosion generator please!

Post by smoth »

I don't notice any massive performance loss from cegs.

and i have clouds of dust

Anything can be massively taxing depending on how you ABuse it.
User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: Optimization for explosion generator please!

Post by Karl »

tell me:

http://pastebin.ca/2040183

http://pastebin.ca/2040184

i am trying for ages to make them not so resource intensiv

spawn a few of them and i got immediatly about 20~ FPS drop
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Optimization for explosion generator please!

Post by Forboding Angel »

well on the first one, that is at least 100 particles every time a single one is spawned once. If theya re being spawned repeatedly (for a missile trail or somehting like that, well then that is an asston of particles.

edit: the second one is even worse, at the minimum, 200 particles per spawn.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Optimization for explosion generator please!

Post by smoth »

just one component:
[trailfake]
{
class=CSimpleParticleSystem;

[properties]
{

Texture=explo;
colorMap= 0.75 0.04 0.05 0.01 0.8 0.8 0.0 0.01 0.4 0.4 0.4 0.01 0 0 0 0.01;
pos = 0 r-10 r10, 20, 0 r-10 r10;
gravity = 0, 0, 0;
emitVector = 0 r-1 r1, 0 r-1 r1, 0 r-1 r1;
emitRot = 0;
emitRotSpread = 0;

sizeGrowth = -0.5;
sizeMod = 1.0;

airdrag = 1;
particleLife = 80;
particleLifeSpread = 20;
numParticles = 15;
particleSpeed = 1.07;
particleSpeedSpread = 0.5;
particleSize = 2;
particleSizeSpread = 2;

directional = 0;
useAirLos = 1;
}
air=1;
ground=1;
water=1;
count=3;
}
You are chewing massive amounts of particles because you do not know how to make it efficient. This one part is 15X3 per puff.

You need to work on your effects more.
User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: Optimization for explosion generator please!

Post by Karl »

when i reduce them they look too ugly

when i increase them they are too resource intensiv

edit: on the spawner i mean which should look like the ground is on fire

i know it is 3x15 and it is supposed to be that
look at its emitvector i am using randoms to fake a spike effect
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Optimization for explosion generator please!

Post by smoth »

Computer science:

cheap * well made * fast

choose 2.

want it well made, it will either be cheap or fast.
want it fast it will be cheap or well made.

you cannot have it all.

you want lots of particles fine, you want it to look good, fine, but it won't be fast. I think you are probably able to do it with less particles you just have not figured out how yet. Don't blame the engine code for your inexperience with something.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Optimization for explosion generator please!

Post by knorke »

Maybe it would be good to have parameters for smokeTrail=true ?
ie its thickness, texture etc, like there is for beamlaser.
it would not be a particle effect but could serve as "base" and the trail might look good with fewer extra particles.
User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: Optimization for explosion generator please!

Post by Karl »

um those cegs are explosions and not for cegtag
Post Reply

Return to “Game Development”