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

Pages: [1]
1
I'm currently working on a project where I have an object (a tree) that updates the positions of it's childs (the leafs) manually.
However when using the follow() function of FlxCamera to follow the tree, the leafs start to jitter/shake and are lagging behind when scrolling with the camera. There is no shaking without camera scrolling, as long as I don't follow an object, everything's fine.

This is the update of my tree:

Code: [Select]
override public function update():void
{
super.update();

leaf1.x = x + 20;
leaf1.y = y;

leaf2.x = x;
leaf2.y = y;
}

This is how I call follow() :
Code: [Select]
var c:FlxCamera = new FlxCamera(0, 0, 640, 480, 1);
c.setBounds(0, 0, 640, 48000, false);
c.follow(tree, FlxCamera.STYLE_LOCKON);

FlxG.addCamera(c);

I tried different Camera Styles, but it didn't help.
I'm out of ideas and I hope someone can help me.

2
releases / The Future of Flixel - 3D
« on: Thu, Sep 23, 2010 »
Recently I was surfing the web, and I found this very neat info. Adobe will be implementing a full 3D-Engine in the future versions of flash.
Here's a demo of how this could look like
http://www.carlosulloa.com/demos/spaceship
(made with Papervision3D and not by me).
So I was wondering, if flixel will ever be able to support this engine. What do you think?

3
help / Problem with FlxSave when updating a game
« on: Sun, Aug 1, 2010 »
I've recently uploaded my game on some portals, and got a comment which says there is a minor bug in my game (forgot to remove an event listener).
I've fixed it, but now I'm not sure if I should update my game on the portals, because of the loss of the data. Uploading a new game would mean that FlxSave would save/load the data from another location, and so all players who already played my game would lose their saves.

Is there any way I can upload a new way without all players losing their data?

4
help / Re: Cutscene Animation too long
« on: Thu, Jun 17, 2010 »
Thanks for your replies, that really helped me. I think I'll use another way. But since I never did this, I'm just gonna try and ask: What would be a good way of making a cutscene (or something else like using a skill in an rpg) with flixel?

5
help / Cutscene Animation too long
« on: Thu, Jun 17, 2010 »
I created a interactive Cutscene as a FlxSprite (for various reasons). But somehow it seems as if the png the animation is loaded from is just too long (About 40 frames, each with 640*480px). As soon as it reaches a certain point it just loads empty frames. The animation still plays and everything works fine, except it doesn't get displayed. I'm currently using the latest stable Flixel version and Flex SDK 3.
So my question now is, if that is a bug in Flex SDK 3, if it's just not possible because it's too long, or if there are some other ways to avoid this problem. I'm currently kind of stuck, because all of my game is building up on these cutscenes.

Here the code how I'm loading the Graphic
Code: [Select]
this.loadGraphic(cutscene2, true, false, 640, 480);
this.addAnimation("play", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], 10, false);

I guess there's no problem with that, since it works with an animation smaller than that (17 frames, 400*200px)

6
help / Re: Collide Question...
« on: Mon, Apr 5, 2010 »
Well, an object that is solid and able to collide with another, of course can't overlap that one. So if you want to move through it you have to set stuff.solid = false;
Then you can test with _player.overlaps(stuff).

I hope this helped you.

7
help / Re: Modifying velocity after collision!
« on: Tue, Mar 16, 2010 »
Try out the following:
Write it before the super.update() if it's currently under it.
Write it after the super.update() if it's currently before.

I'm not really sure which one it was, but I had the same problem and it was easy to solve like that.

8
help / Re: Performance Issues
« on: Tue, Mar 16, 2010 »
@Bjorgen, I'm always using the debug flash player for debugging, and if i've got a stable build there, I'm trying it out in release flash player to test performance.

@lithander, That's a very nice approach you got there, and I'm definitely gonna remember that for the future. But this time it's not the Garbage Collector. The Total Memory used is always at around ~15700000, and it never goes above 16000000, and I think 300000 bytes shouldn't be that much of a problem^^

@abielins, I tried it out now with Flex SDK 3.4 and compiling with Flash Player 10. That definitely helped a lot. For now I can't see any lag.

Thanks everyone for your posts, this surely helped me a lot.

