C#/XNA port of the Box2D physics engine.
21
votes
6answers
2k views
Implementing a wrapping wire (like the Worms Ninja Rope) in a 2D physics engine
I've been trying out some rope-physics recently, and I've found that the "standard" solution - making a rope from a series of objects strung together with springs or joints - is unsatisfying. ...
9
votes
3answers
363 views
Why does Farseer 2.x store temporaries as members and not on the stack? (.NET)
UPDATE: This question refers to Farseer 2.x. The newer 3.x doesn't seem to do this.
I'm using Farseer Physics Engine quite extensively at the moment, and I've noticed that it seems to store a lot of ...
8
votes
5answers
512 views
What should I do to prevent my monsters from walking off platforms?
I have a question that is driving me crazy because I think it should be fairly easy to find a tutorial on it. I'm currently using XNA and Farseer to create a simple platformer game. I'm about to be ...
8
votes
3answers
2k views
How do you do AI path following within a 2d physics engine like farseer/box2d?
I'm in the process of moving a 2d top down game I've been working on into a proper rigid body physics engine like Farseer. Up until now, I had just hacked together my own physics code where needed.
...
8
votes
3answers
779 views
Tiling Physics using Farseer
I'm having a problem with the Farseer Physics Engine, where in a tiled environment, my object will at times interact with corners of others objects, even if they align perfectly.
You can try it ...
7
votes
3answers
943 views
How to implement 2d explosions that will cause damage taking into account covers and distance?
How can I implement a 2D explosion in a way that it will cause less damage to characters that hide behind crates or other cover? Ideally damage will depend on the strength of the cover (e.g. metal ...
7
votes
3answers
754 views
Inverted textures
I'm trying to draw textures aligned with this physics body whose coordinate system's origin is at the center of the screen. (XNA)Spritebatch has its default origin set to top-left corner.
I got the ...
6
votes
2answers
852 views
How to create a very specific kind of joint in Farseer?
Edit
Problem solved (see Drackir's answer). Here's a demo of what I was trying to achieve with this joint. More info about the scenario on this other question.
Problem
I'm trying to create a ...
5
votes
2answers
471 views
Detect Open Space in Farseer [duplicate]
Possible Duplicate:
How do I detect ledges?
I'm working on a 2D platformer using XNA and Farseer. I would like the player's character to be able to grab and climb up ledges. Detecting a ...
5
votes
2answers
2k views
XNA C# Platformer - physics engine or tile based?
I would like to get some opinions on whether i should develop my game using a physics engine (farseer physics seems to be the best option) or follow the traditional tile-based method.
Quick ...
5
votes
1answer
780 views
Correct way to use Farseer Physics in XNA
I am using Farseer Physics for my 2D sidescroller game and I'm not sure how to proceed with it. I currently have a Sprite class (handles nothing but graphics), a GameObject class (contains specific ...
5
votes
1answer
463 views
Farseer Physics: Ways to create a Body?
I want to create something similar to this using farsser and Kinect:
https://vimeo.com/33500649
This is my implementation until now:
http://www.youtube.com/watch?v=GlIvJRhco4U
I have the outline ...
5
votes
3answers
708 views
Can I swap out Farseer physics fixtures at runtime?
I am working on a 2D side-scroller using Farseer Physics Engine v3.3.1.
In order to create a realistic physical skeleton for the player, I am using a method similar to the one explained here (See ...
4
votes
1answer
465 views
Issues with Polygon Fixtures in Farseer
I've been working with the Farseer Physics Engine to try and build a simple 2D, sidescrolling game. Creating basic rectangle blocks worked easily enough, but I discovered when I tried to create some ...
4
votes
3answers
546 views
IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?
Earlier, I posted a question asking how to swap fixtures on the fly in a 2D side-scroller using Farseer Physics Engine. The ultimate goal being that the player's physical body changes when the player ...
4
votes
1answer
350 views
Making a multi-pieced rectangular breakable body with Farseer
Using Farseer 3.3.1 I want to create a rectangular BreakableBody with many pieces. Right now here is my code:
Vertices polygon = PolygonTools.CreateRectangle( 2.5f , 1.25f );
List<Vertices> ...
4
votes
1answer
511 views
Farseer engine built for MonoTouch?
Does anyone know where I can find a version of the farseer physics engine compiled for MonoTouch, or do most people just download a windows version from codeplex and attempt to build their own ...
3
votes
1answer
134 views
How do I make a tile passable in one direction only?
I want that my character can jump through some of the tiles, like Mario does in this video:
http://www.youtube.com/watch?v=zIPYzbNrNhc
In this video, Mario jumps up through orange platforms, but ...
3
votes
3answers
397 views
Moving a body in a specific direction using XNA with Farseer Physics
I have a custom polygon attached to a body, which looks like this:
What I am trying to accomplish is getting the body to move according to wherever the tip of the body is. So far this is what I've ...
3
votes
1answer
496 views
How to restrict paddle movement using Farseer Physics engine 3.2
I am new to using Farseer Physics Engine 3.2(FPE), so please bear with my questions. Also, since FPE 3.2 is based on Box2D, I have been reading Box2D manual and pieces of code scattered in samples to ...
2
votes
1answer
348 views
360+ degree rotation skips back to 0 degrees when using Math.Atan2(y, x)
I'm new to XNA and this is my first actual project, so forgive my noobness.
I'm using
jointAngle = System.Math.Atan2(RightStick.Y, RightStick.X);
in order to set an angle of a joint (farseer) so ...
2
votes
2answers
90 views
Is there any quick and easy way to make all bodies visible with Farseer physics engine for XNA?
I just want to be able to see all my bodies on the screen for debugging purposes and i cant think of an easy way, for example i have make some edge fixtures with curved arcs attached and i just want ...
2
votes
2answers
394 views
How do you change a Body's origin in Farseer?
In Farseer 3.3.1 for XNA, how do I change the origin of a Body? For example, when I create a Circle Body, instead of it rotating around its center, I want it to rotate around another specified point.
...
2
votes
2answers
903 views
Farseer - Apply Impulse
I'm new to Farseer and have a simple question. The demos I went through didn't seem to demonstrate what I want. I would like to apply an impulse (not force) to an object at a specific position on that ...
2
votes
1answer
57 views
Farseer: Shooting a ball in a certain angle?
How can I shoot a ball in a certain angle? When I press the Space key, the ball should be shot in a 45 degree angle. How can I do that?
2
votes
2answers
104 views
Texturing 2D vectorial terrain (or simply masking texture)
I have a procedurally generated terrain, as follows:
It is generated and then built using Farseer Physics, however I haven't found a way to create and apply a mask to texture it properly, I have ...
2
votes
2answers
501 views
Farseer: Only allow the collision one time with the object
I have there serveral platforms. I would like to allow the player to collide only one time with the object! Hope you can help me
2
votes
2answers
91 views
Farseer Physics: How to create shape from Verticies?
As you can understand from the title, I'm pretty new to game development. I'm doing this for fun. Anyway here's my question. I have this Farseer Physics samples and I've been studying them for a few ...
2
votes
1answer
92 views
Developing an interactive book for Windows-Runtime
My three year old loves playing with the interactive books on our iPad, and I love playing with code and I love my Surface RT...
So I thought I'd try and make a basic animated book using WinRT, I've ...
2
votes
1answer
275 views
Implementing a wheeled character controller
I'm trying to implement Boxycraft's character controller in XNA (with Farseer), as Bryan Dysmas did (minus the jumping part, yet).
My current implementation seems to sometimes glitch in between two ...
2
votes
1answer
343 views
Odd offset bug in Farseer/XNA/C#
So I'm using Farseer to create an immovable object:
[...]
private Body body;
public Immovable(World world, ContentManager c, String s, int posx, int posy, int w, int h, String user_data)
{
...
2
votes
0answers
70 views
Getting a uint color array from a portion of a Texture2D
I'm currently using the Farseer tools to create a body from a Texture2D. However, my texture is a spritesheet and I need to get the uint array containing the colors from a portion of the full ...
2
votes
1answer
1k views
Farseer Physics collision detection vs intersection detection with sensors
I'm trying to make a game that uses Farseer physics engine as its main collision detection engine. I have a 2d circle body object that has a matching fixture (I used the CreatCircle method. I did not ...
1
vote
2answers
671 views
How do I determine which side of the player has collided with an object?
I have some static bodies (platforms) and a dynamic body (the player) in my world. The collision between them works great, but I would like to know which side of the player (rectangle) collides with ...
1
vote
2answers
2k views
Create a body of an irregular 2D sprite in Farseer
I'm trying to create a body of a irregular 2D sprite Farseer 3.3.1.
The regular shapes that BodyFactory provides are not that I want. Is there a way that one can create irregular objects? Could it be ...
1
vote
2answers
494 views
How can I implement a “boost pad” with Farseer/Box2D physics?
I'm trying to implement a boost pad in my XNA game using the Farseer Physics Engine. (This question applies to Box2D too, I would be happy to port working Box2D code to C#.)
By "boost pad", I mean an ...
1
vote
1answer
50 views
Farseer: How can I remove a body?
I have many sensors(coins) in each level and I want to remove the sensors(coins) when the player rectangle(Mario) touches them. I check in OnCollision if Mario touches a coin, if he touches it, it ...
1
vote
1answer
115 views
Farseer Physics Samples and Krypton how to reference game
I'm sure this is totally simple and yes I am new at this.
I am trying to set up Krypton inside farseer.
1. create a new Krypton engine in my sub screen aka AdvancedDemo1 : PhysicsGameScreen, ...
1
vote
1answer
106 views
How do I draw a texture to a MSTerrain object?
I'm using Farseer to make a game in XNA and I can't seem to figure this out.
I've decided to use MSTerrain for making my game's terrain because I wanted destructible terrain and MSTerrain seemed like ...
1
vote
1answer
146 views
2D Physics Engine to Handle Shapes Composed of Multiple Densities XNA
The game I'm working on involves shapes that might be composed of multiple materials in a variety of ways. Let's just take for example a wooden rod with and sizable tip of iron or say a block composed ...
1
vote
1answer
151 views
How to pin a body in case of collision in Box2D or Farseer?
I'm trying to get an understanding for the Box2D/Farseer physics engine by implementing a small air hockey simulation.
There, I have the problem that the CPU player attacks the puck, kicks it, but ...
1
vote
3answers
685 views
Unable to find good parameters for behavior of a puck in Farseer
EDIT:
I have tried all kinds of variations now. The last one was to adjust the linear velocity in each step: newVel = oldVel * 0.9f - all of this including your proposals kind of work, however in the ...
1
vote
1answer
598 views
Box2d/Farseer how to use the World object?
this question is primarily about farseer but as it is a wrapper around box2d i think it's relevant for both libraries.
I'm in the beginning of developing a simple platform game, and I'm stuck as to ...
1
vote
1answer
479 views
What's the difference with how Box2D and Farseer behave in terms of collisions?
I've ported my engine to iOS and have been using the C++ version of Box2D. Everything runs fine except on collisions, it seems Box2D and Farseer handle collisions somewhat differently.
Anyone know ...
1
vote
1answer
417 views
Farseer: what are its performance on xbox360?
Are there any performance issue related with lots of "new" calls and things like that?
Did anyone test it?
Something to take care of?
Thanks
1
vote
0answers
51 views
Farseer circle hangs where it's spawned
I'm currently trying to simply spawn a circle in Farseer. However, it's stuck wherever I spawn it! The game is updating fine, as I can see the circle spinning in place when I spawn it because of how I ...
1
vote
2answers
251 views
Building a shape out of two rectangles
I would like to build a body with Farseer out of two rectangles so it looks like this:
I am a real beginner, so please describe it carefully.
Thanks in advance!
1
vote
0answers
140 views
Farseer Physics EndContact events don't fire for all registered delegates
Here's my situation:
I have several objects that contain a body and a fixture. They are set to sensor = true;
atmosphere = BodyFactory.CreateCircle(world, atmosphereRadius / Level.METER_IN_PIXELS, ...
1
vote
0answers
207 views
Unusual Farseer Behaviour?
My basic implementation of a Farseer world has been behaving very strangely. It seems as though there is a very low maximum velocity, and collisions result in the small spheres involved clipping ...
0
votes
1answer
1k views
How do I reset a game level
I have managed to implement a screen state system which I use to access the game. When the the character has collided with an enemy tile the game ends by going to a seperate game over screen. After ...

