Browse Source

remove outdated docs

mitm001 5 years ago
parent
commit
f1eced8d1e

+ 0 - 1
docs/modules/ROOT/pages/jme3.adoc

@@ -232,7 +232,6 @@ Now that you understand the concepts, it's time to make the most of the jMonkeyE
 *  <<jme3/advanced/terrain#,Terrain (TerraMonkey)>>
 *  <<jme3/advanced/endless_terraingrid#,Endless Terrain (TerrainGrid)>>
 *  <<jme3/advanced/terrain_collision#,Terrain Collision>>
-*  <<jme3/contributions/cubes#,Cubes - A Block World Framework>>
 *  <<jme3/advanced/water#,Simple Water>>
 *  <<jme3/advanced/post-processor_water#,Post-Processor Water (SeaMonkey)>>
 *  <<jme3/contributions/vegetationsystem#,Vegetation System>>

+ 0 - 25
docs/modules/ROOT/pages/jme3/contributions.adoc

@@ -148,31 +148,6 @@ a| Yes
 
 |===
 
-
-=== Cubes
-
-A framework for block worlds (also called "`bloxel`" or "`minecraft`"-like) - It offers an easy way to add/remove blocks, block skinning, useful tools and user-specific behaviours.
-
-// image::http://i.imagebanana.com/img/2j73qkzs/6.jpg[6.jpg,width="150",height="",align="right"]
-
-[cols="2", options="header"]
-|===
-
-a| *Contact person*
-a| link:https://hub.jmonkeyengine.org/users/destroflyer/activity[destroflyer]
-
-a| *Documentation*
-a| <<jme3/contributions/cubes#,Wiki Page>>
-
-a| *Available as SDK plugin*
-a| Yes
-
-a| *Work in progress*
-a| Yes
-
-|===
-
-
 === Zay-ES Entity System
 
 [.right.text-left]

+ 3 - 3
docs/modules/ROOT/pages/jme3/contributions/cubes.adoc

@@ -1,6 +1,6 @@
 = Cubes - A Block World Framework
-:author: 
-:revnumber: 
+:author:
+:revnumber:
 :revdate: 2016/03/17 20:48
 :relfileprefix: ../../
 :imagesdir: ../..
@@ -8,7 +8,7 @@ ifdef::env-github,env-browser[:outfilesuffix: .adoc]
 
 
 
-image::http://destroflyer.mania-community.de/other/imagehost/cubes/header.png[header.png,width="650",height="",align="center"]
+//image::http://destroflyer.mania-community.de/other/imagehost/cubes/header.png[header.png,width="650",height="",align="center"]
 
 
 

+ 0 - 88
docs/modules/ROOT/pages/jme3/contributions/cubes/basic_example.adoc

