Welcome, Guest

Author Topic: Upcoming changes to the save system  (Read 2944 times)

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Upcoming changes to the save system
« on: April 14, 2011, 12:34:57 PM »
I've been working on fixing the save system to save and load both dust and trails.

There were two approaches to solving this problem. A quick hack or taking the time to restructure the internal code to save and load this date the 'correct' way. I chose the later (which also helps to explain the apparent lack of recent updates) which will make it easier to add new features to the save system in the future.

This upcoming change will also make the move to the UBOX file format make more sense as the new format will include 4 xml files in each UBOX files:
  • objects.xml
  • settings.xml
  • trails.xml
  • dust.xml

And settings will be moved from the objects.xml file to its own dedicated file.

Trails.xml will look something like this:
Code: [Select]
<?xml version="1.0"?>
<trails>
  <trail>
    <objectid>Earth</objectid>
    <segment>
      <pos>21836329.8534378;380717980.789773;-1354699.264725</pos>
      <color>85;101;131;255</color>
      <lastmod>1557435.6501121274</lastmod>
      <length>3887.5794656008948</length>
    </segment>
    <segment>
      <pos>21866874.4954487;380731709.444217;-1349333.14694793</pos>
      <color>85;101;131;255</color>
      <lastmod>1552252.2108246596</lastmod>
      <length>3887.5794656008948</length>
    </segment>
  </trail>
</trails>

Thoughts, comments, suggestions?

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: Upcoming changes to the save system
« Reply #1 on: April 14, 2011, 02:14:33 PM »
So, when is 2.1 supposed to be?

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Upcoming changes to the save system
« Reply #2 on: April 15, 2011, 02:30:17 PM »
So, when is 2.1 supposed to be?

I'm not sure yet. This major update to the save and loading systems was going to be part of it, but I may release this first (as 2.0.18 or something) and add the .NET 4 support (a key portion of the 2.1 update) later.

I wasn't going to change the objects.xml handling, but turns out that it was easier to 'redo' it the right way instead of continue hacking solutions on top of the existing code.

The next version will now save the angle and rotation of a planet in addition to additional settings, all the trail data, and all the dust (rings and stars in galaxies). It still won't be a 100% save, but a huge improvement over the current system.

Chaotic Cow

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 588
  • President of Bovine Relations
    • Facebook
Re: Upcoming changes to the save system
« Reply #3 on: April 15, 2011, 04:40:11 PM »
Sounds like some good stuff. Can't wait.