diff --git a/data/particles/burst.png b/data/particles/burst.png new file mode 100644 index 00000000..29fc40c8 Binary files /dev/null and b/data/particles/burst.png differ diff --git a/data/particles/fleck.png b/data/particles/fleck.png new file mode 100644 index 00000000..db12b410 Binary files /dev/null and b/data/particles/fleck.png differ diff --git a/data/particles/smoke.png b/data/particles/smoke.png index 9125fc42..84deca96 100644 Binary files a/data/particles/smoke.png and b/data/particles/smoke.png differ diff --git a/src/Marble.hx b/src/Marble.hx index 991ad294..b17fd407 100644 --- a/src/Marble.hx +++ b/src/Marble.hx @@ -78,24 +78,28 @@ enum Mode { } final bounceParticleOptions:ParticleEmitterOptions = { - ejectionPeriod: 80, + ejectionPeriod: 5, ambientVelocity: new Vector(0, 0, 0.0), - ejectionVelocity: 3, + ejectionVelocity: 6, velocityVariance: 0.25, - emitterLifetime: 250, + emitterLifetime: 50, inheritedVelFactor: 0, particleOptions: { - texture: 'particles/star.png', - blending: Alpha, + texture: 'particles/burst.png', + blending: Add, spinSpeed: 90, spinRandomMin: -90, spinRandomMax: 90, - lifetime: 500, - lifetimeVariance: 100, - dragCoefficient: 1, + lifetime: 400, + lifetimeVariance: 50, + dragCoefficient: 0.5, acceleration: -2, - colors: [new Vector(0.9, 0, 0, 1), new Vector(0.9, 0.9, 0, 1), new Vector(0.9, 0.9, 0, 0)], - sizes: [0.25, 0.25, 0.25], + colors: [ + new Vector(0.5, 0.5, 0.5, 0.3), + new Vector(0.3, 0.3, 0.2, 0.1), + new Vector(0.2, 0.2, 0.1, 0) + ], + sizes: [0.8, 0.4, 0.2], times: [0, 0.75, 1] } }; @@ -276,7 +280,7 @@ class Marble extends GameObject { this.bounceEmitterData = new ParticleData(); this.bounceEmitterData.identifier = "MarbleBounceParticle"; - this.bounceEmitterData.texture = ResourceLoader.getResource("data/particles/star.png", ResourceLoader.getTexture, this.textureResources); + this.bounceEmitterData.texture = ResourceLoader.getResource("data/particles/burst.png", ResourceLoader.getTexture, this.textureResources); this.trailEmitterData = new ParticleData(); this.trailEmitterData.identifier = "MarbleTrailParticle"; @@ -830,7 +834,8 @@ class Marble extends GameObject { function bounceEmitter(speed:Float, normal:Vector) { if (this.bounceEmitDelay == 0 && this._minBounceSpeed <= speed) { - this.level.particleManager.createEmitter(bounceParticleOptions, this.bounceEmitterData, this.getAbsPos().getPosition()); + this.level.particleManager.createEmitter(bounceParticleOptions, this.bounceEmitterData, + this.getAbsPos().getPosition().sub(normal.multiply(_radius)), null, new Vector(1, 1, 1).add(normal.multiply(-0.8))); this.bounceEmitDelay = 0.3; } } diff --git a/src/shapes/SuperJump.hx b/src/shapes/SuperJump.hx index 7b0c785b..d1a5bb10 100644 --- a/src/shapes/SuperJump.hx +++ b/src/shapes/SuperJump.hx @@ -12,7 +12,7 @@ import src.MarbleWorld; final superJumpParticleOptions:src.ParticleSystem.ParticleEmitterOptions = { ejectionPeriod: 10, - ambientVelocity: new Vector(0, 0, 0.05), + ambientVelocity: new Vector(0, 0, 0), ejectionVelocity: 1, velocityVariance: 0.25, emitterLifetime: 1000, @@ -27,7 +27,11 @@ final superJumpParticleOptions:src.ParticleSystem.ParticleEmitterOptions = { lifetimeVariance: 150, dragCoefficient: 0.25, acceleration: 0, - colors: [new Vector(0, 0.5, 1, 0), new Vector(0, 0.6, 1, 1), new Vector(0, 0.6, 1, 0)], + colors: [ + new Vector(0.38, 0.38, 0.38, 0), + new Vector(0.34, 0.34, 0.34, 1), + new Vector(0.3, 0.3, 0.3, 0) + ], sizes: [0.25, 0.25, 0.5], times: [0, 0.75, 1] } diff --git a/src/shapes/SuperSpeed.hx b/src/shapes/SuperSpeed.hx index 37842d5a..97c36133 100644 --- a/src/shapes/SuperSpeed.hx +++ b/src/shapes/SuperSpeed.hx @@ -13,28 +13,28 @@ import src.MarbleWorld; final superSpeedParticleOptions:ParticleEmitterOptions = { ejectionPeriod: 5, - ambientVelocity: new Vector(0, 0, 0.2), + ambientVelocity: new Vector(0, 0, 0), ejectionVelocity: 1, velocityVariance: 0.25, emitterLifetime: 1100, inheritedVelFactor: 0.25, particleOptions: { - texture: 'particles/spark.png', + texture: 'particles/smoke.png', blending: Add, spinSpeed: 0, spinRandomMin: 0, spinRandomMax: 0, lifetime: 1500, - lifetimeVariance: 150, - dragCoefficient: 0.25, + lifetimeVariance: 750, + dragCoefficient: 4, acceleration: 0, colors: [ - new Vector(0.8, 0.8, 0, 0), - new Vector(0.8, 0.8, 0, 1), - new Vector(0.8, 0.8, 0, 0) + new Vector(0.42, 0.42, 0.38, 0.1), + new Vector(0.34, 0.34, 0.34, 0.1), + new Vector(0.30, 0.30, 0.30, 0.1) ], - sizes: [0.25, 0.25, 1], - times: [0, 0.25, 1] + sizes: [0.3, 0.7, 1.4], + times: [0, 0.5, 1] } }; @@ -51,7 +51,7 @@ class SuperSpeed extends PowerUp { this.useInstancing = true; ssEmitterParticleData = new ParticleData(); ssEmitterParticleData.identifier = "superSpeedParticle"; - ssEmitterParticleData.texture = ResourceLoader.getResource("data/particles/spark.png", ResourceLoader.getTexture, this.textureResources); + ssEmitterParticleData.texture = ResourceLoader.getResource("data/particles/smoke.png", ResourceLoader.getTexture, this.textureResources); } public override function init(level:MarbleWorld, onFinish:Void->Void) {