@@ -1,88 +0,0 @@
-= Basic Example
-:author: 
-:revnumber: 
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../../
-:imagesdir: ../../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-[source,java]
-----
-package com.cubes.test;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import com.jme3.app.SimpleApplication;
-import com.jme3.math.Vector3f;
-import com.jme3.scene.Node;
-import com.jme3.system.AppSettings;
-import com.cubes.*;
-
-public class TestTutorial extends SimpleApplication{
-
-    public static void main(String[] args){
-        Logger.getLogger("").setLevel(Level.SEVERE);
-        TestTutorial app = new TestTutorial();
-        app.start();
-    }
-
-    public TestTutorial(){
-        settings = new AppSettings(true);
-        settings.setWidth(1280);
-        settings.setHeight(720);
-        settings.setTitle("Cubes Demo - Tutorial");
-    }
-
-    @Override
-    public void simpleInitApp(){
-        CubesTestAssets.registerBlocks();
-        
-        //This is your terrain, it contains the whole
-        //block world and offers methods to modify it
-        BlockTerrainControl blockTerrain = new BlockTerrainControl(CubesTestAssets.getSettings(this), new Vector3Int(1, 1, 1));
-
-        //To set a block, just specify the location and the block object
-        //(Existing blocks will be replaced)
-        blockTerrain.setBlock(new Vector3Int(0, 0, 0), CubesTestAssets.BLOCK_WOOD);
-        blockTerrain.setBlock(new Vector3Int(0, 0, 1), CubesTestAssets.BLOCK_WOOD);
-        blockTerrain.setBlock(new Vector3Int(1, 0, 0), CubesTestAssets.BLOCK_WOOD);
-        blockTerrain.setBlock(new Vector3Int(1, 0, 1), CubesTestAssets.BLOCK_STONE);
-        blockTerrain.setBlock(0, 0, 0, CubesTestAssets.BLOCK_GRASS); //For the lazy users :P
-
-        //You can place whole areas of blocks too: setBlockArea(location, size, block)
-        //(The specified block will be cloned each time)
-        //The following line will set 3 blocks on top of each other
-        //({1,1,1}, {1,2,3} and {1,3,1})
-        blockTerrain.setBlockArea(new Vector3Int(1, 1, 1), new Vector3Int(1, 3, 1), CubesTestAssets.BLOCK_STONE);
-
-        //Removing a block works in a similar way
-        blockTerrain.removeBlock(new Vector3Int(1, 2, 1));
-        blockTerrain.removeBlock(new Vector3Int(1, 3, 1));
-
-        //The terrain is a jME-Control, you can add it
-        //to a node of the scenegraph to display it
-        Node terrainNode = new Node();
-        terrainNode.addControl(blockTerrain);
-        rootNode.attachChild(terrainNode);
-        
-        cam.setLocation(new Vector3f(-10, 10, 16));
-        cam.lookAtDirection(new Vector3f(1, -0.56f, -1), Vector3f.UNIT_Y);
-        flyCam.setMoveSpeed(50);
-    }
-}
-----
-
-
-[NOTE]
-====
-This code uses the test settings offered by the framework - You can replace the call `CubesTestAssets.getSettings(this);` as described <<jme3/contributions/cubes/settings#,here>>.
-====
-
-
-
-[NOTE]
-====
-This code uses the test blocks offered by the framework - You can replace the call `CubesTestAssets.registerBlocks();` as described <<jme3/contributions/cubes/register_your_blocks#,here>>.
-====
-

+ 0 - 68
docs/modules/ROOT/pages/jme3/contributions/cubes/build_your_block_world.adoc

@@ -1,68 +0,0 @@
-= Build Your Block World
-:author:
-:revnumber:
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../../
-:imagesdir: ../../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-Now you've set up your different block types and we're ready to build some cool stuff in our world. :)
-
-
-== Usage example
-
-Instead of explaining every different method of the framework, here's a descriptive example, that should explain the usage:
-
-[source,java]
-----
-//This is your terrain, it contains the whole
-//block world and offers methods to modify it
-BlockTerrainControl blockTerrain = new BlockTerrainControl(CubesTestAssets.getSettings(this), new Vector3Int(1, 1, 1));
-
-//To set a block, just specify the location and the block object
-//(Existing blocks will be replaced)
-blockTerrain.setBlock(new Vector3Int(0, 0, 0), CubesTestAssets.BLOCK_WOOD);
-blockTerrain.setBlock(new Vector3Int(0, 0, 1), CubesTestAssets.BLOCK_WOOD);
-blockTerrain.setBlock(new Vector3Int(1, 0, 0), CubesTestAssets.BLOCK_WOOD);
-blockTerrain.setBlock(new Vector3Int(1, 0, 1), CubesTestAssets.BLOCK_STONE);
-blockTerrain.setBlock(0, 0, 0, CubesTestAssets.BLOCK_GRASS); //For the lazy users :P
-
-//You can place whole areas of blocks too: setBlockArea(location, size, block)
-//(The specified block will be cloned each time)
-//The following line will set 3 blocks on top of each other
-//({1,1,1}, {1,2,3} and {1,3,1})
-blockTerrain.setBlockArea(new Vector3Int(1, 1, 1), new Vector3Int(1, 3, 1), CubesTestAssets.BLOCK_STONE);
-
-//Removing a block works in a similar way
-blockTerrain.removeBlock(new Vector3Int(1, 2, 1));
-blockTerrain.removeBlock(new Vector3Int(1, 3, 1));
-
-//The terrain is a jME-Control, you can add it
-//to a node of the scenegraph to display it
-Node terrainNode = new Node();
-terrainNode.addControl(blockTerrain);
-rootNode.attachChild(terrainNode);
-----
-
-After running those few lines, you should see this:
-
-image:http://destroflyer.mania-community.de/other/imagehost/cubes/test_tutorial.png[test_tutorial.png,width="800",height=""]
-
-As you see, creating and managing your own block world will just take a few lines of code and doesn't require any special knowledge. :)
-
-
-== Me wantz spezzial phyziczzz and shadowzzz
-
-The BlockTerrainControl attaches the world to the assigned jME-Node - This way you can specify behaviors like shadows or even physics just like you do with each other object:
-
-[source,java]
-----
-terrainNode.setShadowMode(ShadowMode.CastAndReceive);
-----
-
-[source,java]
-----
-terrainNode.addControl(new RigidBodyControl(0));
-physicsSpace.addAll(terrainNode);
-----

+ 0 - 103
docs/modules/ROOT/pages/jme3/contributions/cubes/register_your_blocks.adoc

@@ -1,103 +0,0 @@
-= Register Block Types
-:author:
-:revnumber:
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../../
-:imagesdir: ../../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-To add blocks to the framework, you just have to add them to the BlockManager - This happens by specifying a block object (has to extend *cubes.Block*, by overriding methods you can specify own behaviours). Each block needs at least one "`skin`", which you have to pass in the constructor of the *cubes.Block* class). A "`skin`" contains all information to display the block - Texture-Index in the Atlas, Transparency and so on.
-
-After initialising your object, you have to register it in the BlockManager:
-
-[source,java]
-----
-BlockManager.register(myBlockObject);
-----
-
-
-[TIP]
-====
-Using own blocks _should_ work at the moment, if you encounter problems you can test your code using the default blocks (e.g. *CubesTestAssets.BLOCK_GRASS*).
-
-You can register them by calling `CubesTestAssets.registerBlocks();`.
-====
-
-
-
-== Single Texture Block
-
-[.right.text-left]
-image::http://destroflyer.mania-community.de/other/imagehost/cubes/block_stone.png[block_stone.png,width="150",height=""]
-
-Let's say, you want to add a simple block, which uses the same texture on every face. The framework recognizes, when only one texture is specified and therefore uses this for each face:
-
-[source,java]
-----
-//The stone texture is in the 10th column and 1st row in the texture atlas
-Block blockStone = new Block(new BlockSkin(new BlockSkin_TextureLocation(9, 0), false));
-BlockManager.register(blockStone);
-----
-
-
-== Face-Dependant Textures Block
-
-[.right.text-left]
-image::http://destroflyer.mania-community.de/other/imagehost/cubes/block_wood.png[block_wood.png,width="150",height=""]
-
-Now it's time to get prettier blocks - The wood block as known in Minecraft has two textures: Top/Bottom (cross-section) and Left/Right/Front/Back (bark). A simple way to set the texture for each face is to just give 6 textures to the skin (in the right order :P):
-
-[source,java]
-----
-Block blockWood = new Block(new BlockSkin[]{
-    new BlockSkin(new BlockSkin_TextureLocation(4, 0), false),
-    new BlockSkin(new BlockSkin_TextureLocation(4, 0), false),
-    new BlockSkin(new BlockSkin_TextureLocation(3, 0), false),
-    new BlockSkin(new BlockSkin_TextureLocation(3, 0), false),
-    new BlockSkin(new BlockSkin_TextureLocation(3, 0), false),
-    new BlockSkin(new BlockSkin_TextureLocation(3, 0), false)
-});
-BlockManager.register(blockWood);
-----
-
-
-== Dynamic Textures Block
-
-Last but not least: What if a block wants to change its texture according to its environment?
-
-[.right.text-right]
-image::http://destroflyer.mania-community.de/other/imagehost/cubes/block_grass.png[block_grass.png,width="150",height=""]
-
-A nice example would be a grass block - If it's on the surface, it contains a nice grass texture at the top face and a little earth-grass-transition at the sides. Otherwise, all 6 sides should display an earth texture.
-Special behaviours like this can be achieved by overwriting the *getSkinIndex* method:
-
-[source,java]
-----
-Block blockGrass = new Block(new BlockSkin[]{
-        //We specify the 3 skins we need:
-        //Grass, Earth-Grass-Transition and Earth
-        new BlockSkin(new BlockSkin_TextureLocation(0, 0), false),
-        new BlockSkin(new BlockSkin_TextureLocation(1, 0), false),
-        new BlockSkin(new BlockSkin_TextureLocation(2, 0), false)
-    }){
-
-    @Override
-    //The number that's being returned specified the index
-    //of the skin in the previous declared BlockSkin array
-    protected int getSkinIndex(BlockChunkControl chunk, Vector3Int location, Block.Face face){
-        if(chunk.isBlockOnSurface(location)){
-            switch(face){
-                case Top:
-                    return 0;
-
-                case Bottom:
-                    return 2;
-            }
-            return 1;
-        }
-        return 2;
-    }
-};
-BlockManager.register(blockGrass);
-----

+ 0 - 58
docs/modules/ROOT/pages/jme3/contributions/cubes/settings.adoc

@@ -1,58 +0,0 @@
-= Settings
-:author: 
-:revnumber: 
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../../
-:imagesdir: ../../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-This framework is intended to run every kind of block world the user wants - This includes different chunk sizes, block sizes, materials and a lot more.
-
-Those attributes are handled by an instance of the class *CubesSettings*. You will have to specify such an object when creating your block world:
-
-[source,java]
-----
-//You have to specify a valid application, the framework will use e.g. its assetManager
-CubesSettings settings = new CubesSettings(application);
-----
-
-Now, you can set all needed options via `get`/`set`-methods:
-[cols="20,15,65", options="header"]
-|===
-
-a| Setting 
-a| Default Value 
-<a| Usage  
-
-a| `Block Size` 
-a| 3 
-a| The side length of a block in world units. 
-
-a| `Chunk Size X/Y/Z` 
-a| 16/256/15 
-a| The amount of blocks, that are contained in one chunk in the given direction. 
-
-a| `Block Material` 
-a| null 
-a| The material that will be used by the chunks' geometries. You can load also load a default blockworld-fitting material by calling `setDefaultBlockMaterial(String textureFilePath)`. 
-
-a| `Textures Count X/Y` 
-a| 16 
-a| The amount of textures in your image file, on the given axis. 
-
-|===
-
-
-[TIP]
-====
-You can generate valid test settings by calling `CubesTestAssets.getSettings(application)`.
-====
-
-
-
-[WARNING]
-====
-At the moment, changes to the settings won't affect the block world at "`runtime`", i.e. *after* it's created.
-====
-

+ 0 - 52
docs/modules/ROOT/pages/jme3/contributions/cubes/tools/heightmaps.adoc

@@ -1,52 +0,0 @@
-= Heightmaps
-:author:
-:revnumber:
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../../../
-:imagesdir: ../../../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-Most of you will know the term “heightmap - Those are images (normally gray-scaled), which describe a terrain. Each pixel is a point on the surface: The brighter the pixel, the higher the terrain at this location. Easy, huh?
-
-“Cubes offers a way to load those heightmaps to generate your blockworld - You specify the image, the frameworks loads it and adds blocks that look like it.
-
-
-== Loading heightmaps
-
-
-image::http://destroflyer.mania-community.de/other/imagehost/cubes/heightmap_australia.jpg[heightmap_australia.jpg,width="",height="",align="right"]
-
-When specifying the heightmap, you can tell the framework where to set the blocks and how to scale them - As an example, let's rebuild australia in our blockworld:
-
-[source,java]
-----
-//Create the block terrain (7x1x7 chunks)
-BlockTerrainControl blockTerrain = new BlockTerrainControl(new Vector3Int(7, 1, 7));
-
-//Specify location, heightmap filepath, maximum height and the block class
-//(See the heightmap at the right)
-blockTerrain.setBlocksFromHeightmap(new Vector3Int(0, 1, 0), "Textures/cubes/heightmap_australia.jpg", 10, CubesTestAssets.BLOCK_GRASS);
-
-//Add the block terrain to a node
-Node terrainNode = new Node();
-terrainNode.addControl(blockTerrain);
-rootNode.attachChild(terrainNode);
-----
-
-After running this code (and adding nice water and shadow effects :P), you should see this:
-
-image:http://destroflyer.mania-community.de/other/imagehost/cubes/test_australia.png[test_australia.png,width="800",height=""]
-
-
-== Important notes
-
-*  The size of your heightmap defines how large (X, Z) the terrain will be (1px = 1 block)
-*  The heighest block will be at a height of `(StartY + MaximumHeight)`
-*  Black pixels (R|G|B = 0|0|0) means that no block will be set
-
-
-== Further improvements
-
-*  You will be able to scale the loaded blocks by the X and Z axis, too
-*  It will be possible to specify a loader, that selects a “suitable block type dependant on the location

+ 0 - 52
docs/modules/ROOT/pages/jme3/contributions/cubes/tools/noise.adoc

