Hey Jusy,
I also have the same problem, where I hit a framerate of ~130fps on PC and around ~40fps on the XBOX.
Using the Remote Performance Monitor for the XBOX, after 1 min of running time, I had:
- Garbage Collections: 50
- GC Latency Time (ms): 478
My major problem is in the Garbage Collector.
so here's the architecture of my game engine:
- In the Initialize() method of the XNA Game, I create my Game and Initialize it which performs the following:
// Init the sounds of the game
InitSounds();
// Init the models supported
InitLoaders();
// Init the Graphics Engine which creates all the supported shaders effects
InitGraphicsEngine();
// Init the physics engine
InitPhysicsEngine();
// Init the levels, here I'm allocating once all the objects (enemies, items, etc...) for the whole level, I guess they are being allocated on the heap, right?
InitLevels();
So my question is: How do I reduce the runtime allocations? I can't allocate the objects at offline, right?
Thanks in advance for the help!
Available Now: Galactic Escape