This project has moved and is read-only. For the latest updates, please go here.

Bare minimum example

Topics: Developer Forum
Sep 29, 2011 at 5:02 AM
Edited Oct 1, 2011 at 1:48 AM


Sep 29, 2011 at 6:03 AM
Edited Sep 29, 2011 at 6:04 AM

I think the baggage that you're referring to is the ScreenManager system, or the entirety of the FarseerPhysics.

Look at the "SimpleDemo1.cs" and other demos in order.  The code you're looking for is in "LoadContent". You'll notice that the only thing they do is create some objects - the game engine (PhysicsGameScreen) handles the rest. 

If you want to add gravity, just change the Gravity=Vector2.Zero to Gravity=new Vector2(0,20f);

Sep 29, 2011 at 6:36 AM
Edited Oct 1, 2011 at 1:48 AM


Sep 30, 2011 at 8:53 PM

You have three options:


First: and the easiest for everyone, just quit using FPE.

Second: use Hello World project as start point. I don't think there is so much "garbage" in the Hello World example.

Third: use the TestBed project, and delete all the demos except one. In the testbed I think there is not ScreenManager and other "garbage".