I dare say it, but these last two days may have been the most productive days I’ve had all summer. Now, its not that I worked an excessive amount, its just that things WORKED out… Now this efficiency is compounded by the fact that yesterday I spent almost the entire day dealing with my cats (one, the other, or both, we don’t know) possibly eating some Lily petals; We found out shortly after that this causes renal failure, and after a benign bloodtest and subcutaneous IV (phew :D) we’ll be monitoring the cats for a few days to ensure they are OK.
Back to coding: Long story short, I’d just barely started implementing XML imports, for real (the library was successfully being built, loaded, etc.) and I’m pretty much done now. It took less than a full day to get it implemented, and I have to say, TinyXML is REALLY easy to use. I’m left now with figuring out some simple (and straight-forward) way to grab constellation names from SVGs (and even store them to one in the first place :P) At present my thinking is to get the name of the constellation from a text box with text the same color as the constellation color.
I guess I should also say HOW exactly my import is working at the moment. Not counting the lack of constellation names this is what I have so far:
- Users create rectangles in Inkscape to represent planets/systems. The color of the rectangle indicates the constellation that system belongs to. To name the planet/system users edit the properties of the object by changing its “id” to the name, and the “label” to the same.
- Once the user is satisfied with the orientation and number of planets they proceed to create “diagram connectors” to indicate connectivity between planets. Make sure to snap the connectors to the center of the rectangles, you should be able to drag the rectangle and have the connectors adjust on their own.
At this point in time I guess I’ll continue to refine and bugproof the import code, but its very exciting to have a working model so quickly.