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

Pages: 1 [2] 3 4 ... 23
help / Re: Smooth game.
« on: Tue, May 31, 2011 »
My computer is definitely old enough to not like rendering with 60, 60.  It'll do it some times, but probably not if you're doing anything interesting on screen. ;)

Cool, awesome job!  I'm sure this'll be very useful for those trying for native Android support.

help / Re: Two questions (adding darkness to the game)
« on: Tue, May 31, 2011 »
Check out this dynamic lighting tutorial.  The code is a bit old, but the idea is the important part.

I would say just do it with a level editor that saves to a text file.  When you recompile, it will have the updated files.  Alternatively, you could have it load from an external file rather than embedding, but it would be a bit more work.

help / Re: help with Flxtext
« on: Tue, May 31, 2011 »
It'd be as easy as making a FlxText at their location when they die.  You could either add it to the state after they die, or add it at creation and just make it visible when they die.

Hard to say the best way to recycle objects without knowing how your game plays, but you should definitely not try to just keep creating new FlxTexts if you can avoid it.

Definitely #2.  #1 is super, super, super, super, super, super slow and definitely shouldn't be considered.  #3 probably isn't much better.

Blitting a BitmapData is quite fast, but drawing a MovieClip or Sprite is painfully slow.

There's no need to add your BitmapData to the stage since Flixel already uses BitmapDatas for pretty much everything--each camera even has its own buffer, which you could draw directly to, bypassing as much or as little of flixel as you might want.

help / Re: Sprite strips for prototyping/advice
« on: Sun, May 29, 2011 »
I haven't used DAME, but I'm sure it can take spritesheets just fine.  Flixel has supported them for a very long time now.

If you're looking for openly licensed graphics, check out Open Game Art.

help / Re: Sprite strips for prototyping/advice
« on: Sun, May 29, 2011 »
Why do they need to be strips?  What's wrong with sheets?
Or am I misunderstanding the question?

help / Re: Starting Out
« on: Sat, May 28, 2011 »
It's really a bad idea to learn Flixel before having a really solid understanding of as3 ya know. :/
Really?  It was the very first thing I ever used in AS3, and we got along wonderfully...

help / Re: Some doubts
« on: Thu, May 26, 2011 »
Hey!  Fortunately Google Translate is pretty decent! ;)

- Using ActionScript can I do with my game, which is running in a browser, verify that the user already has the files needed to run the game installed on your computer?
Browsers and servers are already set up to do this; you shouldn't have to do anything else.

- The Flixel allows the loading of external images (Using the Loader class for example)? Or the images used may be embedded in the game (using the Embed)?
flixel doesn't have this built-in, but you can surely get it to work.  Try searching around the forum a bit; I've seen it brought up in the past.

- How to Flixel makes the process of rendering images? How is this process briefly?
It relies on bitmaps instead of vectors, which are much faster to render.

- How do I remove one of the main memory image that was loaded using the Loader class? I tried using the unload () method but nothing happened.
No idea there, sorry!

help / Re: Help using Flixel in Flash CS5
« on: Sat, May 21, 2011 »
Well I don't have the Flash IDE, so I don't know how to set it up that way.  But the error is complaining that it's not src/org/flixel, and moving it into src is the easiest way to fix that.  Maybe you can put it inside its own folder, then use that one as the classpath?  (i.e. flixel/org/flixel, and setting the main folder as the first flixel directory)

The Flash IDE isn't worthless, but it's not meant for pure AS3 coding--for that, FlashDevelop is vastly superior.

Personally I have a copy of flixel inside every game, since I don't have that many, and I some times make small changes to flixel for a specific use.

help / Re: Help using Flixel in Flash CS5
« on: Sat, May 21, 2011 »
Try putting the org folder inside of src.  Shouldn't have to add extra class paths that way.

Also, if you aren't using any of the Flash IDE's features, I'd recommend switching to FlashDevelop.  While it is a lot of work to use an editor you're not familiar with, FlashDevelop is by far the best AS3 editor available, and is more tailored to working with a pure-AS3 library such as flixel.

