Leveling Up with MonoGame and XML
Friend of the Blog, Simon (darkside) Jackson, is back with a new post and video on some cool and smart uses of XML and MonoGame.
This and more content can be found on my dedicated MonoGame channel here: http://bit.ly/darksideofmonogame
Why use XML?
For as long as there have been games, there has been a need to generate game content outside of the game and avoid writing all this pesky code stuff, everything from:
- Level design
- Lists/designs of characters and items
- Scripted events
- Just because some article said it was a good idea on CodeProject
It can be very powerful to use, if wielded correctly and it gives power to your content / mod creators of your game. Any situation that requires lots of configuration or walls of text just works better if it’s separated from your code base and manageable outside of the core code.
Why use the MonoGame Content Pipeline?
Setting up your data
Right, when getting started with XML, you need to understand there are three main components to handling XML serialization with MonoGame, the XML schema, the Data Class and the Game code:
Getting Started with XML in MonoGame
Once you’ve decided on your schema and data, getting this put together in MonoGame is fairly quick and painless, we simply need:
Right, that’s all from me for this session. I’ve still got to go back and finish the Getting Started with 2D blog post to accompany that article as well as get some more work done to the MonoGame NuGet’s.
So, what are you still here reading this for, go get some XML in your game!