Upload
belarus-state-university
View
659
Download
1
Embed Size (px)
Citation preview
Content Pipeline
Ivan Suhinin
What content is?
• Something that defines your game• Bad content ruins the game• Good content can save the worst
game
What content do we use?
• Images– Textures– Backgrounds
• Fonts• XML– Levels– Players– Objects
Content
Image
Font
<Entity />
ContentPipeline
Game Content
Texture2D
SpriteFont
Entity
Why do we need Content Pipeline?
Content flow
Importing
Processing
Writing
Reading
Build
Runtime
Build: Importing
• The process of reading initial content data
• Converts input data to an object• XNA has default importers for many
content types• But you can always create a custom
one
Demo: Default XML Importing
Build: Processing
• The process of processing • Can change object type• XNA has a set of default processors
Demo: Custom object processing
Build: Writing binary data
• Serializes object to a binary file• Usually objects are serialized by
default• But you can always create a custom
writer• …which requires a custom reader!
Runtime: Reading binary data
• Reading .XNB (usually) file into an object
• Custom readers are supported
Demo: Custom serialization
Debugging Content Pipeline
• http://bit.ly/xna-cp-debug• Template allows you to debug
content pipeline• Extremely useful for complex content
objects
Demo: Debugging Content Pipeline
Questions?
i.suhinin
suhinini
suhinini