Page 1 of 3

APE (Another Particle Editor) for LÖVE2D

Posted: Mon Oct 12, 2015 10:03 pm
by cval
Hi everyone!

I would like to share a particle system editor with you (and to say hi to the community!), which also has somewhat framework-ish minimalistic interface system, which, i hope, someone will be able to use if one will want to.

Features:
- runtime images reloading (.love file needs to be unpacked somewhere), so you dont have to restart the code after creating a new texture
- quad editing
- code generation (it will put your emitter to clipboard so you can then paste it into your awesome project)
- another graphical user interface framework! (i've tried to comment the code and how to use it, do ask if interested!)

Usage:
Just launch the code like you usually do. Every numerical value (spin element with +/- sign) is changed with mouse wheel, pressing left shift, left ctrl or left alt increases or decreases value change step for you to get desired values quicker. Clicking on texture list will change particle emitter texture, and "Reload list" button reloads textures from "particles" directory and will load any new files if any. After checking "Use quads" you will be able to add, remove and change system's quads, there will also be a guide drawn on a texture to see which portion of an atlas you have as quad's viewport. Changing spread, direction and area spread will also show guide shapes to clearly see what is going on with the emitter. To the bottom left there is a page controller which you can use to create another emitter with its separate control interface. Clicking on "Code" button will generate emitter code and put it into cliboard (a word of warning to everyone who holds important stuff there) for you to paste it somewhere else.
Hope you will find it usefull!

PS: list elements arent showing yet that they are scrollable if they have more elements than they can display. Of course, element locations are of my taste, as well as the way this tool works, but i find it somewhat "robust" if you just open a thing and with a few moves create something you can already use rightaway.

Creating an explosion particle example video


screenshot
screenshot
ape.png (181.78 KiB) Viewed 19954 times
Edit: changed video link to appropriate one

Edit2: Git repository https://github.com/mkdxdx/APE

Re: APE (Another Particle Editor) for LÖVE2D

Posted: Tue Oct 13, 2015 3:29 am
by bobbyjones
Is the code on github? And with what license?

Re: APE (Another Particle Editor) for LÖVE2D

Posted: Tue Oct 13, 2015 3:30 pm
by cval
Included Git link in first post, license is MIT. I'm actually pretty new to this, as well as to licensing my code :oops:

Re: APE (Another Particle Editor) for LÖVE2D

Posted: Sun Oct 18, 2015 1:09 am
by bobbyjones
I watched the video, it seems really cool, and i tried using it and well I don't have a mouse. And it is dependent on the scroll wheel I assume. Which I dont have.

Re: APE (Another Particle Editor) for LÖVE2D

Posted: Sun Nov 22, 2015 11:56 am
by cval
Updated some code. Now spin edits (those which were only changeable with scrollwheel) are changing values by clicking or holding mouse button. Left half of element decreases and right half increases value, step modifier also counts.

Re: APE (Another Particle Editor) for LÖVE2D

Posted: Mon Jan 04, 2016 9:57 pm
by skydash
Hello, I am a games assets maker. And I am a newbie for LÖVE2D.

Image
I assume I got error because SetStencil was removed in LÖVE 0.10.0.

Do you have a plan to update it ?

Re: APE (Another Particle Editor) for LÖVE2D

Posted: Thu Jan 14, 2016 9:44 pm
by cval
skydash wrote:
Do you have a plan to update it ?
Been away from workstation for a while. I've updated UI code to work with 0.10, i hope i've corrected everything, so please tell me if i missed anything there!

Updated on git (first post) and attached new .love file.

Re: APE (Another Particle Editor) for LÖVE2D

Posted: Sun Jan 24, 2016 7:58 pm
by murks
Thanks, I just tried it. A couple of gui elements seem to be broken, in the wrong place or not reacting but for the most part it works. Some of the math is also broken, some numbers can not be reset to their initial value. No idea what the code button is supposed to do, it does nothing.

Here I tried to do clouds, you can see some of the glitches.

Re: APE (Another Particle Editor) for LÖVE2D

Posted: Mon Jan 25, 2016 5:08 am
by Muzz
- runtime images reloading (.love file needs to be unpacked somewhere), so you dont have to restart the code after creating a new texture
It's possible to use folders outside of the love file which i do for colour constructor, it requires a little bit of ffi code, but for editors where you want user editable stuff, it' great.

Code: Select all

function changeDirectory()
  local ffi = require("ffi")

   ffi.cdef[[ int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath); ]];
   ffi.cdef[[ int PHYSFS_setWriteDir(const char *newDir); ]]

    local liblove = 0
   docsdir = " "

    liblove = ffi.os == "Windows" and ffi.load("love") or ffi.C
    docsdir = love.filesystem.getSourceBaseDirectory()


  liblove.PHYSFS_setWriteDir(docsdir)
  liblove.PHYSFS_mount(docsdir, nil, 0)

end

Re: APE (Another Particle Editor) for LÖVE2D

Posted: Mon Jan 25, 2016 8:25 am
by murks
Oh, maybe also a feature request:

- Add the possibility to enter numbers. Pushing the buttons until you get what you want is OK, but if you know what you want, just entering the number is a lot easier.

- In the 'Sizes' section I would prefer to edit the sizes directly rather than use the button next to 'Size'.