Author Topic: Flixel Power Tools  (Read 73649 times)

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flixel Power Tools
« Reply #40 on: Wed, Jul 13, 2011 »
Glad you found it easy. Work has been insane the past few weeks, but I've got a lot of tools updates planned. Mostly updates to existing features, bug fixes, and a couple of fun new ones :)
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

Mad

  • Member
  • **
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Flixel Power Tools
« Reply #41 on: Sun, Jul 17, 2011 »
Steel yourself, I am about to go on an over-exaggerated rant.

I love this package and I think it's very useful, but I've got to be frank:

Your FlxButtonPlus class is completely useless.

Up one side and down the other it is poorly thought out as an extension to the FlxButton class. One reason is because it's not an extension of FlxButton, it's an extension of FlxGroup, which is basically kind of counter intuitive by itself. There is also no down state. Why is there no down state? And then of course there's the whole thing where every button state has to have its own image, you can't just make one sprite sheet for all three states and have the Flixel engine split it up all in one nice neat package.

And lastly, you can't use the FlxDisplay class with it, because it's not a FlxSprite... it's a subclass of FlxGroup, thus making FlxDisplay useless if you want to center a button. What happened when you were making this class??

In all seriousness, I don't intend any offense with this rant, and I think that you've done a magnificent job with Flixel Power Tools. But you should seriously reconsider reworking your FlxButtonPlus class, as it contains some major logical fallacies in its design. You are completely welcome to tear my argument apart though, I'd like to be proven wrong. :)

felipe

  • Member
  • **
  • Posts: 36
  • Karma: +0/-0
  • games!
    • View Profile
    • i love pixel
Re: Flixel Power Tools
« Reply #42 on: Tue, Jul 19, 2011 »
Is there a way that the members from one flxgroup follow the members of other flxgroup?
Sorry, but i wish someone could help me with this.
« Last Edit: Tue, Jul 19, 2011 by felipe »

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flixel Power Tools
« Reply #43 on: Tue, Jul 19, 2011 »
With what felipe?
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

felipe

  • Member
  • **
  • Posts: 36
  • Karma: +0/-0
  • games!
    • View Profile
    • i love pixel
Re: Flixel Power Tools
« Reply #44 on: Tue, Jul 19, 2011 »
Sorry, wrong quoted text, fixed :P

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flixel Power Tools
« Reply #45 on: Tue, Jul 19, 2011 »
How do you mean one group follow another? Can you give an example how you'd use this?
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

felipe

  • Member
  • **
  • Posts: 36
  • Karma: +0/-0
  • games!
    • View Profile
    • i love pixel
Re: Flixel Power Tools
« Reply #46 on: Tue, Jul 19, 2011 »
My game has a group of zombies, and a group of "civilians", what I am trying to do is that the zombies follow the civilians, they are separated by groups .

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flixel Power Tools
« Reply #47 on: Tue, Jul 19, 2011 »
I'm not sure what you need is a "group follow group" behaviour here - but rather some logic for your zombies. Personally I would approach it so that when the zombie and civvies groups are created, I go through each zombie and tell it to pick a random civilian to follow. Depending on the game maybe it's 1 zombie vs. 1 civ, or maybe it'd be fun to have say 3 zombies after 1 civ, and some civs with no zombies following them at all. This is a game design decision really.

Once they've picked their prey you can kick things off, and the speed at which the zombies track the civs is just down to your code really.
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

felipe

  • Member
  • **
  • Posts: 36
  • Karma: +0/-0
  • games!
    • View Profile
    • i love pixel
Re: Flixel Power Tools
« Reply #48 on: Tue, Jul 19, 2011 »
ok! thanks, gives me an idea of what to do :)

John Hutchinson (Johntron247)

  • Commodore 256
  • Contributor
  • ****
  • Posts: 392
  • Karma: +1/-0
  • I can has lazerz?
    • View Profile
    • Level X Games
Re: Flixel Power Tools
« Reply #49 on: Tue, Jul 19, 2011 »
Maybe have them pick the closest one to follow (shortest patch) and have them update which one they're following once in a while. That way zombies can change their minds if another civilian becomes easier to catch, or they can pick another one if they caught one.  That will accomplish the variable number of zombies following each civilian thing and also make it look more intelligent.
Twitter ∑ 

Rapid

  • New Member
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Flixel Power Tools
« Reply #50 on: Wed, Jul 27, 2011 »
Wow, that is amazing! Is there ANYTHING flixel cant do?! that is really really great, i feel i can make now game now. i kept worrying about the weapons thing, but really this is perfect.

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flixel Power Tools
« Reply #51 on: Fri, Jul 29, 2011 »
V1.8 of the Flixel Power Tools was just made live!

http://www.photonstorm.com/archives/1484/flixel-power-tools-v1-8-released-lets-get-clicky



Tonight I pushed up the final v1.8 release of the Flixel Power Tools. Thereís only really one major new class this time, but itís a big one. FlxExtendedSprite together with FlxMouseControl provide you with the ability to create FlxSprites that you can click with the mouse, drag around the game world, snap to a grid, throw or even hook to the mouse with a spring! It handles overlapping sprites with ease, has custom sort controls (to determine which mouse gets the click) and clicks can be bounding box or pixel perfect as needed. Dragging can be locked to a single axis or a FlxRect area too. The Extended Sprites also now have built-in gravity, which works wonders combined with the ability to throw them. There are no less than 14 examples in the Demo Suite to boot including a little mini-game.

