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

Pages: 1 2 [3] 4
41
help / Re: avoid easing in camera follow
« on: Sun, May 23, 2010 »
I'm Still trying to figure out how to use the attributes followLert and followAdjust.

I need two things:

- Remove the easing when follow a target.
- Make the camera look down when the character cross a bridge. The character must still be in the frame, but the camera must show the scene under the bridge.

Is this possible with the actual behavior of the camera?


Thanks

42
help / avoid easing in camera follow
« on: Tue, May 18, 2010 »
How can I disable the easing of the camera?

Thanks!

43
help / Re: Dynamic water reflection - Solved!
« on: Mon, May 17, 2010 »
Post an example!!! :-D

44
yea, but, the problem is that if the hero is not dashing(has not enough speed to break the glass) the collision should be solved normally. Is there a way to cancel the collision resolution from the hitRight function?

45
help / Break glass routine on the breackeable sprite
« on: Sun, May 16, 2010 »
I'm making breakable objects, but I want that the routine that checks the collision lays inside the breakable object.

What I do, is override the "hitLeft" routine, there I check if the Contact object is the type I need(Player) and if it state is the right(dashing). If this is positive, I destroy the object(solid = active = visible = false);

The problem is that the dashing object stops(as a result of the collision resolution).

I need the dashing object keeps it's velocity while the I keep the code for the reaction inside the breakable object. Any ideas?

46
Some more data. I'm using a class that extends from FlxTilemap. In this class, I override the "renderTilemap" method.

Code: [Select]
package weremsoft.customFlixelClasses
{
import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Rectangle;

import org.flixel.FlxG;
import org.flixel.FlxTilemap;

public class CustomFLXTileMap extends FlxTilemap
{
public var renderBuffer:BitmapData;
public function CustomFLXTileMap()
{
super();
renderBuffer = new BitmapData(FlxG.width * 2, FlxG.height, true, 0x00ffffff);

}



protected override function renderTilemap():void
{
getScreenXY(_point);
_flashPoint.x = _point.x;
_flashPoint.y = _point.y;
var tx:int = Math.floor(-_flashPoint.x/_tileWidth);
var ty:int = Math.floor(-_flashPoint.y/_tileHeight);
if(tx < 0) tx = 0;
if(tx > widthInTiles-_screenCols) tx = widthInTiles-_screenCols;
if(ty < 0) ty = 0;
if(ty > heightInTiles-_screenRows) ty = heightInTiles-_screenRows;
var ri:int = ty*widthInTiles+tx;
_flashPoint.x += tx*_tileWidth;
_flashPoint.y += ty*_tileHeight;
var opx:int = _flashPoint.x;
var c:uint;
var cri:uint;
for(var r:uint = 0; r < /*_screenRows*/heightInTiles; r++)
{
cri = ri;
for(c = 0; c < /*_screenCols*/widthInTiles; c++)
{
_flashRect = _rects[cri++] as Rectangle;
if(_flashRect != null)
renderBuffer.copyPixels(_pixels,_flashRect,_flashPoint,null,null,true);
_flashPoint.x += _tileWidth;
}
ri += widthInTiles;
_flashPoint.x = opx;
_flashPoint.y += _tileHeight;
//FlxG.buffer.copyPixels(renderBuffer, renderBuffer.rect, new Point(), null, null, true);
}
}
}
}


I made some tests myself but I don't fully understand the way it's renders the tilemap. Any ideas?

47
I need to render all the tilemap, not only what is visible on the screen. Is for a special effect in wich I need to access to all the information of the tilemap. Actually I'm rendering it in a renderbuffer the first time, not directly to the screen, but when the tilemap is larguer than the screen, just the first viewable part is rendered.

I have heard that there is a new parameter in v2.35 that allows this. Anybody knows if this is implemented?

Thanks in advance.

48
I believe that fade() was only for sounds. I'll check it out. Thanks!

49
How to make fade-to-black/fade-from-black transitions between states?

50
by the way, I solves the problem with this code

bg2.collideLeft = bg2.collideRight = bg2.collideTop = bg2.collideBottom = false;

Regards

51
I recently have a problem with a background image(parallax). When I go to the end of the level and back, the 1st layer of the parallax desapears.

After some testing I realized that the problem was because the parallax was colliding with the player sprite and, due to the scrollFactor values and that the image was inside a FlxSprite object, when Flixel solves the collision, the bitmap was adjusted in a way that changes it's position outside the screen.

I think that will be a nice implementation a Bitmap Class that is excluded from the collision/overlapping calculations (no groups, no useless things in the collision loops)  but still handles animations and things like that.

Thanks!

52
It's confusing the legend over this forum. If it's a mess update on every release, put something like "get the last version!"


Thanks!

53
help / Re: Proximity dettection
« on: Thu, Apr 22, 2010 »
That was exactly my solution. States + flags. Works pretty fine.

55
help / hitLeft not working
« on: Thu, Apr 22, 2010 »
Triggers when colliding left or right. Not only left. Is a known issue?

56
help / Re: Proximity dettection
« on: Thu, Apr 22, 2010 »
Yes, but I need to determine when the player "touch" the wall. When flixel solves collision, takes each collision rectangles and pushes one away the other, so you only has a collision against the wall once.

Also, the wall is moving. I think I need to give a couple of hours of analysis to this :-(

57
help / Re: Proximity dettection
« on: Thu, Apr 22, 2010 »
Can you give me some more details? I still don't get it.


Thanks!

58
help / Proximity dettection
« on: Thu, Apr 22, 2010 »
There is a way to detect when an object is close to another? I'm trying to give the player the ability to climb walls so I need to know when is flat to a wall. The problem is that in the collision resolution, the collision rectangle of the player is projected outside the wall, so in one step of the loop there is a collision, but in the next not.

Any ideas?

Thanks!

59
help / boss programming (resources to share?)
« on: Thu, Apr 15, 2010 »
Anyone has some resources to share about bosses?

IKinematic, IA, best practices, etc.

Will be very wellcome!

60
help / Re: Collision Groups
« on: Wed, Apr 14, 2010 »
That did the trick

Pages: 1 2 [3] 4