Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Particle System in MV?

eivl

Local Hero
Xy$
0.00
Yeah, this is PixiJS magic. I have been going through it, it looks amazing. What would be really nice is to upgrade the pixi core to the newest version. sadly you can not just upgrade since the newest pixijs is not backward compatible.
Rewriting the modules to have them working would be worth it! ;)
[doublepost=1446815496,1446815003][/doublepost]http://pixijs.github.io/examples/index.html
 

Holder

Towns Guard
Xy$
0.00
That's cool, I tend to like subtle effects with particles - some tend to overdo it. It's always a nice thing to have especially for custom weather effects.
 

eivl

Local Hero
Xy$
0.00
With this you could actually make rain hit the screen, not sure if that is a good idea, but it is possible!
 

Boy Who Codes

Praised Adventurer
Xy$
0.00
Hi Hime. I am actually interested how this can be done in MV. One of the things I'd like to have is probably a portion of the whole system that allows me to control which direction the particle is in and that would be nice.
 

eivl

Local Hero
Xy$
0.00
Then you should look at
JavaScript:
Weather.prototype.initialize
Because if you look at this

JavaScript:
Weather.prototype._updateAllSprites


/**
* @method _updateAllSprites
* @private
*/
Weather.prototype._updateAllSprites = function() {
    var maxSprites = Math.floor(this.power * 10);
    while (this._sprites.length < maxSprites) {
        this._addSprite();
    }
    while (this._sprites.length > maxSprites) {
        this._removeSprite();
    }
    this._sprites.forEach(function(sprite) {
        this._updateSprite(sprite);
        sprite.x = sprite.ax - this.origin.x;
        sprite.y = sprite.ay - this.origin.y;
    }, this);
};
and this

JavaScript:
Weather.prototype._updateRainSprite


/**
* @method _updateRainSprite
* @param {Sprite} sprite
* @private
*/
Weather.prototype._updateRainSprite = function(sprite) {
    sprite.bitmap = this._rainBitmap;
    sprite.rotation = Math.PI / 16;
    sprite.ax -= 6 * Math.sin(sprite.rotation);
    sprite.ay += 6 * Math.cos(sprite.rotation);
    sprite.opacity -= 6;
};
This is just the rain example, the same applies for the other effects.
 

Boy Who Codes

Praised Adventurer
Xy$
0.00
The weather style looks limited, I tried using that and replicating the effect and I don't like it. I am looking for a more advanced and distinct kind of particle movement, that can be simplified the easiest way possible.
 
Top