Also new in this release is FlxFlectrum, a powerful addition to FlxFlod, that allows you to create your own vu-meter / spectrum analyser style display for soundtracker music. Use the built-in meter or provide your own PNG, with direction support, column/row spacing, background beat and peak or meter display modes.

Several classes have had new methods: FlxMath gained wrapAngle, angleLimit and mouseInFlxRect. FlxCollision received the new pixelPerfectPointCheck and the very handy createCameraWall, which builds an invisible collision wall out of Tile Blocks around the camera Ė you control the width. And last but not least a new FX: RevealFX.

Iím going to take a short break as I go away on summer holidays and work on my Flixel book. But I do plan on doing a v1.9 release which will be mostly (if not all!) bug fixes and new test cases. After this I have plans to work on a Window / GUI system suitable for making RPG style games, and tight Box2D integration.
« Last Edit: Fri, Jul 29, 2011 by photonstorm »
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

foosety

  • Member
  • **
  • Posts: 88
  • Karma: +0/-0
    • View Profile
Re: Flixel Power Tools
« Reply #52 on: Mon, Aug 1, 2011 »
Springs are hilarious and lots of fun. Nice update  :D

zuperxtreme

  • Contributor
  • ****
  • Posts: 254
  • Karma: +0/-0
    • View Profile
    • Buddah
Re: Flixel Power Tools
« Reply #53 on: Mon, Aug 1, 2011 »
Very cool. You rock Photon. :D
..."without order nothing exists, without chaos nothing evolves"... 
Zoklet.net

c023-DeV

  • Game Artisan
  • Active Member
  • ***
  • Posts: 176
  • Karma: +0/-0
    • View Profile
    • DeV-ZoO
Re: Flixel Power Tools
« Reply #54 on: Mon, Aug 1, 2011 »
I'd love to check out the Flod stuff and wanted to ask if there is also a way to somehow trigger the instruments of the tracker file?

For example: I have a kick drum as instrument and use it for bullet hits and different materials (tiles) throw different pitch values and different wepons maybe even different filter settings?

Sorry if that is written somewhere but I didnt find it yet and Im a bit headcrazy the last weeks since I started coding =D ... but I love it!

Have a nice time, you earned it!
If you aint got no dedication, you won't get no education!

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flixel Power Tools
« Reply #55 on: Mon, Aug 1, 2011 »
Sorry it's not possible to hook to instruments in Flod - it's because it pre-calculates a large chunk of the module into sample data in advance, and then basically keeps re-filling this buffer as it plays, so it's never really knowing about what instrument is playing currently.
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

wonkytonk

  • Member
  • **
  • Posts: 73
  • Karma: +0/-0
  • don't panic
    • View Profile
Re: Flixel Power Tools
« Reply #56 on: Tue, Aug 2, 2011 »
hey photon, thanks for all the great tools!
i was working with FlxControl the other day, and i wanted to build slowdown and speedup tiles, like braking or speed boost, when i noticed that there were speedup and slowdown functions already in FlxControlHandler that were still on the todo list, would these functions do exactly what i want or am i better off just figuring out another solution?
thanks!

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flixel Power Tools
« Reply #57 on: Tue, Aug 2, 2011 »
They are place-holder functions to do what you need, but I just didn't code them yet sorry! There's no reason why you couldn't put your code in there though :)
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

redherring

  • New Member
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Flixel Power Tools
« Reply #58 on: Thu, Aug 4, 2011 »
Hey Photonstorm
This is some pretty cool work man. I'm new to playing around with actionscript and you've literally saved me weeks of work! Thanks for this dude.

I'm having a bit of a problem with the FlxMouseControl plugin though. If I use it like this (in the create() function for my PlayState for example), it works fine:
Code: [Select]
            ball = new FlxExtendedSprite(FlxG.width/2-3,FlxG.height/2-3);
            ball.makeGraphic(6,6,0xff000000);
            ball.enableMouseDrag();

But if I make a new class for the ball (and then add it in my PlayState), I can't seem to get it to work:
Code: [Select]
    public class Ball extends FlxExtendedSprite
    { 
        public function Ball()
        {
            super(FlxG.width/2-5,FlxG.height/2-5);
            makeGraphic(6,6,0xff000000);
            enableMouseDrag();
        }
    }

Sorry if I'm being a complete idiot, but I'd appreciate it if somebody could point out what I'm doing wrong.

xraven13

  • Active Member
  • ***
  • Posts: 213
  • Karma: +0/-0
    • View Profile
    • GemaNeko
Re: Flixel Power Tools
« Reply #59 on: Sat, Aug 13, 2011 »
Hey... :)

I am having problem with transforming HSV color to RGB...

For example if I take some color from here, I took Alizarin Crimson for example :
http://en.wikipedia.org/wiki/List_of_colors

And I take HSV values in this format  355, 77.0 / 100, 89.0 / 100.  I don't get correct RGB color back...

I converted result like this   :   result.toString(16)  just to see what is exact difference....

I get this :0xFFE23442  , while I should get : 0xffE32636  ...

So any idea what I am doing wrong :s ??

Also, since I get AARRGGBB  format, how I can transform that to RRGGBB since that is what color property of FlxG.camera accepts.  I guess if I would pass number in AARRGGBB format, it wouldn't work right ?
« Last Edit: Sat, Aug 13, 2011 by xraven13 »