Aug 25, 2009 at 12:49 AM
Edited Aug 25, 2009 at 12:51 AM
35-40 geometries sounds really low to me. Farseer can handle about 800 geometries on my computer.
I've still not received the Xbox I ordered about 3 weeks ago, but from what I've heard, you should not expect too much from the Xbox platform. As for techniques to speed up your game, you could take a look at my blog:
Scroll down a bit, there is a post series called "Performance tips and tricks" you might want to take a look at. I will make a Xbox 360 tips and tricks series whenever I receive it and have done some testing on its architecture.
Here are some additional tips:
1. Use pools.
We use the Pool<> generic class inside Farseer Physics to reuse objects instead of disposing them and create garbage. It is also very good for stuff like bullets where you have to reuse the geometries all the time.
2. Remember to use cloning if you create several geometries.
Simply use the factories (GeomFactory.Instance.CreateGeom()) to create clones of already existing geometries. Using clones will cut down in the time it takes to compute the distance grid.
3. Split work up into several physics simulators
If you have a background with falling boxes or something like that. Use a separate physics simulator for that and put it into its own thread. Remember that you can't collide stuff between several physics simulators.
4. Change broad phase collider
You might want to see if any of the other broad phase colliders fit your game more than the default one. Some of them might also fit better on the Xbox 360
Oh, almost forgot. No, you can't use a geometry without a body. Not to worry, the body adds no overhead to the geometry since it is just a point in space that the geometry is placed at. You wrote you only used the collision detection part, what exactly does
this include? if two geometries collide and they separate from each other, you also use physics - if you don't need that, you can turn it off.
Edit: My 800 geometries figure is when I compile under release mode. You should get 2x performance in release mode.