676
Programming / Re: Explosion Graphics
« on: September 12, 2014, 06:28:40 am »
In regard to explosion size (blastRadius) ive brought this up too.
The Blast Radius setting should dictate how explosions decrease in strength rather than cut them off at a certain amount.
This way you can put blastRadius: 15 on a hand grenade that does 50 damage and it will spread out to 15 square radius.
The way to do this is as follows. Any time the engine calls for reducing the damage for an explosion based on its distance from source . . . the amount that is reduced is 10 * (Multiplier) per square. Rather than a flat 10 like vanilla.
That multiplier would be ( damage / (blastRadius * 10) ).
Likewise setting the blast radius smaller than usual will still confine the explosion to a smaller area, but it would do it because it is reducing the damage by more than 10 per square from source.
Likewise I think this should also affect the simulated size of the explosion as far as Sprite Spread is concerned (sprite spread treats the damage as if it were times ( (blastRadius * 10) / damage) ). But not necessarily the Density . . . the Density should remain the same.
That way you can get a small explosion that appears to be jam packed with explosion sprites, reflecting how much damage it actually does.
The Blast Radius setting should dictate how explosions decrease in strength rather than cut them off at a certain amount.
This way you can put blastRadius: 15 on a hand grenade that does 50 damage and it will spread out to 15 square radius.
The way to do this is as follows. Any time the engine calls for reducing the damage for an explosion based on its distance from source . . . the amount that is reduced is 10 * (Multiplier) per square. Rather than a flat 10 like vanilla.
That multiplier would be ( damage / (blastRadius * 10) ).
Likewise setting the blast radius smaller than usual will still confine the explosion to a smaller area, but it would do it because it is reducing the damage by more than 10 per square from source.
Likewise I think this should also affect the simulated size of the explosion as far as Sprite Spread is concerned (sprite spread treats the damage as if it were times ( (blastRadius * 10) / damage) ). But not necessarily the Density . . . the Density should remain the same.
That way you can get a small explosion that appears to be jam packed with explosion sprites, reflecting how much damage it actually does.