Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - GrimPanda

Pages: [1] 2 3
1
chat / Re: Forum Upgrade
« on: Thu, Sep 29, 2011 »
The "Flixel Forum Upgraded" link at the top right of the site links to : http://flixel.org/forums/index.php/topic,4663.0.html

it should be http://forums.flixel.org/index.php/topic,4663.0.html

=)

2
help / Re: Flixel and C++
« on: Sun, Jul 24, 2011 »
Also, if you're going to be using something as powerful as C++ and you're making a professional large scale game. Then use a C++ library. :/

Oh come on, we all want Flixel to be the "One Library/Engine/Language to Rule Them All".  FlixelPy, FlixelPHP, VisualFlixel, Flixel++, Flixel#, FlixelScript, myFlixelSQL, Flixel4Tran, FlixelML, and of course Flixelish which by 2020 will be the world 'common' tongue.


3
help / Re: .net mag Tutorial
« on: Sun, Jul 24, 2011 »
Ok Firstly I would like to say,  Great Tutorial,  It got me into using Flixel. 

Welcome to Flixel ! :o)

4
help / Re: indexOf() and FlxPoint
« on: Sun, Jul 24, 2011 »
it seems that you can't do that. indexof() will search for instance reference not what it contains. So you will need to make a loop to find what the array contains, and if it doesn't find anything, create a new one

Ahh ok, glad to know I wasn't just missing something here.  That's pretty close to what I ended up doing as well.  Thanks!

5
help / indexOf() and FlxPoint
« on: Sat, Jul 23, 2011 »
If I have an array of FlxPoints, how would I use indexOf() to see if a FlxPoint already exists inside the array?

Example:

Code: [Select]
var pointArray:Array = new Array();
pointArray.push(new FlxPoint(0,0));
pointArray.push(new FlxPoint(0,1));
pointArray.push(new FlxPoint(1,1));
pointArray.push(new FlxPoint(1,3));

