Flixel Power Tools v1.7 – Kaboom!
It’s been a month in development but it’s finally here – Version 1.7 of the Flixel Power Tools has now gone from dev to master – and I urge you all to give it a play! I have also re-organised my site so that the tools and all sub-classes are now easily accessible from the right-hand side bar. More info, more screen shots, less scrolling
V1.7 includes a brand new Demo Suite system (don’t forget to try the Credits button ). It’s now easier and quicker to get to the examples, which is just as well as we’ve over 60 of them in this release. Don’t forget to download the whole package from github, as it includes a Getting Started manual PDF, the full source code to all of the demos, all of the graphical and audio assets (warning: copyright, don’t use commercially!), as well as the tools themselves.
There are some great new tools and updates to nearly everything. FlxHealthBar is gone, replaced with the much more versatile FlxBar. This new bar can be used for anything, from progress meters to sprite health. It can fill in one of 8 different directions, can be hooked to a parent sprite and monitor any value of that sprite – in short it doesn’t have to be just a health bar any longer.
The biggest new addition is FlxWeapon. A comprehensive weapon manager for games. It handles creation, pooling and re-use of bullets and a heck of a lot more. Angled bullets, sounds, callbacks, fire at the mouse, fire from the mouse, fire from a parent sprite, fire from a fixed position, bullet speeds, firing rates and more! Combined with FlxControl this is a ninja combo.
FlxVelocity has been updated with lots of new functions: moveTowardsPoint, distanceToPoint, angleBetweenPoint, velocityFromAngle, accelerateTowardsObject, accelerateTowardsMouse and accelerateTowardsPoint. And FlxControl now supports rotation, thrusting and reversing.
Basically you can make an asteroids style ship movement in a couple lines of code Of course I couldn’t resist adding some new Special FX including Blur, Center Slide and Sine Wave. Enjoy!
Posted on June 16th 2011 at 11:58 pm by Rich.
View more posts in Flixel Power Tools. Follow responses via the RSS 2.0 feed.
9 ResponsesLeave a comment
Make yourself heard
All about Photon Storm and our
HTML5 game development services
Filter our Content
- Cool Links
- Flash Game Dev Tips
- Game Development
- Geek Shopping
- In the Media
- Phaser 3
Awesome! The TestSuite really does a great job at demonstrating the various features and the Tests sourcecode serve as a good minimal demonstration of how a specific feature is used. And as it’s easily embeddable people don’t even have to download anything from github to give the powertools a try. Me like!
Great job again!
Flixel Power Tools is amazing!
BTW, I came across this, might be something to look into: http://i.imgur.com/MoVmO.png (After pressing F1)
Yeah the F1 capture only works when the swf is run locally. It’s because of the sandbox security, it needs to be invoked from a MouseClick event, otherwise it trips up Flash. I’ll sort it out one day really it was meant for devs to take shots of their games as they play them – but I can see it would be useful in an actual live game too sometimes!
great stuff, thank you rich.
I LOVE THE CREDITS!
I think I’m experiencing a bug with FlxBar.
Right now my code for spawning an enemy with the bar looks like this:
var enemy:Enemy = recycle(Enemy) as Enemy;
enemy.health = 3;
var badHealth:FlxBar = new FlxBar(0, 0, FlxBar.FILL_LEFT_TO_RIGHT, 32, 4, enemy, “health”, 0, 3);
badHealth.killOnEmpty = true;
PlayState.roundOver = false;
I have a variable set so whenever an enemy dies, said variable is set -= 1. Also another variable that tracks enemies killed is set += 1. The problem is that so long as the FlxBar is added, those variables seem to suddenly get streaky – enemies killed will jump up suddenly (double or more) by far more enemies than have actually been killed, and the other variable will decrease rapidly the same way.
Not sure what’s going on.
Not really obvious from the code posted above, email me a project I can compile and I can take a look.
When I create a button using FlxButtonPlus class with a height which is smaller than default value (20px) then label of the button goes out of the button border by y-axis! It is because y-position of the label is fixed to Y+3 coordinate.
I’m suggesting to center label of the button vertically depending on the heigth of the button in the next way (this is inside FlxButtonPlus constructor):
if (Label != null)
textNormal = new FlxText(X, Y + (Height / 2 – 8 + 1), Width, Label);
textNormal.setFormat(null, 8, 0xffffffff, “center”, 0xff000000);
textHighlight = new FlxText(X, Y + (Height / 2 – 8 + 1), Width, Label);
textHighlight.setFormat(null, 8, 0xffffffff, “center”, 0xff000000);