Bare minimum example

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


Sep 29, 2011 at 5:03 AM
Edited Sep 29, 2011 at 5: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 5:36 AM
Edited Oct 1, 2011 at 12:48 AM


Sep 30, 2011 at 7: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".