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 - photonstorm

Pages: [1] 2 3 ... 75
1
Congratulations guys. I've made this topic sticky in the hope that more people will see it.

2
help / Re: Flash Game Dev Tips
« on: Thu, Oct 10, 2013 »
Un-sticking this thread, it's been a long time since I worked on these tutorials and things have moved on.

3
If loadRotatedSprite is visually too messy for you but good enough for collision then use a non-rendered sprite for the collision checks and place your 'real' one on-top of it so it still looks good.

4
Tipo - just to explain why what you're doing doesn't work: Flixel objects are not traditional Flash DisplayObjects, which is why you can't add event listeners to them (or do any of the other stuff you normally do with MovieClips/Sprites).

5
help / Re: Removing a nested object form a FlxGroup.
« on: Mon, Oct 1, 2012 »
Yes, but I'm still not 100% clear why the need for it to all be split up into different pools. In fact you could probably get away with having just 1 bullet pool (with lots of different types of bullets flying around within it). Anyway just thinking out loud, extending FlxGroup to scan nested groups should be pretty quick to do and might solve this (as long as it doesn't get stuck in a loop down there :)

6
help / Re: Bitmapdata sucking up a lot of memory
« on: Wed, Sep 26, 2012 »
I still reckon something else is causing your speed issues. 32MB is very little indeed. I wouldn't care until it was into the hundreds of MBs personally. I'd start looking elsewhere for the issue (game resolution, objects being created and not destroyed, memory leaks, etc). Start cutting your code back down until there's no problem, then see what causes it to fall over.

7
help / Re: Bitmapdata sucking up a lot of memory
« on: Mon, Sep 24, 2012 »
32MB is nothing. I wouldn't even care unless you start getting into the hundreds of MBs used, OR if the memory is just constantly increasing (i.e. you've got a memory leak somewhere)

8
help / Re: Removing a nested object form a FlxGroup.
« on: Wed, Sep 19, 2012 »
Could you explain the set-up a little for me? i.e. current structure. I'm still thinking that just having multiple pools will work - it's the quantity of live objects in a pool that slows flixel down, not the quantity of pools.

9
help / Re: Removing a nested object form a FlxGroup.
« on: Mon, Sep 17, 2012 »
My first question would be "why do you need to remove the bullet from one group and add it to another?" - changing a bullet pool size on the fly isn't that wise, it's best to keep it the same size constantly. Could you simply hide/kill the bullet you want to 'remove' and then spawn a new one matching its properties in this new group of yours?

10
help / Re: Power tools 1.9 weapon help
« on: Sun, Aug 5, 2012 »
You need 2 weapons, one for you, one for the baddies. You just don't need 1 weapon PER baddie.

11
Get someone to compile the FLA into a SWF for you and inject it into your preloader. Or if the FLA just contains maybe 1 movieclip then I'd publish to an SWC and embed that into your project and just display the clip in your preloader.

12
help / Re: Power tools 1.9 weapon help
« on: Thu, Aug 2, 2012 »
The weapon can have it's "fire from" coordinates changed as much as you like, so there's no reason why all the enemies can't use one single weapon, they just make sure they 'fire from' their coordinates, not the base weapon coordinates.

13
Just create a new blank project and copy the files over? The only thing you'd have to change is the path to the SWF in the index.html - and by default it sets the width/height to 100%, so that'll need changing to the actual size too, but that's all.

14
help / Re: Recording flash games with...?
« on: Thu, May 17, 2012 »
Nice, I've not used it in several years - they must have updated it a lot, it was never able to do that :)

15
help / Re: Recording flash games with...?
« on: Wed, May 16, 2012 »
I thought Fraps only recorded full-screen (DirectX based) stuff? You need something that will record the contents of a window like Camtasia.

16
help / Re: Numbers
« on: Sun, May 13, 2012 »
var a:Number = 34.666999;

trace(a.toFixed(3)); // 34.666

17
Flash is designed for running movieclips, it's what it is good at! and it does it very very well. If you really need to shove a clip into an flxsprite I see two choices - render the frames to a sprite sheet at run time (feels a bit heavy to me) or just use an invisible flxsprite of the same size to act as the "actor" in the game and shove the movieclips on the top, following it's x/y coords.

18
CS6 exports a JSON file with the sprite sheet, which you'd use in html5 based games to know where to cut each frame from. There are other tools that do this, Texture Packer being probably the best, but the free ShoeBox and Zoe might also be worth looking at.

As for using any of the above for flixel I just don't see the point! Keep your movieclip and just use it in your game. Convert it to a sprite sheet on the fly via code if you really need to.

Yeah there is loads of wasted space in sprite sheets usually. It's because CS6 exports it frame by frame, flickerbook style and doesn't optimise it into a proper texture atlas (I've no idea why not). This is much less of an issue in flash games where png's can be compressed nicely, but it's a real problem for html5 games.

19
help / Re: Taking screenshot of the game
« on: Fri, May 4, 2012 »
The only reason draw would fail when uploaded is if the stage contains elements not part of the local swf. I.e. you downloaded some external assets and put them on the stage. Then you're invoking sandbox security issues, so look at that.

20
help / Re: Taking screenshot of the game
« on: Thu, May 3, 2012 »
There's nothing wrong with the code. draw() is perfectly valid no matter where the SWF is running. What's not allowed is using a FileReference to save the screen shot unless the call to that op came explicitly from a MouseEvent listener.

Pages: [1] 2 3 ... 75