I spent many days this week trying to get the XML load/save functionality of scenes and got that working in a very complex way, took me 24 hours this week to make the code to work and still it lacks some functionality around the animation settings and physics, suddenly, something came to my mind and it ticked in my mind thinking why there isn't any solution already build in the XNA framework to handle all this for me instead of me writting thousands of lines of code to format and properly create THE XML file I am looking for.... and in a matter of 2 minutes after thinking I found this:
XmlWriterSettings xmlSettings = new XmlWriterSettings();
xmlSettings.Indent = true;
using (XmlWriter xmlWriter = XmlWriter.Create("testAniPack.xml", xmlSettings))
IntermediateSerializer.Serialize(xmlWriter , animationPack , null);
may not seem very big, but this replaces the thousands of lines I wrote this week with just 4 lines. Wasted too much time to replicate something that already exists, at least I am glad I found this because the missing part is too complicated to do it manually and the animations are already running very smoothly, hope to be able to show up something very soon once I finish removing all this week's work and replace it by a few more lines of code. At least this made me very happy this weekend so I can work more on the physics portion.
Saturday, August 25, 2012
Monday, August 20, 2012
Just a few snaps of the editor, the Mystic Framework will power Elem3ntz! game animations, and so far it is working extremelly well, with bones, vertex animation, cloth simulator and other small tricks under the hood.
A snap of the work in progress 2D editor, not just simple bones can be added but way more things that I will show up later in a video once I finish the saving/loading code, which will take a few more days to finish. And after that, add the fluid livelike 2d animations into Elem3ntz! game.