CBEffects 2.0 - Live on GitHub

It’s the moment I’ve been waiting for… Your favorite particle effects library is up on GitHub with a new version - CBEffects 2.0!

I’ve finally figured out how to use GitHub, and, consequentially, put the code up completely opensource (yes, it was opensource before, but it used to be on DropBox - now contributors can help, issues can be submitted, and the documentation can finally be kept up).

Some of the many goodies it’s got -

  - Delta time calculation so your effects look pixel-perfect across all perfomances

  - Completely new CBEffects theme

  - Code completely opensource and open to contributors

  - New increment values for sequential parameters

Get it on GitHub:

http://www.github.com/GymbylCoding/CBEffects

Enjoy!

  • Caleb

Sounds really good! Congratulations! 

I will use this in an upcoming project of mine :slight_smile:

Thank you very much for your effort!

Thank you for your great work!

But I remember PDF documentation in previous version. Now I can’t find it for 2.0 version…

@CineTek:

:slight_smile:

@nosty:

Yeah, now the documentation has been moved to the GitHub wiki. It’s not complete, but I’m working on it :slight_smile:

http://www.github.com/GymbylCoding/CBEffects/wiki

  • Caleb

Thank you Caleb.

[Edited: Deleted. I found a thread that resolved my problem]

It might be helpful to put an http:// in front of the URL.  I think the forum software will automatically make it a link (http://coronalabs.com) but if not, you could insert a clickable link using the little link Icon just to the right of the numbered list Icon above.

It would be most useful instead of having to copy the link, open a new tab/windows, paste the link in.

And congrats!

Hi, I would like to know how I can use presets from the ‘SampleApp’ folder. 

Thanks, this is a really useful library :slight_smile:

@nosty:

Earlier today I committed a quick update (2.0.0-a) that fixes the emissionNum issue.

@Rob Miracle:

Done :slight_smile:

@TwinTails:

The samples from the samples.lua file can be included by copying + pasting the config into your project.

  • Caleb

[lua] FX = CBE.NewVent

{

preset=“wisps”,
x=0,
y=0,
positionType=“fromPointList”,
pointList={{128, 768}, {896, 768}},
iteratePoint=true,
build=function()
return display.newImageRect(“Textures/generic_particle.png”, 60, 60)
end,
onUpdate=function(particle)
particle:applyForce((512-particle.x)*0.001, 0)
end,
perEmit=2,
emitDelay=500,
fadeInTime=100,
lifeSpan=500,
lifeStart=6500,
endAlpha=0,
physics={
xDamping=1.01,
gravityY=0,
autoAngle=false,
angles={90}
}
}

 FX:start()

[/lua]

Like this? Nothing shows up :confused:

Ignore, double post, sorry.

Do you have an folder named “Textures” with “generic_particle.png” inside of it?

Notice the build function - display.newImage(“Textures/generic_particle.png”) - that creates particles. It’s using display.newImage() to create a particle according to an image (generic_particle.png), which I’m guessing you don’t have in your project.

If you have a “glow dot” image, that’s what the generic_particle.png is. Just modify the path of the build function to fit your image.

If that’s not the problem, it would be nice to have any errors that are occurring. 

  • C

Yes, I have tried putting the ‘Textures’ folder in both the main project folder and inside the ‘CBEffects’ folder. There are no errors either which is why I’m so puzzled…

If it helps, I’m using Storyboard and also received an error when I renamed the ‘Textures’ folder in my main project folder(expected).

3f7ae065765b8d758220d1c963d3ed58.png

Caleb - your work is great, but as you can see, this fantastic library realy needs a full intelligible manual with all methods and properties description :confused:

@TwinTails:

Odd… A verbatim copy + paste of your code in my project works perfectly. Are you sure the code is getting executed?

@nosty:

THere’s a full parameter reference in each CBEffects package, and the wiki is in the workings. One of the good things about GitHub is that all changes to the wiki are up instantly, so I don’t have to completely finish the wiki before publishing it - just publish the part that’s finished.

The wiki can be found here.

I just did the same in a new project and strangely enough, it worked fine… 

I added a 

[lua] print(‘vent was executed’)[/lua]

and I got results in the terminal… is there any other way I can check it’s begin executed correctly?

EDIT: Okay… for some reason, it seems to be randomly showing up, sized and positioned differently to how it looked in a fresh project, about 5 or so minutes later…

EDIT 2: It also disappeared after a few seconds…

@Caleb

I analysed source code and now I know a little more about CBEffect, but believe me, good manual is priceless.

 There is no “translate” method description in wiki.

_kill method for one particle is very usefull too, and it deserves a description.

There is no “content” vent’s property desctipton in CBReference.txt

BTW. “TouchPoint” from BeginnerSamples doesn’t work.

Anyway, I’ll use CBEffect in my new game :slight_smile: Thank you!

@TwinTails:

Hm… Perhaps start a new thread for this one. It seems to be really strange.

@nosty:

Will add your suggestions as I write the wiki.

Thanks for the heads-up on the sample… Fixed :slight_smile:

  • C

Sounds really good! Congratulations! 

I will use this in an upcoming project of mine :slight_smile:

Thank you very much for your effort!

Thank you for your great work!

But I remember PDF documentation in previous version. Now I can’t find it for 2.0 version…

@CineTek:

:slight_smile:

@nosty:

Yeah, now the documentation has been moved to the GitHub wiki. It’s not complete, but I’m working on it :slight_smile:

http://www.github.com/GymbylCoding/CBEffects/wiki

  • Caleb