Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlxEmitter problems with non-square sprites #10

Open
FlixelCommunityBot opened this issue Sep 13, 2012 · 4 comments
Open

FlxEmitter problems with non-square sprites #10

FlixelCommunityBot opened this issue Sep 13, 2012 · 4 comments
Labels

Comments

@FlixelCommunityBot
Copy link

Issue #222 by: cyberpro4

I've got some problems with FlxEmitter rotation: I've used some non-square image as particles but during rotation happen two things:

First, the particles was cutted: this was caused by loadRotatedGraphic in makeParticles function: the default AutoBuffer parameter is set to false and there's no way to force it to true via makeParticles() func.

Second, since my bitmap is trasparent I've notice an white solid fill in final rotation bitmap: in FlxSprite::loadRotatedGraphic() the brush variable is constructed with default fill color 0xFFFFFFFF ( solid white ).

At now, I've force these values, but I think this "bug" needs to be fixed.

@Dovyski
Copy link
Member

Dovyski commented Mar 2, 2013

I would like to suggest moving this issue to "Future release" milestone. It can be marked as a bug, but I think it's the consequence of a poor FlxEmitter customization API.

FlxEmitter should receive some overhauling, which could include a more flexible API for customization. Axel has some interesting features, such as "named emitters". That's quite useful:

var effect:AxParticleEffect = new AxParticleEffect("collect-coin", Resource.PARTICLE, 10);

effect.xVelocity = new AxRange(-70, 70);
effect.yVelocity = new AxRange(-70, 70);
effect.lifetime = new AxRange(0.5, 1.5);
effect.amount = 100;
effect.blend = AxBlendMode.PARTICLE;
effect.color(new AxColor(0.3, 0.3, 0.3), new AxColor(1, 1, 1), new AxColor(0.3, 0.3, 0.3), new AxColor(1, 1, 1));

(...)

AxParticleSystem.emit("collect-coin", gem.center.x, gem.center.y);

We could borrow some ideas from there.

@Gama11
Copy link

Gama11 commented Apr 1, 2013

@Dovyski "Named emitters" (similar to the way animations work in flixel) seems like an awesome feature! I've always been annoyed by the way emitters work, it's kinda difficult and takes a lot of time to come up with the "right" / good values for it to look good. FlxEmitters could come with a set few pre-made / pre-defined emitters.

I've started doing a similar thing by creating a new class for my emitters and speficying the values in the constructor. This solution, however, would be a lot more convenient.

@Dovyski
Copy link
Member

Dovyski commented Apr 4, 2013

I've started doing a similar thing by creating a new class for my emitters and speficying the values in the constructor. This solution, however, would be a lot more convenient.

I was doing the same, that's why I suggested the named emitters :)

@Dovyski
Copy link
Member

Dovyski commented Aug 5, 2013

I'm pushing this issue up to the "Future release" milestone since the changes required to fix it demand new features (better API for FlxEmitter).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants