Hi guys,
I’m new here, so Hi, i’m Matt.
I’ve been developing games in XNA/C# for a few years now and finaly switched to Java.
My current project is a Space Empire-building/fleet combat RTS type of thing. Its currently at a very early stage. I have a basic engine that gets all my stars, planets, moons and other objects (ships, commets, asteroids, etc) on the screen and all orbiting around correctly.
What I have been thinking about at the moment is loading a solar system from a file (at the moment its all hard-coded).
Each level (solar system) is stored in a tree structure, eg:
Sun
->Planet 1
->Planet 2
->Planet 2, Moon 1
->Planet 2, Moon 2
->Planet 3
is it possible to store this in an XML file and load it while preserving the hirarchy?
I think I’d have to use recursion, but i’m not sure what the best way to go is.
Otherwise, is there a tree data structure in Java that is Serializable?
If anyone has any ideas or advice, that would be very much apreceated.
Thanks,
Matt Taylor

