Author Topic: Flash Game Dev Tips  (Read 52829 times)

Jimbo

  • New Member
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #20 on: Wed, Apr 20, 2011 »
The Test Suite works fine with the version of Flixel included in the download (Flixel v2.5 Patch 1.0), but for when I use that version in any other project it causes compiling errors in pretty much every instance a Flx class references FlxCamera, saying various methods in that class are undefined.

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #21 on: Wed, Apr 20, 2011 »
Hmm it still sounds like a structural issue to me (project structure, mixture of versions).

Let me try the test suite when I get back with the latest dev branch of flixel (although I'm sure the version in svn was updated very recently.. although not in the zip file).

But if the Test Suite works with flixel 2.5p1, then there's no reason why copying that version of flixel to a new fresh project, and just coding, shouldn't work too?
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: Flash Game Dev Tips + Flixel Power Tools
« Reply #22 on: Fri, Apr 29, 2011 »
Forgot to mention this:

To get Flixel Power Tools to compile properly I had to change all the hexadecimal numbers (0xXXXXXX) from int to Number. It was giving me an error because it was an int and not a number...

choifish

  • Member
  • **
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #23 on: Fri, Apr 29, 2011 »
I had the same problem, but I think I solved it by updating to the newest version of Flex.

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #24 on: Fri, Apr 29, 2011 »
This must be Flex specific as I get no such compiler errors from 4.0 or 4.1 - are you still on an old release? v3?
http://www.photonstorm.com



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

XanderXevious

  • Contributor
  • ****
  • Posts: 360
  • Karma: +0/-0
    • View Profile
    • Deadly Alien Microbots
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #25 on: Fri, Apr 29, 2011 »
It just needs to be a uint, not a Number.

It's incompatible with Flex 3 according to these docs:

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/uint.html
Quote
the number 0xFFFFFFFF, which represents the color value white with an alpha value of 255, can't be represented using the int data type because it is not within the valid range of the int values.

It might be worth changing those to a uint so it's compatible with Flex 3, assuming that doesn't break anything with Flex 4

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #26 on: Sun, May 1, 2011 »
Ok, the version in svn now uses uints for all colour values, so should be flex 3 savvy. Note - only in svn, this won't make it to the download version until v1.5 is released.
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: Flash Game Dev Tips + Flixel Power Tools
« Reply #27 on: Thu, May 5, 2011 »
How do you use Flixel power tools in 2.5 these days?
I don't really understand how plug-ins work.

Thanks,
Mint

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #28 on: Thu, May 5, 2011 »
It's even easier, just copy the photonstorm folder into org.flixel.plugins !

The page on my site describes the process clearly.
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: Flash Game Dev Tips + Flixel Power Tools
« Reply #29 on: Thu, May 5, 2011 »
Sorry photonstorm I can't seem to find the page the describes the process clearly. I put the plugin into org.flixel.plugins but I still don't know how to access the classes  :-\

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #30 on: Thu, May 5, 2011 »
An overview of what all the classes do is here:

http://www.photonstorm.com/flixel-power-tools

But the easiest way to learn is to open up the Test Suite and look at the source files - there are loads of them, one or more for each plugin. If you want to learn how to use the scroll zones, then look at the 4 scroll zone test source files, they are all documented, as are the classes themselves.
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: Flash Game Dev Tips + Flixel Power Tools
« Reply #31 on: Fri, May 6, 2011 »
I totally forgot about the test suite, sorry.
Now it's up an running, I just had to import org.flixel.photonstorm.*
 :)

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #32 on: Wed, May 11, 2011 »
Last night I updated the Flixel Power Tools significantly. There are now a bunch of new classes, including a Special FX class which uses its own plugin system to keep things clean.

I also wrote a 6 page Getting Started guide.

And the whole project has now moved to github, with a lot friendly structure for beginners, and quicker to get started. The Test Suite was also updated with lots of new demos and a small re-jig of the design.

Full details here:

http://www.photonstorm.com/archives/1332/flixel-power-tools-v1-5-a-monster-of-an-update
« Last Edit: Wed, May 11, 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

St.Penguin

  • Member
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #33 on: Wed, May 11, 2011 »
Photon, thanks for your continued work on the power tools, a huge help to beginners and a time-saver to many!
That said, gladly updating now.

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #34 on: Tue, May 17, 2011 »
v1.6 is officially released! Includes an extremely handy new class called FlxControl, some bug fixes and a new Special FX. Full details here:

http://www.photonstorm.com/archives/1338/flixel-power-tools-v1-6-released-including-flxcontrol
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: Flash Game Dev Tips + Flixel Power Tools
« Reply #35 on: Thu, May 19, 2011 »
Hey photonstorm I have a suggestion.
Can you turn flxhealthbar just into FlxBar?

Where instead of just following a sprite's health, we send in
what value we want to the bar to follow. For example if I had a public variable
powerUP:int = 5; I should be able to do

public function FlxHealthBar(Parent:Flxsprite, FollowNumber:Number, Width:int, Height:int, Min:uint = 0, Max:uint = 100, Border:Boolean = false):void

If we want to do health we can just call FlxObject.health()

What do you think?

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #36 on: Thu, May 19, 2011 »
That's not a bad idea actually - then you could use it for progress bars, etc too. You'd also have to set the min/max limits that value can ever be, otherwise it'd be impossible for it to know how far along it was.

I'll add it to the list. Am just finishing Extended Sprites first.
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: Flash Game Dev Tips + Flixel Power Tools
« Reply #37 on: Thu, May 19, 2011 »
Awesome, can't wait for the new update  :)

foosety

  • Member
  • **
  • Posts: 88
  • Karma: +0/-0
    • View Profile
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #38 on: Mon, May 23, 2011 »
I have another idea to add on to the FlxBar idea I had earlier (if you haven't already thought of this). When creating the FlxBar it would be nice if the user is able to add a callback function when the bar is empty and/or when the bar is full. Thanks Photon.

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Flash Game Dev Tips + Flixel Power Tools
« Reply #39 on: Tue, May 24, 2011 »
Sure that should be pretty simple to add, have added it to the list.
http://www.photonstorm.com



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