Topics: User Forum
Jan 1, 2007 at 9:44 PM
1) Public Content ang Graphics in FarseerGame class:

private GraphicsDeviceManager _graphics;

public GraphicsDeviceManager Graphics
get { return _graphics; }

private ContentManager _content;

public ContentManager Content
get { return _content; }


This is for my font generation (based on bitmaps)

2) Why RigidBody Id is only private?

3) PolygonRigidBody - constructor parameters are in different order then PolygonEntity

Jan 1, 2007 at 10:27 PM
1. yeah, I can make public accessors.
2. RigidBody Id was only meant to be used internally. I didn't see a need to expose it. What do you need it for?
3. That was a oversight. I will probably change it to be consistent even though it will break existing code... it is still in beta. :-)
Jan 2, 2007 at 1:23 PM
AD.1,3 - great!
AD.2 - I have some problems with prevoius version of Farseer with object comparation - maybe now it is not necessery to ad ID as public property. I will check this again.
Jan 2, 2007 at 4:24 PM
What was the problem before? I didn't change anything with regards to this so the problem may still be there... let me know.
Jan 4, 2007 at 7:54 AM
The problem was with my implementation of events - yours code is better ;)

BTW.1. I still have problems with multiple objects and dependences. Some of object can collide with other. For example:
1) All balls can collide with each other and some of them can collide with tree.
2) All objects should collide with ScreenBorderEntity

In my implementation in each rigidBody I have collection of collidable objects.

Now in current implementation I should change some object to:

this.RigidBody.CollisionEnabled = false;
this.RigidBody.CollisionResponseEnabled = true;

Next I should check collision event and force collision when it is needed.

Maybe you have better solution?

BTW.2. Groups is not good solution
Jan 4, 2007 at 4:36 PM
I see the problem.

I will have to give this some more thought. I remember ODE had a pretty nifty technique for handling this I will have to see if what they do can be implemented in my engine.

Jan 12, 2007 at 7:36 AM
I'm using it in this way:

1) In RigidBody class I got:

private RigidBodyList _notCollidable = new RigidBodyList();

/// <summary>
/// Objects which this object can't collide
/// </summary>
public RigidBodyList NotCollidable
get { return _notCollidable; }
set { _notCollidable = value; }

2) In PhysicsSimulator class in method DoBroadPhaseCollision I got:
if (rigidBodyA.NotCollidable.Contains(rigidBodyB) || rigidBodyB.NotCollidable.Contains(rigidBodyA))

3) In my code:

Kind regards
Jan 12, 2007 at 5:36 PM
You can download sample here:

Jan 20, 2007 at 10:39 AM
What do you think about making method Render to be virtual in class Sprite?
Now you have in this method some constans for example:
a) SpriteEffects.None
b) scale set to 1


Jan 20, 2007 at 12:58 PM
The stuff in the FarseeXNAGame is changing always. I have added scale to the properties. I'm not sure about making sprite's render vitual. There is a performance penalty for virtual methods.. plus it is very easy to create your own sprite class, just inherit from the the same Interfaces as I do in Sprite, then implement render the way you want.
Feb 5, 2007 at 4:13 PM
Nice - I will download new version ASAP :)