Particle System Editor
Posted: Thu Apr 04, 2013 10:05 pm
This editor will let you create/edit particle systems, save them to files and load them into your game (and also load other's files to see what they created!). This editor was created with loveframes.
USAGE
Open the .love at least once so that the save directory can be created. .png files are used for sprites and .pso files are used to store template lists. Both types of files will be loaded if they're in the save directory. So, for instance, after running the editor once, take the Example.pso file and copy it to the save directory (AppData/.../LOVE/Particle Editor or as seen here for other systems). After that you should be able to see Example.pso listed in the editor and you'll be able to load it and see the particle system examples.
INTERFACE
Windows: the Particle Parameters window contains parameters for the main particle system and the Templates List contains a list of particle system templates created on the other window.
Restart (ALT-R): restarts the particle system. Doesn't do anything if lifetime = -1, for instance.
Add To Templates List (ALT-A): adds the main particle system template to the templates list. If another template of same name already exists it won't be added.
Set (ALT-T): sets the currently selected template as the main particle system.
Remove (ALT-R): removes the currently selected template from the templates list.
Save List (ALT-S): saves the current list (as TL Name.pso in the above image) to the save directory. If another file of same name exists it will be overwritten.
Load List (ALT-O): loads the currently selected list (Example.pso in the above image) to the templates list. If the to be loaded list contains templates already in the templates list then it will not be loaded.
GAME INTEGRATION
To load the particle systems contained in a .pso file to your game you should copy the getPSO function. A simple example: https://gist.github.com/adonaac/5314707. The returned table contains tables of format: name (string) - the name of the particle system and ps (ParticleSystem) - the particle system. With that you can just access the particle systems you created with the editor and use them in your game! Don't forget to change the default sprite in the getPSO function and then later to use setSprite if you want to change the sprite used by a particle system.
If you find any bugs feel free to report them in this thread.
USAGE
Open the .love at least once so that the save directory can be created. .png files are used for sprites and .pso files are used to store template lists. Both types of files will be loaded if they're in the save directory. So, for instance, after running the editor once, take the Example.pso file and copy it to the save directory (AppData/.../LOVE/Particle Editor or as seen here for other systems). After that you should be able to see Example.pso listed in the editor and you'll be able to load it and see the particle system examples.
INTERFACE
Windows: the Particle Parameters window contains parameters for the main particle system and the Templates List contains a list of particle system templates created on the other window.
Restart (ALT-R): restarts the particle system. Doesn't do anything if lifetime = -1, for instance.
Add To Templates List (ALT-A): adds the main particle system template to the templates list. If another template of same name already exists it won't be added.
Set (ALT-T): sets the currently selected template as the main particle system.
Remove (ALT-R): removes the currently selected template from the templates list.
Save List (ALT-S): saves the current list (as TL Name.pso in the above image) to the save directory. If another file of same name exists it will be overwritten.
Load List (ALT-O): loads the currently selected list (Example.pso in the above image) to the templates list. If the to be loaded list contains templates already in the templates list then it will not be loaded.
GAME INTEGRATION
To load the particle systems contained in a .pso file to your game you should copy the getPSO function. A simple example: https://gist.github.com/adonaac/5314707. The returned table contains tables of format: name (string) - the name of the particle system and ps (ParticleSystem) - the particle system. With that you can just access the particle systems you created with the editor and use them in your game! Don't forget to change the default sprite in the getPSO function and then later to use setSprite if you want to change the sprite used by a particle system.
If you find any bugs feel free to report them in this thread.