Code Monkey home page Code Monkey logo

flixel-power-tools's Introduction

Flixel Power Tools

Version 1.9 (final release)

November 28th 2013

By Richard Davey, Photon Storm

The Flixel Power Tools are a package of classes designed to provide extra functionality to your Flixel 2.5+ games.

Quick Install Guide

Copy the src and lib folders into your ActionScript project. All the classes for Flixel Power Tools should be contained in

src/org/flixel/plugin/photonstorm

Now read the "Getting Started Guide" in the Docs folder; it contains important information that will help you compile!

Getting Started Guide

There is a comprehensive Getting Started Guide in both Word and PDF format in the Docs branch:

https://github.com/FlixelCommunity/Flixel-Power-Tools/tree/docs

Documentation is also provided built-in to the classes. AS3 IDEs such as FlashDevelop will provide context-sensitive help for all classes and functions in the Flixel Power Tools.

Finally check out the home page at http://www.photonstorm.com/flixel-power-tools for updates.

Test Suite

Get the full Test Suite from here:

https://github.com/FlixelCommunity/Flixel-Power-Tools/tree/test-suite

The Flixel Power Tools come with a comprehensive Test Suite. Use it to visually see the tools in action, and then learn from the source code and comments within.

To run the Test Suite launch the following SWF:

Test Suite/bin/FlixelPowerTools.swf

If you don't have Flash Player installed locally then open index.html in a browser.

Classes

The following classes are currently in the Flixel Power Tools:

  • FlxBar
  • FlxBitmapFont
  • FlxButtonPlus
  • FlxCollision
  • FlxColor
  • FlxControl (includes FlxControlHandler)
  • FlxCoreUtils
  • FlxDelay
  • FlxDisplay
  • FlxExtendedSprite
  • FlxFlod (includes FlxFlectrum)
  • FlxGradient
  • FlxGridOverlay
  • FlxLinkedGroup
  • FlxMath
  • FlxMouseControl
  • FlxScreenGrab
  • FlxScrollingText
  • FlxScrollZone
  • FlxSpecialFX
  • FlxVelocity
  • FlxWeapon

APIs Include

  • FlxKongregate

Special FX Includes

  • BlurFX
  • CenterSlideFX
  • FloodFillFX
  • GlitchFX
  • PlasmaFX
  • RainbowLineFX
  • RevealFX
  • SineWaveFX
  • StarfieldFX

Contributing

I'm afraid that the Flixel Power Tools are no longer maintained by myself. I have moved on to other things.

I would strongly suggest you start using the Flixel Commmunity version of Flixel which contains updated versions of these tools.

License

Copyright 2011 Richard Davey. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY RICHARD DAVEY ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RICHARD DAVEY OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project.

flixel-power-tools's People

Contributors

cr0ybot avatar iqandreas avatar ooflorent avatar parka avatar photonstorm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flixel-power-tools's Issues

Way to retrieve the weapon from a bullet

This issue was reported on the Flixel forums. At the moment, in the collision function between a bullet and something else, there's no way to tell what kind of bullet it is; i.e. what weapon it was fired from. The only way to get this is to use a different FlxGroup for each weapon's bullets, and then perform each collision check with each FlxGroup, passing in a different callback function. It'd potentially simplify user code if there was an easy way to retrieve the weapon from a bullet so we can tell what kind of weapon it is.

Problem with shrink time via FlxG.timescale and bullets fired with FlxWeapon.

Hi,

I'm using timescale for some cool effects but when I set it to a value between zero and one, everything slows down except my bullets.

Problem is with how lifespan of bullets are calculated, I think. Because no matter how shrinked your time is, bullet's lifespan will be apparently calculated in real-time's time. For example my pistol' bullet's lifespan is 4 seconds but if you shrink time to 0.1, while bullet is still near the player, because the time is so slow in game, bullet will disappear after 4 seconds of real-time time.

since you probably won't update 1.9 anymore and will do a 2.0 version by xmas, what would u suggest to fix it?

-tnx

Simplifying FlxDelay

