Original Source
- Original title: MV Particle Engine
- Original author: Iavra
- Original date: January 5, 2016
- Source thread: https://forums.rpgmakerweb.com/threads/mv-particle-engine.54336/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugins In Development
Summary
A while ago, i started creating a wrapper for Proton (http://www.a-jie.cn/proton/), that can be used in MV. I've come to a workable solution, that can be accessed here: For a simple demo, do the following steps: - Get Proton from its download page (http://www.a-jie.cn/proton/build/proton-1.0.0.min.js), rename the file to "proton.js" (or anything, that doesn't contain dots in the filename) and add it as a plugin. - Get the plugin from my pastebin and add it to your game. Leave the plugin parameter as-is, for now.
Archived First Post
http://pastebin.com/LgtBbkjN
For a simple demo, do the following steps:
- Get Proton from its download page (http://www.a-jie.cn/proton/build/proton-1.0.0.min.js), rename the file to "proton.js" (or anything, that doesn't contain dots in the filename) and add it as a plugin.
- Get the plugin from my pastebin and add it to your game. Leave the plugin parameter as-is, for now.
- Add the attached image to your "img" folder. It will be used to draw particles.
- During the game, paste this in the console and execute it:
var layer = IAVRA.PROTON.getLayer('default');layer.blendMode = 1;SceneManager._scene.addChild(layer); emitter = new Proton.Emitter();emitter.rate = new Proton.Rate(new Proton.Span(10, 15), .1);emitter.addInitialize(new Proton.Mass(1));emitter.addInitialize(new IAVRA.PROTON.Target('img/particle.png'));emitter.addInitialize(new Proton.Position(new Proton.PointZone(Graphics.width / 2, Graphics.height / 2)));emitter.addInitialize(new Proton.Life(1, 1.5));emitter.addInitialize(new Proton.V(new Proton.Span(1, 2), new Proton.Span(0, 360), 'polar'));emitter.addBehaviour(new Proton.Color('#C97024', '#290000'));emitter.addBehaviour(new Proton.Scale(0, Proton.getSpan(5, 10)));emitter.setLayer('default');emitter.emit();IAVRA.PROTON.addEmitter(emitter);If everything went right, you should now see an animated "fireball" above your scene, like this:
This approach has a couple of disadvantages:
- Proton updates emitters based on real time, so you can't pause them in any way (as far as i know).
- All emitters are updated by the same Proton instance, since the instance accesses global objects. In theory, it's possible to create multiple Proton instances, but everytime you do so, it would reset the Proton.pool, which holds all particle instances.
- We can't (easily) use PIXI.SpriteBatch, which should be faster than PIXI.DisplayObjectContainer, since it ignores the "tint" property (and possible others) of the sprites contained in it.
I posted this in "Development", since this is basically as far as i've come and i'd like to hear your opinions and suggestions for implementing or creating a particle engine for MV.
The last solution for me would be to reimplement Proton (unmodified version here: http://www.a-jie.cn/proton/build/proton-1.0.0.js) for MV, which would certainly take a good amount of time, but gives me the option to optimize it for MV/PIXI.
Protected download
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadReferenced Images / Attachments
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...
