Extra Effects Extension

I made an extension for some customizable splashy particle effects:
extra-effects

It is available here: https://github.com/alexszeto/extra-effects

It’s generally good for sparks and explosions, but there’s enough settings to repurpose the effects into something completely different. Here’s an example:

Let me know if this is useful/confusing. If you have made some custom effects with this that you’re proud of, do showcase it here! I’d love to see what effects people are able to make with this.

15 Likes

This is pretty cool! I’m excited to try it out on some of my upcoming games!

2 Likes

This is really cool but it would be super helpful if there were some notes on the code explaining what are/how to use the blocks.

2 Likes

Stunning! I love it!

3 Likes

I know that the help text from right clicking / tap and holding the blocks are missing - I was still learning how other extensions did that and I’ll have to add those later. Or do you mean you’d just like some comments in the example project (or just an easier to understand project) to help explain the blocks better?

… it’s probably both, isn’t it?

3 Likes

Best extension of the year

3 Likes

You don’t have to do both!! I was talking about this:

2 Likes

This is my new favorite extension!!!

3 Likes

Okay, I turned the example into more of a tutorial thing (and found some bugs). Hopefully this is more helpful. If it’s becoming overwhelming because there’s even more code, I can cut the example down to the most important bits and put the full demo/tutorial somewhere else.

3 Likes

Thanks a lot!

2 Likes

instantly bookmarks topic

3 Likes

Same lol

2 Likes

The latest version had been updated to 3.x.x, which means… breaking changes :frowning:

I get that breaking changes are frustrating to fix, so I have looked up and down the extension to make sure this is (close to) the last time I make breaking changes. There’s definitely still room for additions, though!

The break happens if you used the custom effect data block and try to upgrade from 2.x.x to 3.x.x. To fix the broken effects:

  • replace __createPixelRange with createPercentageRange. The percentage is then multiplied by the diameter of the effect when it is being created. Because the hidden default diameter is 48 and the old system uses radius instead of diameter for the pixel range, the conversion formula from the pixel numbers to the percentage number is pixel / 24 * 100.
  • replace __createTimeRange with createTimeRange. since these functions do appear in the block to javascript conversions, they should be searchable like all the others.
  • add the value for monoColor between the color table array and the size table array. By default it should be false.

On the bright side:

  • having custom spread use percentage of diameter means the size of the custom effect can change on the fly as it is being created, just like presets.
  • almost every attribute of an effect data can be modified using blocks, so it’s a lot easier to tweak a preset instead of mostly replicating a preset just to change one or two things using the custom effect block.
  • tweaks to spread more evenly at the start, then move more accurately to the distance even after deceleration.
  • minor settings like mono color in case the two tone effect doesn’t work with your custom color rotation, and you still want big circle particles, and adjustable z depth so effects can start behind sprites.

The example had been updated to reflect the 3.x.x changes. I also made some tiny changes to the effects within the demo so there’s a little more variety and they look a little better than before.

3 Likes

Tip for releasing updates that would break old features: instead of implementing the new behaviour straight into the old methods, create a new method and put the changes there. Above the old method, add the //% deprecated=true tag, which will mark the block as deprecated. That way, users can now use the new blocks, and old blocks will be removed from the toolbar, but they will remain in projects that use them, meaning updating to the new version will not immediately break them.

2 Likes

Good idea. I’ll keep that in mind next time, thanks!

1 Like

ok I know, I know that I didn’t even read the title but can you make custom effects?

You can make custom effects, yes. You can play through the example to see some custom effects. There’s limits to what you can make, but if you have an idea what you’re looking for, I can let you know if it’s possibly to create using the existing blocks.

1 Like

Oh my god, I haven’t seen this! I’ll try to use this for my games!

How does this man still not have the Member badge…

1 Like

Idk I guess he kind of just appears, drops the best creations known to man and just dips for like 5 months… he isn’t super active on the forums

2 Likes