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] 4 5 ... 75
41
help / Re: flixel power tools flxDelay issue
« on: Tue, Dec 27, 2011 »
It doesn't, nope. It shouldn't be that hard to implement within it though.

42
help / Re: Flixel Power Tools
« on: Thu, Dec 22, 2011 »
I like to keep as little code as possible in a class constructor. There's no reason why it can't go in there though, just personal preference.

44
help / Re: Detecting clicks on a FlxSprite or FlxGroup
« on: Fri, Dec 16, 2011 »
The FlxExtendedSprite classes in my power tools will provide mouse clicks for FlxSprites, and lots more. So you could rip out the parts you need maybe.

45
help / Re: How to make an outline glow?
« on: Fri, Dec 16, 2011 »
Ah yeah of course the bitmapData.applyFilter approach too. I forgot about this as I rarely use it, because it's just so insanely slow!! Depends on your game though.

46
help / Re: How to arrange keyboard input code?
« on: Thu, Dec 15, 2011 »
Do both checks do the same thing? Or does the PlayState check for say "mute and unmute" and the player class check for movement?

If they do the same thing I'd refactor it and remove that - keep keyboard input in one central place, for your sanity as well as flixels. It doesn't matter if you do it in your PlayState and that tells your Player class "move left" etc, or do it in your Player class. If you only ever have 1 PlayState for the whole game there's no real benefit either way. If you're going to have more than one state (maybe multiple levels) then do it in the Player class.

47
help / Re: How to make an outline glow?
« on: Thu, Dec 15, 2011 »
You can apply a GlowFilter but only to Bitmap objects (or Sprites, but none of the Flixel level objects). There are ways of placing these kind of objects on-top of your flixel ones - the way I do the BlurFX plugin in the power tools for example could be made to work in this way. But personally I'd just create the glow in Photoshop and stick it over the top! Simple nearly always wins :)

48
:)

49
help / Re: FlxWeapon Problems
« on: Thu, Dec 15, 2011 »
Use FlxWeapon.setParent() to lock it onto a parent object and set the offset etc.

The x/y vars it needs must be publicly accessible. So in your case if Registry.soldier is an FlxSprite then you can just use "x" and "y". It those vars aren't visible you'll need to expose them.

50
help / Re: Disable in-game Right-Click?
« on: Thu, Dec 15, 2011 »
This needs to go in your Main.as:

Code: [Select]
var myMenu:ContextMenu = new ContextMenu();
myMenu.hideBuiltInItems();
this.contextMenu = myMenu;

You can't disable the menu entirely, it's impossible. But the above will remove lots of the items from it.

51
help / Re: FlxWeapon Problems
« on: Wed, Dec 14, 2011 »
Your pixel bullet colour needs to be in the format 0xAARRGGBB - as it stands now it'd be invisible as it's missing the alpha section.

Try bright red (or white 0xFFFFFFFF) just to see if you can see anything.

If you still can't, check the bulletBounds setting in FlxWeapon. And throw a trace into the fire block to be sure it's firing (it if definitely is then remove the bullet direction call, just to see what happens)

If you've done all of the above and it still doesn't work then my next guess would be the bullets could be colliding with the player sprite / map before you get a chance to see them.

52
help / Re: Lossless Collisions
« on: Wed, Dec 14, 2011 »
The transfer of velocity etc is performed by the separation part of the collision. You can over-ride this or just use FlxG.overlaps instead, and then you'll get raw collision data and not the separation part.

53
test84 - I'm running out of time to write a detailed reply here, but I thought I'd do the following for you (and anyone else reading) instead:

Here is the full source code to Cat Astro Phi.

It's Flixel 2.3, but the techniques I used for changing level, object/class structure, weapons, achievements, Registry, etc are all the same. So there might be something you can get from it!

http://sandbox.photonstorm.com/catastrophi/CatAstroPhi_Source.zip

54
help / Re: FlxSprite angle + Mouse interaction
« on: Fri, Dec 9, 2011 »
Yeah it does the click against the bounding box, not the sprite pixels. Turn on the debugger and object outlines, you'll see the green line around the sprite = the bounding box. For that you could use my power tools for a pixel precise click check.

55
help / Re: Bounding box and angle
« on: Tue, Dec 6, 2011 »
Sorry Flixel only supports bounding boxes in the way you've shown, it can't handle rotation of them and still process collision / separation. You'll need to find another solution to get the same result I fear.

56
help / Re: Binary numbers
« on: Mon, Dec 5, 2011 »
AS3 arrays are implemented as Objects (Hashmaps) that only accept numbers as keys. It's kind of silly.

Actually you can use anything as the key. String, Object ... The AS3 docs say to use an integer, but for some reason it doesn't actually enforce it even in strict mode.

57
help / Re: Parralax Scrolling
« on: Mon, Dec 5, 2011 »
Depending on the scale of your game, and by that I mean how many sprites you've got, levels, etc. I.e. how "big" your game is - you may find it less of a headache to just run the game at x1 zoom, so the backgrounds all work, and simply double the size of your sprites in Photoshop (etc).

If that's not possible then you'll need a transparent camera (they do support transparency btw, as the clearance color value) with the main game one zoomed x2 positioned on-top of the background. Managing scrollfactor values between multiple cameras will be a bit hellish though, more than I would care to mess with!

58
help / Re: FlxSave only works locally
« on: Mon, Dec 5, 2011 »
On Windows Flash settings for this are now stored in the Control Panel. Go in there, search for Flash, and check you've got space / etc.

59
help / Re: Only 4 sound simultaneously?
« on: Mon, Dec 5, 2011 »
There is a definite limit, but it's not set by flixel / Flash, more by your sound hardware. I'm guessing it varies dramatically per system. I've never hit the limit with a number as low as 4 mind you. Could it be that you are triggering lots of over-lapping sounds by mistake? Does sound in other flash games sound ok?

60
help / Re: Making Executable .exes
« on: Mon, Dec 5, 2011 »
The reason apps like Flapp put a "Powered by Flapp" screen at the start is because basically they did all the hard work for you, or getting the game to run as an exe. Credit where credit is due and all that.

I don't see the need for any 3rd party stuff like this any longer though - Adobe AIR with captive run-times can create Windows exes from your game, with full control over system chrome, window placement, etc AND uses GPU for rendering the normal display list. Captive run-times mean they don't need AIR installed at all. Our commercial games use this and it works great. And you don't need to "credit" anyone ;) Gotta take time to learn the process though.

Pages: 1 2 [3] 4 5 ... 75