APE (Another Particle Editor) for LÖVE2D

Showcase your libraries, tools and other projects that help your fellow love users.
cval
Citizen
Posts: 58
Joined: Sun Apr 20, 2014 2:15 pm
Location: Ukraine

APE (Another Particle Editor) for LÖVE2D

Post by cval » Mon Oct 12, 2015 10:03 pm

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


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

Edit2: Git repository https://github.com/mkdxdx/APE
Attachments
ape.love
executable
(96.8 KiB) Downloaded 350 times
Last edited by cval on Sun Nov 22, 2015 11:57 am, edited 2 times in total.

bobbyjones
Party member
Posts: 664
Joined: Sat Apr 26, 2014 7:46 pm

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

Post by bobbyjones » Tue Oct 13, 2015 3:29 am

Is the code on github? And with what license?

cval
Citizen
Posts: 58
Joined: Sun Apr 20, 2014 2:15 pm
Location: Ukraine

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

Post by cval » Tue Oct 13, 2015 3:30 pm

Included Git link in first post, license is MIT. I'm actually pretty new to this, as well as to licensing my code :oops:

bobbyjones
Party member
Posts: 664
Joined: Sat Apr 26, 2014 7:46 pm

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

Post by bobbyjones » Sun Oct 18, 2015 1:09 am

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.

cval
Citizen
Posts: 58
Joined: Sun Apr 20, 2014 2:15 pm
Location: Ukraine

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

Post by cval » Sun Nov 22, 2015 11:56 am

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.

skydash
Prole
Posts: 1
Joined: Mon Jan 04, 2016 9:41 pm

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

Post by skydash » Mon Jan 04, 2016 9:57 pm

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 ?

cval
Citizen
Posts: 58
Joined: Sun Apr 20, 2014 2:15 pm
Location: Ukraine

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

Post by cval » Thu Jan 14, 2016 9:44 pm

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.
Attachments
ape.love
(95.22 KiB) Downloaded 172 times

User avatar
murks
Party member
Posts: 182
Joined: Tue Jun 03, 2014 4:18 pm

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

Post by murks » Sun Jan 24, 2016 7:58 pm

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.
Attachments
smell_cloud.png
smell_cloud.png (137.34 KiB) Viewed 3565 times

Muzz
Citizen
Posts: 54
Joined: Sun Jun 28, 2015 1:24 pm

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

Post by Muzz » Mon Jan 25, 2016 5:08 am

- 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

User avatar
murks
Party member
Posts: 182
Joined: Tue Jun 03, 2014 4:18 pm

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

Post by murks » Mon Jan 25, 2016 8:25 am

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'.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests