anchor.diff:  ifdef::env-github,env-browser[:outfilesuffix: .adoc]
   
   
  -Spatials (that is Nodes and Geometries) can contain audio and light nodes, particle emitters, controls, and user data (player score, health, inventory, etc). For your game distribution, you must convert all original models to a faster binary format. You save individual Spatials as well as scenes using `com.jme3.export.binary.BinaryExporter`. 
  +Spatials (that is Nodes and Geometries) can contain audio and light nodes, particle emitters, controls, and user data (player score, health, inventory, etc). For your game distribution, you must convert all original models to a faster binary format. You save individual Spatials as well as scenes using `com.jme3.export.binary.BinaryExporter`.
   
   The jMonkeyEngine's binary file format is called `.j3o`. You can convert, view and edit .j3o files and their materials in the jMonkeyEngine <<sdk#,SDK>> and compose scenes (this does not include editing meshes). For the conversion, you can either use the BinaryExporters, or a context menu in the SDK.
   
  
positive.code: To make a custom class savable:
  
  .  Implement `Savable` and add the `write()` and `read()` methods as shown in the example above.
  .  Do the following for each non-temporary class field: 
  **  Add one line that ``write()``s the data to the JmeExport output capsule. 
  ***  Specify the variable to save, give it a String name (can be the same as the variable name), and specify a default value.
  
  **  Add one line that ``read…()``s the data to the JmeImport input capsule. 
  ***  On the left side of the assignment, specify the class field that you are restoring
  ***  On the right side, use the appropriate `capsule.read…()` method for the data type. Specify the String name of the variable (must be the same as you used in the `write()` method), and again specify a default value.
  
  
  
  
  [IMPORTANT]
  ====
  As with all serialization, remember that if you ever change data types in custom classes, the updated read() methods will no longer be able to read your old files. Also there has to be a constructor that takes no Parameters.
  ====
  
  
negative.code: = Saving and Loading Games (.j3o)
  :author:
  :revnumber:
  :revdate: 2016/03/17 20:48
  :keywords: convert, j3o, models, load, save, documentation, serialization, import, export, spatial, node, mesh, geometry, scenegraph, sdk
  :relfileprefix: ../../
  