Giter Site home page Giter Site logo

flixel-addons's Introduction

flixel | addons | ui | demos | tools | templates | docs | haxeflixel.com

CI Discord Haxelib Version Haxelib Downloads Haxelib License Patreon

About

A set of useful, but optional classes for HaxeFlixel created by the community. Includes some classes from the Flixel Power Tools.

For Developers

If you are wanting to contribute code, please review the follwing documentation:

If you have a question or have not contributed on github before, there are friendly people in the community that help out in the forums.

For using git with github we recommended using a GUI application to manage your changes, for example SourceTree.

flixel-addons's People

Contributors

01010111 avatar 6j7kzg2f avatar adrianulima avatar andreiregiani avatar beeblerox avatar bendmorris avatar davellx avatar gama11 avatar gamedevsam avatar geokureli avatar impaler avatar jimmydeemo avatar joecreates avatar kevinresol avatar keymaster- avatar l0rb avatar larsiusprime avatar majigsaw77 avatar mrcdk avatar msghero avatar neeeoo avatar sebbernery avatar seifertim avatar steverichey avatar tembac avatar tiago-ling avatar tiagolr avatar volvis avatar winterismute avatar yanargyr 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

flixel-addons's Issues

Implemant some features of UbiArt engine

First, watch this (in case you haven't already): https://www.youtube.com/watch?v=y-chi097uV4. Now, die a little inside because HaxeFlixel is not that engine. But wait, with some tweaks it can look like it! well, maybe from a far far away place, with blurry glasses, viewed by an elderly lady with cataract and a evil cat. But I digress.

  • 3D Layers System:
    FlxSubState Stack - add a z-depth to states and substates, so you get an option to use them like layers. For example, a background state is a substate of the game state, and is also the parent of 3 different substates, each appearing on a different depth on stage simultaneously (clouds, mountains, vegetation). Same goes for enemies, events and so on. Have your game stacked.
  • Lighting System:
    FlxLight - add a FlxSprite with solid/gradient color + alpha, over (and under) other sprites on stage. Can be a part of the states/substates z-sorting system (like, a light substate, for example). Not super fancy like this: https://www.kickstarter.com/projects/finnmorgan/sprite-lamp-dynamic-lighting-for-2d-art, but still a good place to start.
  • Polygonal Atlases
    FlxPolyAtlas - Use Nape to make polygons frames based around the images you are using. Use the polygons-frames as a cut selection tool and copy the graphics to an atlas in the best possible way (less alpha is a +). Now just treat the polygons-frames like regular atlas frames (and maybe store them for a more advanced collision). Very good for cutout animation stuff.
  • Animation
    see my next issue if you dare.
  • Maybe I'm just mumbling, but there are plenty more where that came from.

Alpha multiplier for FlxTrail

Create a property to represent the global trail's alpha. The alpha of every FlxSprite in FlxTrail should be multiplied by this value so the whole trail's transparency can be faded-in/out whithout changing original FlxSprite's alpha.

FlxNestedSprite doens't change color

If I try to change the color of a FlxNestedSprite nothing happens. This is a test code:

            var spr1:FlxNestedSprite = new FlxNestedSprite(30, 30);
    spr1.makeGraphic(20, 20);
    add(spr1);

    var spr2:FlxNestedSprite = new FlxNestedSprite(20, 20);
    spr2.makeGraphic(10, 10);
    spr1.add(spr2);

    spr1.color = FlxColor.RED;

My solution was to comment out the set_color() function override.

FlxScreenGrab doesn't match PrintScreen results

In a customized version of crashdumper, I dump a screenshot on crash, using FlxScreenGrab.

Here's FlxScreenGrab's output:
screenshot

Here's the system's native PrintScreen:
screenshot_printscreen

The FlxScreenGrab image's tileset has little artifacts in it -- perhaps because I'm using the "tileset smear trick" where you add borders to each tile to avoid cross-tile bleed. Also note that the flixel-ui elements are arbitrarily offset from the native screenshot.

FlxScreenGrab just looks like it does a naked draw dump from the stage, so how is this discrepancy even happening? It should be using the same draw logic as everything else, right?

FlxMovieClip

I ported Funstorm FlxMovieClip (http://www.funstormgames.com/blog/2011/09/flxmovieclip/) to HaxeFlixel. But now this works only in Flash. Maybe someone help me?

package ;
import flash.display.BitmapData;
import flash.display.MovieClip;
import flixel.FlxSprite;
import flixel.FlxG;
import flixel.FlxCamera;
import flixel.util.FlxColor;

/**
 * FlxMovieClip
 *
 * With this you can draw a Flash MovieClip just like an FlxSprite!
 *      (with a couple of exceptions)
 *
 * WARNING! Processing intensive - only use when desired effect is
 * impossible to achieve with FlxSprite or FlxG.stage.addChild().
 *
 * Supported methods / properties:
 * - x ,y, angle, scale, offset, velocity, acceleration
 * - antialiasing, visible, flash movieclip animations
 *
 * Unsupprted methods / properties:
 * - alpha, blend, replaceColor, stamp, drawLine, fill
 * - active, flixel animations
 *
 * @version     1.0 - September 25th 2011
 * @link        http://www.funstormgames.com/
 * @author      Wolfgang @ Funstorm Ltd
*/

class FlxMovieClip extends FlxSprite
{

    /**
     * Internal, the <code>MovieClip</code> being rendered.
     */
    private var _mc:MovieClip;
    /**
     * Internal, bitmapdata which the <code>MovieClip</code> is rendered to.
     */
    private var _mcBitmapData:BitmapData;
    /**
     * Internal, used to keep track of the last <code>MovieClip</code> frame shown.
     */
    private var _mcLastFrame:Int;
    /**
     * Change this to false/true to start/stop the <code>MovieClip</code>.
     * Can also use to check whether or not currently playing.
     */
    public var isPlaying(get, set):Bool;

    private var _isPlaying:Bool = false;

    /**
     * Whether or not the <code>MovieClip</code> should restart at tbe beginning when it finishes playing.
     */ 
    public var isLooping:Bool;
    /**
     * A function that gets called every time the <code>MovieClip</code> reaches the end of the timeline.
     */
    public var callbackOnComplete:Void -> Bool;


    /**
     * Creates an empty <code>FlxMovieClip</code> at the specified position.
     * 
     * @param   X               The initial X position of the sprite.
     * @param   Y               The initial Y position of the sprite.
     */
    public function new(X:Int = 0, Y:Int = 0) 
    {
        super(X, Y);
    }

    /**
     * Load a <code>MovieClip</code> from an embedded file.
     * 
     * @param   TheMovieClip        The <code>MovieClip</code> you want to use.
     * @param   Width               The <code>MovieClip</code>'s width.
     * @param   Height              The <code>MovieClip</code>'s height.
     * @param   IsLooping           Whether or not to loop the <code>MovieClip</code> when playing.
     * @param   AutoPlay            Whether or not to start playing the <code>MovieClip</code> right away.
     * @param   CallbackOnComplete  This function gets called every time the <code>MovieClip</code> reaches the end of its timeline.
     * 
     * @return  This <code>FlxMovieClip</code> instance (nice for chaining stuff together, if you're into that).
     */
    public function loadMovieClip(TheMovieClip:MovieClip, Width:Int, Height:Int, IsLooping:Bool = false, AutoPlay:Bool = false, ?CallbackOnComplete:Void -> Bool = null):FlxMovieClip
    {
        _mc = TheMovieClip;
        width = Width;
        height = Height;
        isPlaying = AutoPlay;
        isLooping = IsLooping;
        callbackOnComplete = CallbackOnComplete;

        return this;
    }

    /**
     * Check whether the <code>MovieClip</code> is playing.
     */
    private function get_isPlaying():Bool
    {
        return _isPlaying;
    }

    /**
     * Start / stop playing the <code>MovieClip</code>.
     */
    private function set_isPlaying(Play:Bool):Bool
    {
        if (Play) _mc.play();
        else _mc.stop();
        return _isPlaying = Play;
    }

    /**
     * Check whether the <code>MovieClip</code> has finished playing.
     */
    override public function update():Void 
    {
        if (isPlaying) {
            if (_mc.currentFrame == _mc.totalFrames || _mc.currentFrame < _mcLastFrame) {
                if (isLooping) _mc.gotoAndPlay(0); // loop back to beginning
                else {
                    _mc.gotoAndStop(_mc.totalFrames-1); // go to last frame
                    isPlaying = false; // and stop
                }
                if (callbackOnComplete != null) { callbackOnComplete(); }
            }
            _mcLastFrame = _mc.currentFrame;
        }
    }

    /**
     * Draw the <code>MovieClip</code> to the camera buffer.
     */
    override public function draw():Void 
    {
        // This class is mostly copied over from FlxSprite.
        // Comments are next to any lines changed.
        if (_mc != null) { // Only draw if a movieclip has been loaded
            // create a new bitmap data with a transparent background
            // this is necessary because otherwise the movieclip frames get drawn on top of each other
            // (drawing on top works fine for movieclips with an opaque background but of course is a major problem for MCs with a transparent BG)
            _mcBitmapData = new BitmapData(Std.int(width), Std.int(height), true, 0);
            // draw the movieclip to the bitmapdata so we can draw it to the camera later
            _mcBitmapData.draw(_mc);

            if(cameras == null)
                cameras = FlxG.cameras.list;
            var camera:FlxCamera;
            var i:UInt = 0;
            var l:UInt = cameras.length;
            while(i < l)
            {
                camera = cameras[i++];
                if(!isOnScreen(camera))
                    continue;
                _point.x = x - Std.int(camera.scroll.x * scrollFactor.x) - offset.x;
                _point.y = y - Std.int(camera.scroll.y * scrollFactor.y) - offset.y;
                _point.x += (_point.x > 0) ? 0.0000001 : -0.0000001;
                _point.y += (_point.y > 0) ? 0.0000001 : -0.0000001;
                _matrix.identity();
                _matrix.translate( -origin.x, -origin.y);
                _matrix.scale(scale.x, scale.y);
                if ((angle != 0) && (bakedRotationAngle <= 0))
                    _matrix.rotate(angle * 0.017453293);
                _matrix.translate(_point.x + origin.x, _point.y + origin.y);
                camera.buffer.draw(_mcBitmapData,_matrix,null,blend,null,antialiasing); // where the magic happens: the bitmap data gets drawn to the camera
            }
        }
    }

    /**
     * Clean up memory.
     */
    override public function destroy():Void 
    {
        _mc = null;
        _mcBitmapData = null;
        callbackOnComplete = null;

        super.destroy();
    }

    /**
     * Can't use graphics of type Class with FlxMovieClip.
     */
    override public function loadGraphicFromSprite(Sprite:FlxSprite):FlxSprite
    {
        return null;
    }

    /**
     * Can't use graphics of type Class with FlxMovieClip.
     */
    override public function loadGraphic(Graphic:Dynamic, Animated:Bool = false, Width:Int = 0, Height:Int = 0, Unique:Bool = false, ?Key:String):FlxSprite
    {
        return null;
    }

    /**
     * Can't use graphics of type Class with FlxMovieClip.
     */
    override public function loadRotatedGraphic(Graphic:Dynamic, Rotations:Int = 16, Frame:Int = -1, AntiAliasing:Bool = false, AutoBuffer:Bool = false, ?Key:String):FlxSprite 
    {
        return null;
    }

    /**
     * Can't use graphics of type Class with FlxMovieClip.
     */
    override public function loadGraphicFromTexture(Data:Dynamic, Unique:Bool = false, ?FrameName:String):FlxSprite
    {
        return null;
    }

    /**
     * Can't use graphics of type Class with FlxMovieClip.
     */
    override public function makeGraphic(Width:Int, Height:Int, Color:Int = FlxColor.WHITE, Unique:Bool = false, ?Key:String):FlxSprite
    {
        return null;
    }       
}

Rename package flixel.addons.editors to flixel.addons.format(s)

Need to rename the package flixel.addons.editors to flixel.addons.format because:

  • We don't need dependence on vendors;
  • We did not implement functionality of specific editors;
  • Several editors can work with different formats;
  • We should support formats like tmx instead concrete editors.

Error with Flixel.Utils... Import

I think you guys change the Flxel.Utils structures but you didn't change in flixel-addon.
So It's called 'class not found' with every line of those.

Krita+Spriter as a basic graphical IDE for HaxeFlixel

Citrus engine has an interesting integration with Flash Pro,
leveldesign1 1
Tiled has custom properties which you can use tiled-docked-properties 2
And even Openfl have a notable mention with GameStudioHx
screenshot11
But HaxFlixel stands alone.
450px-gandalf02

Not alone. How about using Krita(/Gimp) + Spriter(/Spine) to do all the hard work and then let HaxFlixel read and implement the X/Y/Width/Height and ANIMATION info for you? Here's how I think it can work:

Project setup

Krita
  1. Open a Krita/Gimp project with the same resolution as your game (+dpi for scaling).
  2. Add layers to draw and name your future FlxSprites. This is your mock-up game screen, so position and scale everything appropriately.
  3. Export as QML. Copy the QML file to your "assets/data" folder. The graphics to "images" as a folder or a spritesheet.
  4. Go to your HaxeFlixel project and Create the FlxSprite your graphic represents. Use [YourSprite].X | Y | Height | Width.setfromfile("assets/data/[YourFile].qml", "spritename") to scale and place each appropriate FlxSprite on screen, like you've planned.
Spriter - tricky idea
  1. Create a new project in Spriter. Choose the QML graphics library (where your layers are). You don't have to animate a character! you can animate a Game Menu or Cut Scene.
  2. Place your graphics exactly like you did in your Krita project (how can you tell? I dunno). Animate them only with features you know FlxTween also supports (like Move, Scale, Rotate, Alpha, Change graphic/Z order).
  3. Save the Scml/Scon file in your "assets/data" folder.
  4. Magic (I still don't know how this should actually work, or would it): Open [YourSprite].animation.addfromfile("assets/data/[YourFile].scml/scon", "YourSprite"). This would generate a series of FlxTweens (+actuate?) based on the specific information recovered from the file about the the specified Graphic/FlxSprite. Ignore the bones, just modify the graphic by the timeline reference ("time" to "time" as duration for each graphic).
It's just an idea, and my brain stopped working like a hour ago so I'll leave you with that. More to come...

FlxTilemapExt slopes not functioning properly

Hey guys, I noticed that in the FlxTilemapExt, slopes are not working correctly...
I try to add slopes to my level, which is in the code here

        // Setting the slopes of the map
        var slopeFL:Array<Int> = [10];
        var slopeFR:Array<Int> = [9];
        var slopeCL:Array<Int> = [11];
        var slopeCR:Array<Int> = [12];

        level1.setSlopes(slopeFR, slopeFL, slopeCR, slopeCL);

I notice how the help says that in setSlopes, this is how it is supposed to function

setSlopes (?LeftFloorSlopes:Array<Int>, ?RightFloorSlopes:Array<Int>, ?LeftCeilSlopes:Array<Int>, ?RightCeilSlopes:Array<Int>) : Void …
Sets the slope arrays, which define which tiles are treated as slopes.

Although, if you look at my code above, I put the right one first, then the left one. I tried doing it as the help said it, but it inverted it and made left to right and right to left. Someone needs to fix this, either edit the help to say it is right first, or change the way the setSlopes works.

Thanks,
Dan.

FlxTilemapExt Slope Help

Hey guys, I was wondering if someone could help me at all on the FlxTilemapExt slope help. I noticed that in the demo, it is something along the lines of

level.setSlope(etc etc etc etc);

I tried installing the flixel git, and used flixel addons to try it, but it didn't work. Is there something I'm doing wrong, or does the demo use different versions? (Sorry for the lack of information, I'll give a more detailed response if needed)

haxelib.json causing problems.

Hi, i had this problem before and after updating flixel-addons it happened again.

when i use flixel-addons, my projects fail to compile (even new ones from template), due to this line:

haxelib.json line:10
"dependencies": { "openfl": "", "flixel": "", "systools": "1.1.0" }

if i replace the dots with commas:
"dependencies": { "openfl": "", "flixel": "", "systools": "1,1,0" }

it all works fine and i can compile the projects, otherwise it says flixel-addons can't be found.

Tiled Object

Following a vanilla install of flixel, flixel-addons and flixel tool demos, following the guide on the homepage results in the TiledEditor failing due to an issue with Flixel addons using legacy code.

I fixed it locally with :

TiledObject [137]
points.push( new FlxPoint(Std.parseFloat(pair[0]), Std.parseFloat(pair[1])));

Cannot install flixel-addons from haxelib

I'm trying to run some of the demos provided for Haxe Flixel, but am hitting some dead ends trying to install the required libraries. For example:

TiledEditor mantic$ openfl test Project.xml flash
Error: Library flixel-addons is not installed : run 'haxelib install flixel-addons'
TiledEditor mantic$ haxelib install flixel-addons
No such Project : flixel-addons

Any help?

TiledMap support external tilesets

Need support to load external tsx-files linked to tmx-files. Maybe like assets loading.

E.g.: perspective_walls.tmx

<tileset firstgid="1" source="perspective_walls.tsx"/>
  • Have no name attr
  • Have a source attr

This rules means that we need to load a tsx from a directory that contains the our tmx.

If tsx isn't exist then we need call something like this:
loadExternalTileset(filename, success:String->Void).

Add more existing potential addons to flixel-addons

Edit: _The List_: here, at the bottom page under "Flixel's Potential Addons"

Idea

Keep an eye out for more potential addons classes / libraries that can be useful to HaxeFlixel. If you find or look for anything like that, you can either reference it here so I can add it to my ever growing list, or you can browse the list to choose a potential addon to port / integrate to the addons folder.

Rational

The addons folder is meant to store useful, but not "core" material classes so it won't be lost. Now:

  • I think a lot of nice potential addons' code is lost when people don't have a formal place to upload their own helpers' classes they develop for themselves but is actually useful for others.
  • What's more, it's very problematic for users to keep track of dozens of unofficial different repos, not to mention a specific class they encounter somewhere out of the blue, for small, often repeating helpers classes.

Examples

Flixel-Plus, Flixel-Plugins, HaxeFlixelPG [as far as I recall], stuff like Tim's Z-sorting class, or the Gamepad class from the forum not so long ago. There are many, many games out there with great ideas, forgotten Flx----.as3 classes that are easily converted with great functionalities and more.

Transition without state change

For the new state change transitions, it would be cool if in addition to those, you could also force a transition to happen whenever. Like if you want a fade out+in to happen when you move to a new level, there's probably not a state change involved. @larsiusprime

FlxNapeState pause feature.

I wanted to add a pause feature to my FlxNapeState but simulation was still working when i did the super.update();
Basically i added a pause boolean in the FlxNapeState and changed this line:

if (!pause) {
space.step(FlxG.elapsed, velocityIterations, positionIterations);
}

it would be nice to have this.

Compile Error in TiledObject.hx

/usr/lib/haxe/lib/flixel-addons/git/flixel/addons/editors/tiled/TiledObject.hx:137: characters 15-27 : flixel.util.#FlxPoint has no field get

Discovered when messing with tiled demo.

haxeflixel Version: 3.2.2
flixel-addons Version: 1.0.3
lime Version: 0.9.6

Problem with TiledLayer and *.tmx files

Not sure if this is even anything you can help with, but I just started noticing this problem, and I'm not sure how to fix (it's probably something dumb and simple).

I'm using the Tiled editor files, setup almost identically to the demo.
I'm making my maps in Tiled as Base64 (uncompressed), and I have animated tiles and everything works just fine... until I commit my changes to GitHub.

When I go to another computer and sync, if I immediately try to run my project, it dies with an error about "Encountered End of File" on line #231 of TiledLayer.hx.

If I then go into the Tiled Editor, load my Tmx file, it loads just fine, and then after I save it in Tiled (without making any changes), it works in my project again without any errors...

Until I commit it back to GitHub again and grab the changes from another computer...

Is this something that can be fixed within TiledLayer? Or something I'm doing wrong? Any suggestions?

createBulletPattern in FlxWeapon

The API docs show that there is a createBulletPattern function. I checked the code and it's nowhere to be seen. It sounds like a cool idea though. I'll work on it since I need it for my game.

Inconsistent skewed sprite drawing on different targets

skew

Flash target (expected results across targets) on top, android (notice the unwanted horizontal offset) on the bottom. For some reason it seems like sprites are offset farther with higher skew.

This is the sprite I use:

ground

and code:

origin.set(0, 0);
setPosition(Math.floor(startX), startY);
scale.x = (Math.ceil(endX) - Math.floor(endX)) / 8; // sprite is 8 pixels wide
skew.y = Math.atan2(endY - startY, endX - startX) * 180 / Math.PI; // calculate skew angle

FlxMouseControl only supports left clicks, not middle and right.

FlxMouseControl only looks at FlxG.mouse.pressed which indicates left mouse button clicks.

For right and middle button, there currently is the FlxG.mouse.pressedRight and the FlxG.mouse.pressedMiddle available. It'd be nice to have FlxMouseControl handle these buttons as well and let the callbacks have an event object parameter telling which button was pressed.

FlxWeapon:internalFireFromAngle() incorrectly requires angle in radians when firing from a parent angle or parent facing angle

FlxSprite uses degrees for rotation angle, so when FlxWeapon:internalFireFromAngle() is eventually called from FlxWeapon.fireFromParentAngle(), it will be passing in an angle in degrees. Unfortunately the code in internalFireFromAngle() assumes the angle is in radians. There's no way to coerce the parent sprite's facing angle or rotation angle to be radians, so this functionality does not work at all.

This is discussed in #103 (cc @kevinresol), but that is getting overloaded.

Fix to animated FlxTrail

I proposed this fix in the forums but SruloArt told me that is better to open an Issue here.

FlxTrail is not working with animated sprites. I prefer to use FlxTrail instead of FlxTrailArea because it's faster if I only have to do the trail of one sprite.

This is an example project to see the problem and test the fix https://dl.dropboxusercontent.com/u/24695185/TestAnimatedTrail.rar

This is the proposed fix

Line 81 added:
/**
* Stores the sprites recent animations.
*/
private var _recentAnimations:Array;

in new()
_recentAnimations = new Array();

in destroy()
_recentAnimations = null;

in update:
// Again the same thing for Sprites frames if framesEnabled
if (framesEnabled && _image == null)
{
var spriteAnimation:FlxAnimation = sprite.animation.curAnim;
_recentAnimations.unshift(spriteAnimation);

            if (_recentAnimations.length > _trailLength)
            {
                _recentAnimations.pop();
            }

            var spriteFrame:Int = sprite.animation.frameIndex;
            _recentFrames.unshift(spriteFrame);

            if (_recentFrames.length > _trailLength) 
            {
                _recentFrames.pop();
            }

            var spriteFacing:Int = sprite.facing;
            _recentFacings.unshift(spriteFacing);

            if (_recentFacings.length > _trailLength) 
            {
                _recentFacings.pop();
            }
        }

        // Now we need to update the all the Trailsprites' values
        var trailSprite:FlxSprite;

        for (i in 0..._recentPositions.length) 
        {
            trailSprite = members[i];
            trailSprite.x = _recentPositions[i].x;
            trailSprite.y = _recentPositions[i].y;

            // And the angle...
            if (rotationsEnabled) 
            {
                trailSprite.angle = _recentAngles[i];
                trailSprite.origin.x = _spriteOrigin.x;
                trailSprite.origin.y = _spriteOrigin.y;
            }

            // the scale...
            if (scalesEnabled) 
            {
                trailSprite.scale.x = _recentScales[i].x;
                trailSprite.scale.y = _recentScales[i].y;
            }

            // and frame...
            if (framesEnabled && _image == null) 
            {
                trailSprite.animation.curAnim = _recentAnimations[i];
                trailSprite.animation.frameIndex = _recentFrames[i];
                trailSprite.facing = _recentFacings[i];
            }

            // Is the trailsprite even visible?
            trailSprite.exists = true; 
        }

Coping with the FlxWeapon in dev (has breaking changes from the haxelib version)

@kevinresol, af570b5 is a massive breaking change (just switched from the haxelib version to dev), but I can't find any updated documentation to explain the new methodology. For instance, I used to use makeImageBullet() to create the bullet and add it to the group. Is the new approach to put all the creation code into the game itself?

Around the same time you introduced a bulletFactory (f704576), I'd really like to see some example code that uses this. There's nothing in the demos, so I'm kinda struggling - I got up and running using the original docs on http://www.photonstorm.com/flixel-power-tools/flxweapon.

A couple of other questions / thoughts:

  • Should angleNoise be required for methods like fireFromParentFacing()? Just means the code now has to have new FlxBounds(0, 0) whenever you call it.
  • setFirePosition() is gone, and it looks like positionOffset (used to be _positionOffset) isn't being used. How do I get my bullet to fire from an offset of the parent position (or any specific position, tbh)?

Any help would be appreciated :)

Cheers,
Mark

FlxNapeState is missing debug button icon

In the "create" function for FlxNapeState one line tries to create a debug button for the nape debug view (line 90)
There are multiple problems with this:

  1. The function expects a path string to the button logo, but in the code a BitmapData is given
  2. The referenced logo image does not exist. The path references the assets folder, but obviously there won't be an icon in there. Where should it be?

The fix isn't difficult, I just have to know what icon should be used and where it would have to be placed. Would the user have to copy the file over or is there a way to put it somewhere outside the project folder?

Error when using FlxTilemapExt

When trying to use FlxTilemapExt in my project, I am getting the following error:

C:\HaxeToolkit\haxe\lib\flixel-addons/git/flixel/addons/tile/FlxTilemapExt.hx:15
7: characters 55-70 : Unknown identifier : _cachedGraphics
C:\HaxeToolkit\haxe\lib\flixel-addons/git/flixel/addons/tile/FlxTilemapExt.hx:39
5: characters 54-70 : Unknown identifier : _region
C:\HaxeToolkit\haxe\lib\flixel-addons/git/flixel/addons/tile/FlxTilemapExt.hx:39
8: characters 22-35 : Unknown identifier : _region
C:\HaxeToolkit\haxe\lib\flixel-addons/git/flixel/addons/tile/FlxTilemapExt.hx:40
0: characters 22-35 : Unknown identifier : _region
C:\HaxeToolkit\haxe\lib\flixel-addons/git/flixel/addons/tile/FlxTilemapExt.hx:40
0: characters 54-70 : Unknown identifier : _region
C:\HaxeToolkit\haxe\lib\flixel-addons/git/flixel/addons/tile/FlxTilemapExt.hx:40
1: characters 10-23 : Unknown identifier : _region
C:\HaxeToolkit\haxe\lib\flixel-addons/git/flixel/addons/tile/FlxTilemapExt.hx:40
1: characters 4-23 : Float should be Int
C:\HaxeToolkit\haxe\lib\flixel-addons/git/flixel/addons/tile/FlxTilemapExt.hx:40
4: characters 29-43 : Unknown identifier : _region
C:\HaxeToolkit\haxe\lib\flixel-addons/git/flixel/addons/tile/FlxTilemapExt.hx:40
4: characters 50-64 : Unknown identifier : _region

I tried to revert to a commit before theses variables showed up, but too much has changed since then. If there is a better method for using Tilemaps, then I am all ears.

Add multiplayer support

Would probably use Haxe remoting unless OpenFL has some functionality that would make this easier. Could be a dedicated class like FlxMultiplayer or something, but would probably need both server and client code.

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.