If you want it to scroll down pixel-by-pixel and not tile-by-tile, you'll probably have to roll your own.

You could have a FlxSprite falling onto a FlxTilemap, and when it hits, it fills in those tiles.  That way flixel would take care of collisions for you, and it shouldn't be too difficult to set up!

Is there a way to reference all that material, or do i have to load it all back in during the playstate, as some sounds seam to linger and then be discontinued from the master volume control.
Use a static variable in another class.  I personally put most of my stuff inside a class named Assets.

I'm trying to get a never ending scroll, with a camera follow, but I've kind figured to have have a wrap around on my background image, with camera bounds,
and have and _play.x check long before at the part where the map repeats.
Check out PhotonStorm's Power Tools--specifically FlxScrollZone.

The camera zoom seams to go from the origin and masks away that of the original screen-size
Not sure what you mean by this.  A picture example would probably help explain it best.

left and right arrows +/-3 angle right now, as I'm not smart enough to work out the strip animation in time.
flixel has angle built-in already.  Just make your sprite in one direction and use loadRotatedGraphic() to bake them all into a sprite sheet at run time.  If you use loadGraphic(), it will rotate it every frame (and thus be much slower).

However I Need to tinker with velocity and I'm having trouble rationalising (due to in-experience) what I need to tinker with.
I would suggest checking out thesource to FlxTeroids for an example of how to implement thrust.

Hope that helps!

help / Re: Implementation-specific weirdness
« on: Wed, May 11, 2011 »
My guess is B.  Flixel is trying to push the object down (gravity) and the ground is pushing back out (since the player is colliding).  Unfortunately, it's not doing it at an integer level.

The easiest thing you could do is just floor the y value after calling super.update().  Theoretically that should work... :P

If not, maybe someone else has a solution (although it might be entirely different in 2.5).

help / Re: Starting Out
« on: Tue, May 10, 2011 »
Umm... it's pretty much mangled in every way possible. ;)

Take a look at this Hello World PlayState.

I would also suggest reading FlashGameDojo tutorials as per your first post.

help / Re: Implementation-specific weirdness
« on: Tue, May 10, 2011 »
It could be due to some rounding error.  I.e. your bullets aren't lining up at an integer number, but rather some long floating point (e.g. 200 versus 200.494949494949494).  You can easily test that out by logging the value of its y coordinate.   If it turns out to be the case, try something like flooring the number (just cast it to an int).

help / Re: Sounds
« on: Sun, May 8, 2011 »
You probably want to steer away from wavs unless you want your game to be huge.  The next best thing would be OGG, which you'll need an additional library to play.  If you're using 8-bit sounds, I strongly suggest checking out bfxr.

help / Re: How does the jumping algorithm work?
« on: Sun, May 8, 2011 »
Yep, perfect!

help / Re: How does the jumping algorithm work?
« on: Sat, May 7, 2011 »
Can somebody please explain the step by step process on how flixel computes jumping? How does flixel know the maximum height of the jump? How does it do the slowing down before reaching the maximum height of the jump?

It actaully doesn't do any of that.  All you're doing is giving it a negetive velocity on the Y axis, and then gravity takes care of the rest.  You probably set up gravity with acceleration.y.

Think of a coin.  When it's resting in your hand, gravity is still pushing down on it (but the ground is pushing back, so it can't go anywhere).  Then you want to flip it, so you flick it up into the air, by giving it negative velocity on the Y axis.  Every frame, gravity is still trying to take the coin down, but it has to slow down to a halt first.

help / Re: Text is not showing up (None at all)
« on: Sat, May 7, 2011 »
Sounds like the font you are using is not installed on the computer you're building the swf with.
Well that doesn't make sense, since they're embedded in the SWF. ;)

My guess is that you're using a weird version of flex with it.  Open up and look for a line like this:
Code: [Select]
[Embed(source="data/nokiafc22.ttf",fontFamily="system",embedAsCFF="false")] protected var junk:String;
You may have to remove (or add!) that embedAsCFF="false" part.  In older versions of flixel, there is a similar line just below the active one, which you can uncomment.

Hopefully that fixes it!

Pages: 1 [2] 3 4 ... 23