XNA Creators Club Online

tutorial details

Authoring Particle Systems Using XML and the Content Pipeline
Tutorial
submitted
6/28/2007

Description:

This tutorial teaches you how to extend the Particle 3D sample so the particle systems are defined by XML files loaded with the XNA Content Pipeline.

New for XNA Game Studio 3.1: This sample has been updated for Game Studio 3.1 to make use of the new automatic .xnb serialization mechanism. The ContentTypeWriter and ContentTypeReader helper classes used by previous versions of Game Studio are no longer required (although they still work the same way as before if they are included). If these helpers are not provided, the Content Pipeline will now automatically serialize custom data types using reflection. This sample has been simplified by removing the ContentTypeWriter and ContentTypeReader classes, as these are no longer required.

Introduction:

In the original version of the sample, each particle system was defined using a separate class that derived from the abstract ParticleSystem base class, and overloaded the InitializeSettings method to specify how the particle system should be displayed. That meant you had to create a new class any time you wanted to add a new type of particle, and had to recompile your game any time you modified one of these classes to alter the particle behavior. Using external XML files allows you to create and tweak any number of different particle systems without needing to change the main game executable.

downloads
Framework

GS 2.0

Vertex Shader Version

VS 1.1

Pixel Shader Version

PS 2.0

Framework

GS 3.1

Vertex Shader Version

VS 1.1

Pixel Shader Version

PS 2.0

var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG