Difference between revisions of "Save System"

From Studio Grow Wiki
Jump to: navigation, search
(Created page with "What are the required features? * Multiple save states * Load resets the level * Hierarchal grouping * Load into player object and scene objects * Save everything in an xml file ...")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
What are the required features?
+
Scripts[http://redmine.rainbowprojectiles.com/attachments/download/1/SaveSystem.zip] for adding saving and loading to a scene
 +
* PlayerInfo must not be added to any scenes.
 +
* Attach LoadPositions & SaveSystem to the main camera.
 +
 
 +
== Features ==
 +
 
 
* Multiple save states
 
* Multiple save states
 
* Load resets the level
 
* Load resets the level
Line 6: Line 11:
 
* Save everything in an xml file
 
* Save everything in an xml file
  
What needs to be saved?
+
== Saved Data ==
 +
=== Currently Saved ===
 +
 
 +
* Player State
 +
** Current Scene
 +
** Current Transform
 +
=== Plans For Future ===
 
* Player State
 
* Player State
 
** Inventory
 
** Inventory
** Current Scene
+
 
** Current Transform?
+
* Scene Saves
* Multiple Scenes
 
 
** Scene State
 
** Scene State
 
*** Movable Objects
 
*** Movable Objects
 
**** Current Transform
 
**** Current Transform
 
*** Event Flags
 
*** Event Flags
 +
 +
File Template
 +
<enscript lang=html>
 +
<?xml version="1.0" encoding="ISO-8859-1"?>
 +
<root>
 +
<player>
 +
<inventory />
 +
<level name="mapname" />
 +
<position x="0" y="0" z="0" />
 +
<rotation x="0" y="0" z="0" />
 +
<scale x="0" y="0" z="0" />
 +
</player>
 +
<scenes>
 +
<scene name="map1">
 +
<object name="obj1">
 +
<position x="0" y="0" z="0" />
 +
<rotation x="0" y="0" z="0" />
 +
<scale x="0" y="0" z="0" />
 +
</object>
 +
<events>
 +
<event id="shortname" value="1" />
 +
</events>
 +
</scene>
 +
</scenes>
 +
</root>
 +
</enscript>

Latest revision as of 02:09, 20 April 2011

Scripts[1] for adding saving and loading to a scene

  • PlayerInfo must not be added to any scenes.
  • Attach LoadPositions & SaveSystem to the main camera.

Features

  • Multiple save states
  • Load resets the level
  • Hierarchal grouping
  • Load into player object and scene objects
  • Save everything in an xml file

Saved Data

Currently Saved

  • Player State
    • Current Scene
    • Current Transform

Plans For Future

  • Player State
    • Inventory
  • Scene Saves
    • Scene State
      • Movable Objects
        • Current Transform
      • Event Flags

File Template <enscript lang=html> <?xml version="1.0" encoding="ISO-8859-1"?> <root> <player> <inventory /> <level name="mapname" /> <position x="0" y="0" z="0" /> <rotation x="0" y="0" z="0" /> <scale x="0" y="0" z="0" /> </player> <scenes> <scene name="map1"> <object name="obj1"> <position x="0" y="0" z="0" /> <rotation x="0" y="0" z="0" /> <scale x="0" y="0" z="0" /> </object> <events> <event id="shortname" value="1" /> </events> </scene> </scenes> </root> </enscript>