I'm at a stage where my 2D game engine (starting with pacman) is fairly stable. What I've not done though is looked into performance.
By running the profiler, I have optimised my render method quite well, but I still get a degradation in performance after say 30 seconds of game-play.
My first question is, will the profiler pick up things like degradation, or does it take an average of the ticks per function? I am using SharpDevelop by the way.
The second question is, what is the recommended strategy for tackling performance problems? My current understanding is that due to garbage collection, I don't need to worry about unreferenced objects too much. But is it not the case that even the garbage collector might not be able to keep up if one is too inefficient?
I could opt for a full code-review, function by function, to ensure that things are running efficiently. For example, I have not taken care to dispose of objects when they are clearly not of use. Presumably this will help? I have been concentrating on core functionality actually working up to this point, and game logic - but the time has come to make this thing run as slick and efficiently as possible.
Any comments are most welcome. It would just be interesting to hear how people go about such things if they notice a degradation in performance in a language that has garbage collection.
Thanks in advance!