Monday 1 March 2010

Engine Update: Particles, Performance & Profiling

Since my last update over a week ago, a lot of progress has been made. First steps for Full-Screen post processing (HDR, Bloom, Gaussian) DPSF Particle system is integrated and works perfectly with Sunburn out-of-the-box. Progress has been made with the level & content management classes, loading/saving works great and a new method .CombineScenePart() is currently WIP to combine scenes or scene parts into a single level.

Other features like the CameraManager is coming along nicely and should be ready very soon. The manager allows you or the engine to add/remove and set a certain camera type and modify its properties. Dynamic actors have been updated, they now return to their original position when returning to EditMode (original being the last assigned position by either Xml or the Editor). Moving the dynamic objects while in PlayMode does not affect the EditMode position of that object.

Finally got some time to work with CLR Profiler. I wasn't sure how to use this little tool to my advantage, but after some hours of fiddling with the engine code and running it through the profiler I got the hang of it. Some silly code errors were altered/removed (Like an old and unused Matrix-array being called every draw-call for my game objects, the Matrix-array had no actual purpose it was merely a left-over from a previous XNA draw method. As a final optimization I had a better look at the xml files that were created when serializing my level data. The demo scene (screen in previous post) required 43.000 lines of xml data (The demo scene had about 350 objects) worth a total of 900 KB. It took me less than 15 minutes to get this down to 7.000 lines without losing any necessary data (A easy way was serializing only the Euler rotation property (of type Vector3) instead of a complete rotation Matrix (Thanks to Sean James)) The final Xml file only requires 150KB of disk space. The overall memory allocation have been decreased, it may be a bit early for memory optimizations, but it was good practice for later stages of development...

Unfortunately I have no new video/screenshots right now. I'll try to get some interesting footage later this week!

No comments:

Post a Comment