@@ -1,52 +0,0 @@
-= Noise
-:author:
-:revnumber:
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../../../
-:imagesdir: ../../../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-Noises are arrays of random numbers, that “fit together in some way - They're often used to generate content, for example block worlds. After specifying a noise, the framework will generate the random numbers and place according blocks (the larger the number, the heigher the terrain at this point).
-
-
-[IMPORTANT]
-====
-Remember that large noises will take some time to calculate.
-====
-
-
-
-== Generate a noise
-
-
-image::http://destroflyer.mania-community.de/other/imagehost/cubes/noise_example.jpg[noise_example.jpg,width="",height="",align="right"]
-
-At the moment, the framework supports only one noise type (based on the link:http://en.wikipedia.org/wiki/Diamond-square_algorithm[Diamond-square Algorithm]) - You can see a visualization of such a noise at the right.
-
-This is how you can use it:
-
-[source,java]
-----
-//Create the block terrain (4x1x4 chunks)
-BlockTerrainControl blockTerrain = new BlockTerrainControl(new Vector3Int(4, 1, 4));
-
-//Specify location, size, roughness and the block class
-//(The smaller the roughness, the flatter the generated terrain)
-blockTerrain.setBlocksFromNoise(new Vector3Int(0, 0, 0), new Vector3Int(64, 50, 64), 0.3f, CubesTestAssets.BLOCK_GRASS);
-
-//Add the block terrain to a node
-Node terrainNode = new Node();
-terrainNode.addControl(blockTerrain);
-rootNode.attachChild(terrainNode);
-----
-
-Some random results of the according noise:
-
-image:http://destroflyer.mania-community.de/other/imagehost/cubes/test_noise.png[test_noise.png,width="800",height=""]
-
-
-== Further improvements
-
-*  There will be mutltiple noises available and even an interface to define your own noises
-*  It will be possible to specify a loader, that selects a “suitable block type dependant on the location

+ 0 - 97
docs/modules/ROOT/pages/jme3/contributions/cubes/tools/picking.adoc

@@ -1,97 +0,0 @@
-= Picking
-:author:
-:revnumber:
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../../../
-:imagesdir: ../../../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-You already found out how to create a world block and modify it from your code. But wouldn't it be nice to have a “click-and-build functionality? (Minecraft says hello)
-
-The framework helps you to get the block location which is e.g. pointed by your mouse - When receiving the coordinates, you can use them to add or remove a block there.
-
-
-== BlockNavigator
-
-The `BlockNavigator` class contains various methods to help you navigate through your blockworld without having to trouble with coordinates, type casts or chunks. The method we need for (mouse) picking is this one:
-
-[source,java]
-----
-public static Vector3Int getPointedBlockLocation(BlockTerrain blockTerrain, Vector3f collisionContactPoint, boolean getNeighborLocation){
-    //Some mysterious code that returns the location
-    //of the block in the terrain, which is placed
-    //at the specified collisionContactPoint (world coordinates)
-    //If you set getNeighborLocation to true, you can
-    //get the empty block gap, in the direction towards you
-    //(e.g. if you want to add a block to the block you've clicked)
-}
-----
-
-
-== Get the cursor-pointed location / RayCasting
-
-So, the above method needs a collisionContactPoint - This is the point you've clicked in your world. Luckily, jMonkeyEngine offers raycasting, which lets you get exactly this point.
-
-
-[IMPORTANT]
-====
-I recommend to read the <<jme3/beginner/hello_picking#,Hello Picking>> tutorial first, since the rest of this chapter has nothing to do with the “Cubes framework itself.
-====
-
-
-This is a method I've created while creating a test case for mouse picking in the blockworld - It returns the CollisionResults of the mouse cursor and a specified node: (Generally, this will be the BlockTerrain's node)
-
-[source,java]
-----
-private CollisionResults getRayCastingResults(Node node){
-    Vector3f origin = cam.getWorldCoordinates(new Vector2f((settings.getWidth() / 2), (settings.getHeight() / 2)), 0.0f);
-    Vector3f direction = cam.getWorldCoordinates(new Vector2f((settings.getWidth() / 2), (settings.getHeight() / 2)), 0.3f);
-    direction.subtractLocal(origin).normalizeLocal();
-    Ray ray = new Ray(origin, direction);
-    CollisionResults results = new CollisionResults();
-    node.collideWith(ray, results);
-    return results;
-}
-----
-
-You can use the closest CollisionResult to receive the collisionContactPoint with your BlockTerrain and to finally get the “pointed block location:
-
-[source,java]
-----
-private Vector3Int getCurrentPointedBlockLocation(boolean getNeighborLocation){
-    CollisionResults results = getRayCastingResults(terrainNode);
-    if(results.size() > 0){
-        Vector3f collisionContactPoint = results.getClosestCollision().getContactPoint();
-        return BlockNavigator.getPointedBlockLocation(blockTerrain, collisionContactPoint, getNeighborLocation);
-    }
-    return null;
-}
-----
-
-Time to sum up: You can now get the current block location that you point with your mouse at any time you want. :)
-
-
-== Woah - Let's build Minecraft!
-
-One nice example would be to register a mouse-listener (See <<jme3/beginner/hello_input_system#,Hello Input>>) and to execute the following code when the user clicks:
-
-[source,java]
-----
-//Get the free block gap, to which the user is loooking...
-Vector3Int blockLocation = getCurrentPointedBlockLocation(true);
-//(The block location is null, if the user looks in the sky or out of the map)
-if(blockLocation != null){
-    //... and place a block there :)
-    blockTerrain.setBlock(blockLocation, CubesTestAssets.BLOCK_WOOD);
-}
-----
-
-And that's it - You just created your own minecraft-like blockworld-editor. Give yourself a challenge and implement the other mouse button to remove the pointed block (Look out for the `getNeighborLocation` parameter).
-
-image:http://destroflyer.mania-community.de/other/imagehost/cubes/test_picking.png[test_picking.png,width="800",height=""]
-
-
-== Further improvements
-
-*  Create different types of interactions between player and block (Open a door, turn a switch, destroy a block, …) and a way to define own interactions

+ 0 - 72
docs/modules/ROOT/pages/jme3/contributions/cubes/tools/serialization.adoc

@@ -1,72 +0,0 @@
-= Serializing
-:author:
-:revnumber:
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../../../
-:imagesdir: ../../../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-Whenever things have to be saved and loaded again (e.g. sending a map from the server to the clients), people talk about “serialization - Basically, this means breaking a complex structure (like our block world) down to a simple row of data.
-
-“Cubes supports bit-serializing - You can export your block terrain at any time to a row of bits, most of the time handled as *byte[]* array. Later, the complete terrain can be reconstructed by those raw bytes.
-
-
-== Serializing
-
-So, how do we convert a complete block world to bytes?
-
-[source,java]
-----
-byte[] serializedTerrainData = CubesSerializer.writeToBytes(blockTerrain);
-----
-
-Well… That was pretty easy, or? You don't have to worry, _how_ your terrain is magically pressed in the data, the framework directly offers you the bytes, that you need to reconstruct the whole thing.
-
-
-== Data Transport
-
-Actually, this part is on your own - There are many ways how to get data from one place to another and they all depend on your application. You'll have to find out how to get those bytes to the place where you want to rebuild the terrain - Make sure, you read the possible scenarios listed below.
-
-
-== Unserializing
-
-At this point, you have successfully received the bytes and want to recreate your awesome block world - This is how you do it:
-
-[source,java]
-----
-//The old blockTerrain will be completely replaced!
-//(Even the chunks count will be adjusted)
-BlockTerrainControl blockTerrainClone = new BlockTerrainControl(new Vector3Int());
-CubesSerializer.readFromBytes(blockTerrain, serializedTerrainData);
-----
-
-This screenshot shows a terrain and it's unserialized clone - Note, that the blocks have to be registered in the *same order* on both sides in order to reproduce the same terrain!
-
-image:http://destroflyer.mania-community.de/other/imagehost/cubes/test_serialize.png[test_serialize.png,width="800",height=""]
-
-
-== Possible scenarios
-
-The most typical examples for serializing are the following:
-[cols="3", options="header"]
-|===
-
-a| Application
-a| Data Transport
-<a| Resources
-
-a| Networking
-a| The bytes are sent in a message over the network - The client receives them and can rebuild the block world.
-a| <<jme3/advanced/networking#,Spidermonkey>>
-
-a| Files
-a| The bytes are saved in a file, which can be loaded again next time.
-a| link:http://docs.oracle.com/javase/tutorial/essential/io/fileio.html[java.io.File]
-
-|===
-
-
-== Advanced: BitSerializing
-
-_This part of the article will handle a more advanced way of how to access the bit serializer of the framework. As long as it's not written yet, please take a look at the classes `cubes.network.BitInputStream`, `cubes.network.BitOutputStream` and the interface `cubes.network.BitSerializable` that's implemented by the `cubes.BlockTerrainControl` class._