I find it unnecessary that FlxDelay extends Sprite, when it can be made much more simple and efficient by adding a single static dispatcher that provides the event for all FlxDelay instances:
https://gist.github.com/1525275

Or another solution, why does it extend Sprite and listen to ENTER_FRAME instead of extending FlxPlugin and using it's "update" method?

An an additional idea for FlxDelay, the "newDuration" parameter of "reset" should be optional, so by default, if no parameter is passed, the timer will be reset to the same amount of time it was when first initialized.

Package broken?

Is the ZIP package somehow broken?

DropDownFX.as seems to be almost empty in zip file and it gives errors.
Also getting quite many other errors from missing greensock and other used libs as those are not included.

FloodFillFX Crash

If the image's height is not divisible by the offset, this results in a crash because a script timeout. The reason being that subtracting the offset from a uint(dropY), can cause it to be negative, but since uint's can't be negative, the result is a very large number.

A simple restructuring in the draw() method fixes the problem.

Changing:


dropY -= offset;

dropRect.y -= offset;

if (dropY <= 0)
{
complete = true;
}

Into:


if (dropY <= offset)
{
    dropY = 0;
    complete = true;
}
else
{
    dropY -= offset;
    dropRect.y -= offset;
}

Repository structure

Just a few issues I have regarding the structure of the repository.

I can't seem to find the actual "code" for Flixel Power Tools other than in the pre-compressed ZIP (which defies the whole purpose of having version control, no? ;) This also makes forks or pull requests impossible.

Why are the Flixel libraries included? Do they have any changes made to them in order to work with some parts of the power tools? It may be easier including them as a SWC instead, but that's just a personal preference.

FlxScrollZone - onlyScrollOnscreen = false not working

Trying to setup a sprite that's on a different camera from the default. Even when I set onlyScrollOnscreen to false it wouldn't scroll.
It looks like the draw() function is incorrectly checking if the user wants to override onScreen() checks:
if ((obj.onScreenScroller == true && obj.source.onScreen()) && obj.scrolling == true && obj.source.exists)
Should be:
if ((obj.onScreenScroller == false || obj.source.onScreen()) && obj.scrolling == true && obj.source.exists)

Using FlxScrollingText

Can anyone see what is wrong with the following code?

package;

import flixel.FlxState;
import flixel.addons.plugin.FlxScrollingText;
import flixel.text.FlxBitmapText;
import flash.geom.Rectangle;

class BlahBlah extends FlxState
{
    override public function create():Void
    {
        var scrolltext = new FlxBitmapText();
        var scroller = FlxScrollingText.add(scrolltext, new Rectangle(20, 20, 200, 40), 1, 0, "*TEST* ");
        add(scroller);
        super.create();
    }

    override public function update(elapsed:Float):Void
    {
        super.update(elapsed);
    }
}

These are my current versions:

$ haxelib list
firetongue: [2.0.0]
flixel-addons: [2.5.0]
flixel-demos: [2.4.3]
flixel-templates: [2.4.6]
flixel-tools: [1.4.1]
flixel-ui: [2.2.0]
flixel: 4.3.0 [git]
hxcpp: [3.4.188]
lime-samples: [4.0.1]
lime: [2.9.1] 6.1.0
nape: [2.0.20]
openfl: [3.6.1] 7.1.1
poly2trihx: [0.1.4]
spinehaxe: [3.5.0]
systools: [1.1.0]
task: [1.0.7]

I am compiling on Linux to neko but I get a static garbled output:

test

Similar results with html5 and flash - can anyone help? (Please bear with me as I am very new to haxe)

FlxScrollZone - non-alpha?

ScrollZone doesn't work too well if you're messing with alpha transparencies.
To fix, in the scroll function, right I set data.source.pixels to a new, empty, transparent BitmapData. It seems to work without any speed/performance problems (but I'm using a tiny Png).

This is my 'fix':

zone.buffer.graphics.endFill();
data.source.pixels = new BitmapData(data.source.pixels.width, data.source.pixels.height, true, 0x00000000); /// <- added
data.source.pixels.draw(zone.buffer, zone.drawMatrix);
...```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.