Neil Reed

XNA Turn Based Game Blog

Performance tweaking Part 2

2 Response to Performance tweaking Part 2

23 January 2010 at 19:16

I found that using timers to count the milliseconds it takes to do different parts of my main loop was extremely helpful.

However, I do find it very fishy for you to be getting speeds at 45 fps (if you are on the xbox). On my one of my OpenGl programs I had 100x100x4 tiles (4-way split screen) running at 40+fps if not 60+fps.

Either way, with xna avoid using new statements where possible, and the foreach loop (as you already know). Also, it might be more efficient to use linkedlists instead of lists in some cases.

23 January 2010 at 20:32

The FPS figure were from my PC.

I used the FPS commponent from one of the XNA sites.

I know to avoid the "new" statement as it causes un-need garbage collection.

I was also under the impression it is better to use a for each loop than delegation.