9
help / Re: Performance Issues
« on: Tue, Mar 16, 2010 »
No, I always used FlxG.elapsed as far as I can see. I used it in about 5 different classes like this in the update function:
Code: [Select]
if(timer > 1.5){
  doSomething();
  timer = 0;
}
timer += FlxG.elapsed;
But i don't think that should be any problem. There are far more complex calculations.

One thing that's bugging me is the following. Like I said it's lagging all 10 seconds a bit (on different computers/browsers), but the framerate never drops when it lags. Could this be more of a problem with Flash Player? I'm currently compiling with Flash Player 9.

EDIT: I'm using Flex SDK 3.5 right now (yes the milestone version, not the stable version  ::) ), currently loading 3.4 to try out if it helps.

10
help / [Solved] Performance Issues
« on: Mon, Mar 15, 2010 »
So I'm nearly done with my new Flash Game, and somehow it's lagging quite a bit (like all 10 secs it is stuck for 0.1 secs). The FPS are ALWAYS above 55. What could be the issue here? I'm compiling in release mode when I want to try out the performance, and in my code there shouldn't be too many stuff like colliding and overlap to make this happen (I did once and the fps dropped to 30, which is not the case here)

11
help / Re: Build Can't be Complete.
« on: Fri, Mar 12, 2010 »
It surely isn't flixels fault. You probably just extracted flixel to a false directory.
Your directory should look like this.

-Game
  -doc
  -src
  -org (the directory where flixel is stored in)
  -yourMainClass.as
  -all other classes

Then you can just import org.flixel.* in your classes

12
help / Re: Problem with FlxKong in 2.x
« on: Thu, Mar 11, 2010 »
Ah, thanks for your help. Unfortunately now I'm getting a null-pointer-exception at this line of code
Code: [Select]
if (FlxG.kong) {
   FlxG.kong.API.stats.submitArray ( [ {name:"Souls gathered", value:countCoins}] );
}

13
help / Problem with FlxKong in 2.x
« on: Wed, Mar 10, 2010 »
I'm currently using a way to use the Kongregate API by using flixels built in class FlxKong, but it doesn't work as intended. My code looks like the following and is the same Adam Atomic posted somewhen.

Code: [Select]
if(!FlxG.kong){
  var g:FlxKong = new FlxKong();
  g.init();
  FlxG.kong = g;
}
if(FlxG.kong){
  FlxG.kong.API.stats.submitArray( [ { name:"level", value:someValue } ] );
}

Unfortunately I'm getting a Null-Point Exception here in FlxKong at line 37 (That's the first line of the init() function)

I hope someone can help me.

14
help / Re: Flixel Intro
« on: Wed, Mar 10, 2010 »
Woah! Sexy preloader. :D Good job Adam!

And thanks for the tip about swfcabin, had no idea. :)

Yep, the new Preloader is very neat. Very well done Adam!
Anyways, thank you guys for your help

15
help / Flixel Intro
« on: Tue, Mar 9, 2010 »
Since 2.x it's missing, and I really liked it. So my question is:
Is there still some sort of old or new flixel intro which I can enable?

16
help / Colliding FlxTileblocks and FlxSprites
« on: Sun, Feb 21, 2010 »
Well it doesn't work. I tried to program a moving FlxTileblock which should just push my player (FlxSprite). But like every 10th time the tileblock is just passing through my player without ever colliding.
The Tileblocks width is 50 px, the height 10px and the loaded Image is 10x10 px (Don't know if this somehow matters)

17
help / Re: Problem with redrawing a Level
« on: Wed, Feb 17, 2010 »
FlxLayers simply need to be changed FlxGroups and make sure they are added to the stage in the right order. Thats all the advice i can give.
Thanks for the help, I didn't know you could add the FlxGroups in the right order and change them afterwards to have all your stuff in the right order.

18
help / Re: Problem with redrawing a Level
« on: Wed, Feb 17, 2010 »
Tried that out right now, but unfortunately it didn't work  :-\

19
help / [Solved] Problem with redrawing a Level
« on: Wed, Feb 17, 2010 »
After redrawing a Level, my player is behind my Level. Of Course I know why this happens, but I don't know how to redraw my Player to get him back on Front.
I'm using the newest flixel version, so all these tutorials about FlxLayers (I think this got something to do with my problem) are really useless.

Pages: [1]