//The following line should not execute (IE a FlxPoint of 1,1 exists above)
if (!pointArray.indexOf(1,1)) pointArray.push(new FlxPoint(1,1);

So in the example, I have a point index of 1,1 in the array, but I have no idea how to actually check for that value... Thanks!!

6
I'm drooling right now.  This would certainly be a very big hit with many many people.  I think most of the big ones have been touched upon already, but I'll put my brain on it and see if I can come up with some other things.

7
help / Re: Flixel mouse on top of Dynamic objects
« on: Fri, Jul 22, 2011 »
Try this:

Code: [Select]
FlxG.stage.getChildIndex(FlxG.camera.getContainerSprite());

Hey Rich,

That gives me the same error as before:

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.


This is where I'm stuck.  I don't know enough about the AS language to understand what's going on here, and this being a somewhat Flixel specific error in this situation, my usual Googlefoo is weak here.  :o)

EDIT: I'd really love to see this topic solved.  I've seen many many threads with variations on this theme, and I a definitive answer would be great to have on the forums, so rather than kludge my way through it, I figured I'd let one of you pro's nail it down.

8
help / Re: Flixel mouse on top of Dynamic objects
« on: Thu, Jul 21, 2011 »
Anyone that can help with this?

9
help / Re: Flixel mouse on top of Dynamic objects
« on: Tue, Jul 19, 2011 »
If you get the child index of the camera, and add your own display object (movieclip) to that index, the child index of the mouse will go up, and your movieclip will be under it.


Attempting to trace this value yielded nothing but errors, so clearly I'm doing something wrong :)

Code: [Select]
trace("Camdex: " + FlxG.stage.getChildIndex(FlxG.camera));

-or-

trace("Camdex: " + FlxG.stage.getChildIndex(FlxG.camera as DisplayObject));

#1 Errors with "Implicit coercion of a value of type org.flixel:FlxCamera to an unrelated type flash.display:DisplayObject" at compile.
#2 Errors with "Child Parameter must be non-null" (but hey, did I really think that dirty type cast would work out?)

Assuming I could get the index, I'm guessing I would then do something like this (with working code for the index):

Code: [Select]
var myMC:MovieClip;
FlxG.stage.addChildAt(myMC = new MovieClip(), FlxG.stage.getChildIndex(FlxG.camera));
myMC.addChild(foo); myMC.addChild(bar);

So I think I'm on the right track... ( or hope so ), but I still need a bit more hand holding on this code if that's ok?


10
chat / Re: Self-deprecation on the website
« on: Tue, Jul 19, 2011 »
I think you guys misunderstood what Initials meant.
Not the actual examples, but how they have been presented in the website. Here http://flixel.org/help.html

Ahh! 100% agree.  This really should be changed, I remember reading this and thinking... "really??".    My bad for not understanding at first.

11
Why are you trying to remove the middle of it? It's a homogeneous array (all elements are the same), so just pop one off?

12
help / Re: Best method to embed resources?
« on: Fri, Jul 15, 2011 »
Awesome thanks!  I'll have a look into this :o)

13
chat / Re: Self-deprecation on the website
« on: Fri, Jul 15, 2011 »
Those games are there for starters to dive in and start up with code in a relatively quick way, I think Flixel is a very newcomer friendly and that is one of it's strengths.  If the visitor is already experienced, and ready to dive into to more complicated builds, I don't think they would even notice those.  They would be searching for something entirely different such as optimization, abilities, flexibility, and speed etc of the engine.


That's my two pennies anyway...

14
help / Re: [Help]Radiobuttons & Comboboxes
« on: Thu, Jul 14, 2011 »
You can also use the flash native components (if you have that IDE), by just opening a new flash document, adding the necessary components you want to use to the library and then exporting a swc.  You can them call them normally in As3 projects.

http://joshblog.net/2008/02/10/how-to-use-the-flash-cs3-component-set-in-a-flex-builder-actionscript-project/

Is a good example of how to do this. 

Then simply:

Code: [Select]
import fl.controls.ComboBox;
import fl.data.DataProvider;
import fl.controls.RadioButton;
import fl.controls.RadioButtonGroup;

private var _myCombo:ComboBox = new ComboBox();
FlxG.stage.addChild(_myCombo);

etc...

15
help / Re: Flixel mouse on top of Dynamic objects
« on: Thu, Jul 14, 2011 »
You'd have to do this:

Code: [Select]
FlxG._game.addChildAt(mymenu, FlxG._game.getChildIndex(FlxG._game._mouse));

But sadly the _game._mouse is only available within FlxG.

So I'd suggest you either hack a new function into FlxG to do the above (passing it your display object) - or if you only ever have a fixed (non-changing) number of cameras in your game then you can assume what the display index will be and add it directly there (each camera = a new object on the display list).

Would it be possible to get an example of this?  I'm having the exact same issue, and I'm really not understanding how this would work... 

EDIT: Also, I don't mind using the flash system mouse at all, but it seems that when I use that, my FlxButtons don't receive a mouse event from them.  So they are 'unclickable'.  Either fix would be great, whichever is easier.

16
games / Re: Twitchpack- fly a jetpack
« on: Wed, Jul 13, 2011 »
Unless you have to sign in to play (which I doubt), I just get a black screen when I get to the page.  No game loads.  Chrome 12. FL player 10.x

UPDATE: I think this is a "me only" thing with some of my security settings in flash, as I have seen this with some other games.  I believe it has something to do with third party information, as I deny all.

17
games / Re: NumBlock
« on: Wed, Jul 13, 2011 »
A retry/main menu/new level   popup would be cool after a level failure

18
FlxG.worldBounds = new FlxRect(0, 0, tilemap.width, tilemap.height);

works but..... why do i have to do this?

This is always a good practice anyways in my opinion.  This was a standard line in any code I wrote previously. This rect shape makes many things a breeze too such as positioning game elements, and other little tidbits you'll discover as you make use of it. 

19
help / Re: Blend Mode on FlxTilemap?
« on: Wed, Jul 13, 2011 »
Ah ok, my quick dirty fix won't work for your issue.   :-\

20
help / Re: Best method to embed resources?
« on: Wed, Jul 13, 2011 »
If you use the same PNG across multiple classes (using the Embed directive at the top) then it will be compiled every single time for each class. So if the PNG is 200KB then it'll be 200KB x however many classes you embed it in.

I had wondered if this was the case.  Glad I asked  :o

To get around it you can either put the "common" assets into a single class and reference them statically. Works fine, pretty easy to maintain (to a point). Or you can package up all the assets in the Flash IDE library, give them linkage names, and export as an SWC which is then linked into your project. Cleaner, easier to manage imho, and you get the benefits of compressed JPEGs with transparency, which Embed can't handle. Of course if you don't have the IDE it makes this part hard!

That is what I'm doing currently.  I like the SWC idea too, never thought of that.  I'm just beginning to understand the power of these little guys.   8)

Photonstorm replied before me :-P I thought that the EMbed directive compiled once per generated .SWF, so Embedding in two classes did not increase the SWF byte size.

I had been operating under the same presumption.  But there was this funny feeling that I should ask... heh.

...the Singleton class was generated by a Python script that read a CSV list with the file values and the type. If you'd like the script code I cant embed it here for you.

That's what I do currently as well, but without the .py and CSV fanciness you are using.  I'd love to see what you are using if you don't mind.  The game I'm working on right now has dynamically updated content, so while SWC's will work for my more static games, I think this would be a nifty approach for something like this and during devel.

Thanks!  ;D

Pages: [1] 2 3